mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-23 18:01:28 +00:00
Added print rules and fixing the newer border images
This commit is contained in:
@@ -67,7 +67,7 @@ module.exports = {
|
|||||||
var res = [
|
var res = [
|
||||||
levelName,
|
levelName,
|
||||||
"+" + Math.ceil(level/5 + 1),
|
"+" + Math.ceil(level/5 + 1),
|
||||||
_.sample(features, _.sample([0,1,1])).join(', ') || "Ability Score Improvement",
|
_.sampleSize(features, _.sample([0,1,1])).join(', ') || "Ability Score Improvement",
|
||||||
cantrips,
|
cantrips,
|
||||||
spells,
|
spells,
|
||||||
drawSlots(slots)
|
drawSlots(slots)
|
||||||
@@ -93,7 +93,7 @@ module.exports = {
|
|||||||
var res = [
|
var res = [
|
||||||
levelName,
|
levelName,
|
||||||
"+" + Math.ceil(level/5 + 1),
|
"+" + Math.ceil(level/5 + 1),
|
||||||
_.sample(features, _.sample([0,1,1])).join(', ') || "Ability Score Improvement",
|
_.sampleSize(features, _.sample([0,1,1])).join(', ') || "Ability Score Improvement",
|
||||||
"+" + featureScore
|
"+" + featureScore
|
||||||
].join(' | ');
|
].join(' | ');
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,6 @@
|
|||||||
font-size : smaller;
|
font-size : smaller;
|
||||||
line-height : 0;
|
line-height : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************
|
//*****************************
|
||||||
// * HEADERS
|
// * HEADERS
|
||||||
// *****************************/
|
// *****************************/
|
||||||
@@ -185,12 +184,11 @@
|
|||||||
// *****************************/
|
// *****************************/
|
||||||
hr+blockquote{
|
hr+blockquote{
|
||||||
position : relative;
|
position : relative;
|
||||||
background-color : @monsterStatBackground;
|
|
||||||
//border : none;
|
|
||||||
padding-top : 15px;
|
padding-top : 15px;
|
||||||
|
background-color : @monsterStatBackground;
|
||||||
border-image : @monsterBorderImage 10;
|
border-style : solid;
|
||||||
border-width : 10px;
|
border-width : 10px;
|
||||||
|
border-image : @monsterBorderImage 10;
|
||||||
h2{
|
h2{
|
||||||
margin-top : -8px;
|
margin-top : -8px;
|
||||||
margin-bottom : 0px;
|
margin-bottom : 0px;
|
||||||
@@ -217,6 +215,7 @@
|
|||||||
column-span : 1;
|
column-span : 1;
|
||||||
background-color : transparent;
|
background-color : transparent;
|
||||||
border-image : none;
|
border-image : none;
|
||||||
|
border-style : none;
|
||||||
-webkit-column-span : 1;
|
-webkit-column-span : 1;
|
||||||
tbody{
|
tbody{
|
||||||
tr:nth-child(odd), tr:nth-child(even){
|
tr:nth-child(odd), tr:nth-child(even){
|
||||||
@@ -235,33 +234,12 @@
|
|||||||
//Triangle dividers
|
//Triangle dividers
|
||||||
hr{
|
hr{
|
||||||
visibility : visible;
|
visibility : visible;
|
||||||
border: none;
|
|
||||||
height : 6px;
|
height : 6px;
|
||||||
margin : 4px 0px;
|
margin : 4px 0px;
|
||||||
background-image : @redTriangleImage;
|
background-image : @redTriangleImage;
|
||||||
background-size : 100% 100%;
|
background-size : 100% 100%;
|
||||||
|
border : none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
//Top and Bottom Borders
|
|
||||||
&:after, &:before{
|
|
||||||
content : "";
|
|
||||||
position : absolute;
|
|
||||||
height : 4px;
|
|
||||||
width : 100%;
|
|
||||||
padding : 0px 3px;
|
|
||||||
background-color : #E69A28;
|
|
||||||
border : 1px solid black;
|
|
||||||
}
|
|
||||||
&:before{
|
|
||||||
top : 0px;
|
|
||||||
left : -3px;
|
|
||||||
}
|
|
||||||
&:after{
|
|
||||||
bottom : 0px;
|
|
||||||
left : -3px;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
//Full Width
|
//Full Width
|
||||||
hr+hr+blockquote{
|
hr+hr+blockquote{
|
||||||
@@ -277,6 +255,7 @@
|
|||||||
border-collapse : separate;
|
border-collapse : separate;
|
||||||
background-color : white;
|
background-color : white;
|
||||||
border : initial;
|
border : initial;
|
||||||
|
border-style : solid;
|
||||||
border-image-outset : 37px 17px;
|
border-image-outset : 37px 17px;
|
||||||
border-image-repeat : round;
|
border-image-repeat : round;
|
||||||
border-image-slice : 150 200 150 200;
|
border-image-slice : 150 200 150 200;
|
||||||
@@ -288,8 +267,6 @@
|
|||||||
-webkit-column-span : all;
|
-webkit-column-span : all;
|
||||||
-moz-column-span : all;
|
-moz-column-span : all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//*****************************
|
//*****************************
|
||||||
// * FOOTER
|
// * FOOTER
|
||||||
// *****************************/
|
// *****************************/
|
||||||
@@ -377,7 +354,15 @@
|
|||||||
}
|
}
|
||||||
// Nested lists
|
// Nested lists
|
||||||
ul ul,ol ol,ul ol,ol ul{
|
ul ul,ol ol,ul ol,ol ul{
|
||||||
margin-left: 1.5em;
|
|
||||||
margin-bottom : 0px;
|
margin-bottom : 0px;
|
||||||
|
margin-left : 1.5em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//*****************************
|
||||||
|
// * PRINT
|
||||||
|
// *****************************/
|
||||||
|
.phb.print{
|
||||||
|
blockquote{
|
||||||
|
box-shadow : none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -339,8 +339,30 @@ table {
|
|||||||
.phb hr + blockquote {
|
.phb hr + blockquote {
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: #FDF1DC;
|
background-color: #FDF1DC;
|
||||||
border: none;
|
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
|
border-image: url('/assets/homebrew/phbStyle/border.png') 10;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 10px;
|
||||||
|
/*
|
||||||
|
//Top and Bottom Borders
|
||||||
|
&:after, &:before{
|
||||||
|
content : "";
|
||||||
|
position : absolute;
|
||||||
|
height : 4px;
|
||||||
|
width : 100%;
|
||||||
|
padding : 0px 3px;
|
||||||
|
background-color : #E69A28;
|
||||||
|
border : 1px solid black;
|
||||||
|
}
|
||||||
|
&:before{
|
||||||
|
top : 0px;
|
||||||
|
left : -3px;
|
||||||
|
}
|
||||||
|
&:after{
|
||||||
|
bottom : 0px;
|
||||||
|
left : -3px;
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
.phb hr + blockquote h2 {
|
.phb hr + blockquote h2 {
|
||||||
margin-top: -8px;
|
margin-top: -8px;
|
||||||
@@ -391,44 +413,12 @@ table {
|
|||||||
text-indent: 0em;
|
text-indent: 0em;
|
||||||
}
|
}
|
||||||
.phb hr + blockquote hr {
|
.phb hr + blockquote hr {
|
||||||
position: relative;
|
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
margin: 8px 0px;
|
border: none;
|
||||||
border-color: transparent;
|
height: 6px;
|
||||||
}
|
margin: 4px 0px;
|
||||||
.phb hr + blockquote hr:after,
|
background-image: url('/assets/homebrew/phbStyle/red.png');
|
||||||
.phb hr + blockquote hr:before {
|
background-size: 100% 100%;
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
left: 0px;
|
|
||||||
height: 3px;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.phb hr + blockquote hr:before {
|
|
||||||
top: -3px;
|
|
||||||
background: linear-gradient(to right top, #9c2b1b 40%, transparent 50%);
|
|
||||||
}
|
|
||||||
.phb hr + blockquote hr:after {
|
|
||||||
top: 0px;
|
|
||||||
background: linear-gradient(to right bottom, #9c2b1b 40%, transparent 50%);
|
|
||||||
}
|
|
||||||
.phb hr + blockquote:after,
|
|
||||||
.phb hr + blockquote:before {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
height: 4px;
|
|
||||||
width: 100%;
|
|
||||||
padding: 0px 3px;
|
|
||||||
background-color: #E69A28;
|
|
||||||
border: 1px solid black;
|
|
||||||
}
|
|
||||||
.phb hr + blockquote:before {
|
|
||||||
top: 0px;
|
|
||||||
left: -3px;
|
|
||||||
}
|
|
||||||
.phb hr + blockquote:after {
|
|
||||||
bottom: 0px;
|
|
||||||
left: -3px;
|
|
||||||
}
|
}
|
||||||
.phb hr + hr + blockquote {
|
.phb hr + hr + blockquote {
|
||||||
column-count: 2;
|
column-count: 2;
|
||||||
@@ -535,3 +525,13 @@ table {
|
|||||||
.phb table + p {
|
.phb table + p {
|
||||||
text-indent: 1em;
|
text-indent: 1em;
|
||||||
}
|
}
|
||||||
|
.phb ul ul,
|
||||||
|
.phb ol ol,
|
||||||
|
.phb ul ol,
|
||||||
|
.phb ol ul {
|
||||||
|
margin-left: 1.5em;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
.phb.print blockquote {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|||||||
@@ -87,10 +87,10 @@ module.exports = function(app){
|
|||||||
}
|
}
|
||||||
|
|
||||||
var content = _.map(brew.text.split('\\page'), function(pageText){
|
var content = _.map(brew.text.split('\\page'), function(pageText){
|
||||||
return '<div class="phb">' + Markdown(pageText) + '</div>';
|
return '<div class="phb print">' + Markdown(pageText) + '</div>';
|
||||||
}).join('\n');
|
}).join('\n');
|
||||||
|
|
||||||
var title = '<title>' + brew.text.split('\n')[0] + '</title>';
|
var title = '<title>' + brew.title + '</title>';
|
||||||
var page = '<html><head>' + title + PHBStyle + '</head><body>' + content +'</body></html>'
|
var page = '<html><head>' + title + PHBStyle + '</head><body>' + content +'</body></html>'
|
||||||
|
|
||||||
return res.send(page)
|
return res.send(page)
|
||||||
|
|||||||
12
todo.md
12
todo.md
@@ -5,7 +5,7 @@ X Make statusbar un-fixed
|
|||||||
X Simplify the panel css to remove the current issues
|
X Simplify the panel css to remove the current issues
|
||||||
X Build new `BrewRenderer`, clean support for partial rendering
|
X Build new `BrewRenderer`, clean support for partial rendering
|
||||||
X Add `infoBox` to BrewRenderer to show views, and current pages
|
X Add `infoBox` to BrewRenderer to show views, and current pages
|
||||||
- remove old status bar
|
X remove old status bar
|
||||||
X remove jsoneditor (if we don't need it)
|
X remove jsoneditor (if we don't need it)
|
||||||
X Add in markdown editor
|
X Add in markdown editor
|
||||||
X Add the '/new' page and force save to reduce database size
|
X Add the '/new' page and force save to reduce database size
|
||||||
@@ -14,19 +14,23 @@ X Update the admin page with pagnition and a query box
|
|||||||
X Test the old/small brew filtering for deleteion
|
X Test the old/small brew filtering for deleteion
|
||||||
X Partial rendering kills style tags on unrendered pages. Detect if pages have style tags and render them.
|
X Partial rendering kills style tags on unrendered pages. Detect if pages have style tags and render them.
|
||||||
- Add in the link of Pateron?
|
- Add in the link of Pateron?
|
||||||
- Add in window.resize handlers for the elements that need it
|
|
||||||
X Add in a localstorage fallback on the `/new` page, clear it when they save
|
X Add in a localstorage fallback on the `/new` page, clear it when they save
|
||||||
X Rename `/client/naturalCrit` -> `/client/main`
|
X Rename `/client/naturalCrit` -> `/client/main`
|
||||||
X Move snippets into their new groups
|
X Move snippets into their new groups
|
||||||
- Replace pseudo-elements with encoded images
|
- Replace pseudo-elements with encoded images
|
||||||
- Make hybrid editor and brewRenderer (with resize listeners)
|
- Encode the images into base64 and embed
|
||||||
|
- Add in note wings
|
||||||
|
X Border shadows on second column renders much better
|
||||||
|
X Saving a pdf no uses the brew title
|
||||||
X add /source/shareId route
|
X add /source/shareId route
|
||||||
- Add stats nav item
|
- Add stats nav item
|
||||||
- make both ids indexes in mongoose
|
X make both ids indexes in mongoose
|
||||||
X Fix main Page
|
X Fix main Page
|
||||||
- Write new welcome message
|
- Write new welcome message
|
||||||
|
|
||||||
## v1.6
|
## v1.6
|
||||||
|
- Add in window.resize handlers for the elements that need it
|
||||||
|
- Make hybrid editor and brewRenderer (with resize listeners)
|
||||||
- Add in brew title, use for metadata?
|
- Add in brew title, use for metadata?
|
||||||
- Add error handling to the saving wdiget in the status bar
|
- Add error handling to the saving wdiget in the status bar
|
||||||
- Should provide error dump to copy and a link to github issues page
|
- Should provide error dump to copy and a link to github issues page
|
||||||
|
|||||||
Reference in New Issue
Block a user