diff --git a/client/homebrew/editor/snippets/classtable.gen.js b/client/homebrew/editor/snippets/classtable.gen.js index 4baca92..6da698d 100644 --- a/client/homebrew/editor/snippets/classtable.gen.js +++ b/client/homebrew/editor/snippets/classtable.gen.js @@ -67,7 +67,7 @@ module.exports = { var res = [ levelName, "+" + 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, spells, drawSlots(slots) @@ -93,7 +93,7 @@ module.exports = { var res = [ levelName, "+" + 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 ].join(' | '); diff --git a/client/homebrew/phbStyle/phb.style.less b/client/homebrew/phbStyle/phb.style.less index 324b7ec..bb9d6b0 100644 --- a/client/homebrew/phbStyle/phb.style.less +++ b/client/homebrew/phbStyle/phb.style.less @@ -85,16 +85,15 @@ font-style : italic; } sup{ - vertical-align: super; - font-size: smaller; - line-height: 0; + vertical-align : super; + font-size : smaller; + line-height : 0; } sub{ - vertical-align: sub; - font-size: smaller; - line-height: 0; + vertical-align : sub; + font-size : smaller; + line-height : 0; } - //***************************** // * HEADERS // *****************************/ @@ -176,7 +175,7 @@ border-bottom : 2px black solid; box-shadow : 1px 4px 14px #888; p, ul{ - font-size : 0.352cm; + font-size : 0.352cm; line-height : 1.1em; } } @@ -185,14 +184,13 @@ // *****************************/ hr+blockquote{ position : relative; + padding-top : 15px; background-color : @monsterStatBackground; - //border : none; - padding-top: 15px; - - border-image : @monsterBorderImage 10; - border-width : 10px; + border-style : solid; + border-width : 10px; + border-image : @monsterBorderImage 10; h2{ - margin-top: -8px; + margin-top : -8px; margin-bottom : 0px; &+p{ padding-bottom : 0px; @@ -206,7 +204,7 @@ ul{ .useSansSerif(); padding-left : 1em; - font-size : 0.352cm; + font-size : 0.352cm; color : @headerText; text-indent : -1em; list-style-type : none; @@ -217,6 +215,7 @@ column-span : 1; background-color : transparent; border-image : none; + border-style : none; -webkit-column-span : 1; tbody{ tr:nth-child(odd), tr:nth-child(even){ @@ -234,34 +233,13 @@ } //Triangle dividers hr{ - visibility: visible; - border: none; - height: 6px; - margin: 4px 0px; - background-image: @redTriangleImage; - background-size: 100% 100%; + visibility : visible; + height : 6px; + margin : 4px 0px; + background-image : @redTriangleImage; + 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 hr+hr+blockquote{ @@ -277,6 +255,7 @@ border-collapse : separate; background-color : white; border : initial; + border-style : solid; border-image-outset : 37px 17px; border-image-repeat : round; border-image-slice : 150 200 150 200; @@ -288,8 +267,6 @@ -webkit-column-span : all; -moz-column-span : all; } - - //***************************** // * FOOTER // *****************************/ @@ -377,7 +354,15 @@ } // Nested lists ul ul,ol ol,ul ol,ol ul{ - margin-left: 1.5em; margin-bottom : 0px; + margin-left : 1.5em; } } +//***************************** +// * PRINT +// *****************************/ +.phb.print{ + blockquote{ + box-shadow : none; + } +} \ No newline at end of file diff --git a/phb.standalone.css b/phb.standalone.css index ccd73f9..330ee12 100644 --- a/phb.standalone.css +++ b/phb.standalone.css @@ -339,8 +339,30 @@ table { .phb hr + blockquote { position: relative; background-color: #FDF1DC; - border: none; 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 { margin-top: -8px; @@ -391,44 +413,12 @@ table { text-indent: 0em; } .phb hr + blockquote hr { - position: relative; visibility: visible; - margin: 8px 0px; - border-color: transparent; -} -.phb hr + blockquote hr:after, -.phb hr + blockquote hr:before { - 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; + border: none; + height: 6px; + margin: 4px 0px; + background-image: url('/assets/homebrew/phbStyle/red.png'); + background-size: 100% 100%; } .phb hr + hr + blockquote { column-count: 2; @@ -535,3 +525,13 @@ table { .phb table + p { 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; +} diff --git a/server/homebrew.server.js b/server/homebrew.server.js index f370329..fd036ef 100644 --- a/server/homebrew.server.js +++ b/server/homebrew.server.js @@ -87,10 +87,10 @@ module.exports = function(app){ } var content = _.map(brew.text.split('\\page'), function(pageText){ - return '
' + Markdown(pageText) + '
'; + return '
' + Markdown(pageText) + '
'; }).join('\n'); - var title = '' + brew.text.split('\n')[0] + ''; + var title = '' + brew.title + ''; var page = '' + title + PHBStyle + '' + content +'' return res.send(page) diff --git a/todo.md b/todo.md index ea5ab2f..60ab220 100644 --- a/todo.md +++ b/todo.md @@ -5,7 +5,7 @@ X Make statusbar un-fixed X Simplify the panel css to remove the current issues X Build new `BrewRenderer`, clean support for partial rendering 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 Add in markdown editor 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 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 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 Rename `/client/naturalCrit` -> `/client/main` X Move snippets into their new groups - 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 - Add stats nav item -- make both ids indexes in mongoose +X make both ids indexes in mongoose X Fix main Page - Write new welcome message ## 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 error handling to the saving wdiget in the status bar - Should provide error dump to copy and a link to github issues page