From 33abe05737f8d31be421be42599cea81de98d5d6 Mon Sep 17 00:00:00 2001 From: Gazook89 <58999374+Gazook89@users.noreply.github.com> Date: Thu, 29 Jul 2021 17:47:29 -0500 Subject: [PATCH 1/9] Create userPage3D.css --- client/homebrew/pages/userPage/userPage3D.css | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 client/homebrew/pages/userPage/userPage3D.css diff --git a/client/homebrew/pages/userPage/userPage3D.css b/client/homebrew/pages/userPage/userPage3D.css new file mode 100644 index 000000000..f7809d868 --- /dev/null +++ b/client/homebrew/pages/userPage/userPage3D.css @@ -0,0 +1,80 @@ + +.phb { + background:transparent; + width:100%; +} + +.phb > div > h1 { + color:white; + background:linear-gradient(150deg, red, orange); + margin:10px; + border-radius:5px; + border:1px outset black; + filter:drop-shadow(3px 3px 8px black); + padding:10px; + font-family:codebold; + font-size: .705cm; +} + +.phb > div:nth-child(2) > h1 { + background:linear-gradient(150deg, blue, purple); +} + +.phb > div { + display: flex; + flex-wrap: wrap; + justify-content:center; + padding:20px; + gap:15px; + border:6px solid #333333; + border-radius:10px; + margin-bottom:20px; +} + +.phb div:first-child h1 { + flex: 1 0 100%; + margin:0 0 10px 0; +} + +.phb div:nth-child(2) h1 { + flex: 1 0 100%; +} + +.phb .brewItem { + background:linear-gradient(150deg, red, orange); + flex: 1 1 content; + margin:unset; + height: 150px; + border:1px outset black; + filter:drop-shadow(3px 3px 8px black); + color:white; + display:flex; + flex-direction:column; +} + +.phb div:nth-child(2) .brewItem { + background:linear-gradient(150deg, blue, purple); +} + +.phb .brewItem h2 { + font-family:CodeBold; + color:white; + /* width:max(90%,300px); */ + flex:0 0 auto; +} + +.phb .brewItem .description { + /* width:clamp(200px,100%,300px); */ + flex:1 1 auto; +} + +.phb .brewItem .info { + all:unset; + /* width:clamp(200px,100%,300px); */ + flex:0 0 20px; + opacity:30% +} + +.phb .brewItem:hover .info { + opacity:unset; +} From cb74c0d38948a2a3245f9e1374be903909bd5e7f Mon Sep 17 00:00:00 2001 From: Gazook89 <58999374+Gazook89@users.noreply.github.com> Date: Thu, 29 Jul 2021 17:59:55 -0500 Subject: [PATCH 2/9] Update userPage3D.css --- client/homebrew/pages/userPage/userPage3D.css | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/homebrew/pages/userPage/userPage3D.css b/client/homebrew/pages/userPage/userPage3D.css index f7809d868..291c9fe70 100644 --- a/client/homebrew/pages/userPage/userPage3D.css +++ b/client/homebrew/pages/userPage/userPage3D.css @@ -26,9 +26,6 @@ justify-content:center; padding:20px; gap:15px; - border:6px solid #333333; - border-radius:10px; - margin-bottom:20px; } .phb div:first-child h1 { @@ -52,6 +49,10 @@ flex-direction:column; } +.phb .brewItem:active { + transform:scale(.99); +} + .phb div:nth-child(2) .brewItem { background:linear-gradient(150deg, blue, purple); } From 56975f93756e1d1ba656b1d3bacd3b2c41352fa7 Mon Sep 17 00:00:00 2001 From: Gazook89 <58999374+Gazook89@users.noreply.github.com> Date: Thu, 29 Jul 2021 19:15:09 -0500 Subject: [PATCH 3/9] Delete userPage3D.css --- client/homebrew/pages/userPage/userPage3D.css | 81 ------------------- 1 file changed, 81 deletions(-) delete mode 100644 client/homebrew/pages/userPage/userPage3D.css diff --git a/client/homebrew/pages/userPage/userPage3D.css b/client/homebrew/pages/userPage/userPage3D.css deleted file mode 100644 index 291c9fe70..000000000 --- a/client/homebrew/pages/userPage/userPage3D.css +++ /dev/null @@ -1,81 +0,0 @@ - -.phb { - background:transparent; - width:100%; -} - -.phb > div > h1 { - color:white; - background:linear-gradient(150deg, red, orange); - margin:10px; - border-radius:5px; - border:1px outset black; - filter:drop-shadow(3px 3px 8px black); - padding:10px; - font-family:codebold; - font-size: .705cm; -} - -.phb > div:nth-child(2) > h1 { - background:linear-gradient(150deg, blue, purple); -} - -.phb > div { - display: flex; - flex-wrap: wrap; - justify-content:center; - padding:20px; - gap:15px; -} - -.phb div:first-child h1 { - flex: 1 0 100%; - margin:0 0 10px 0; -} - -.phb div:nth-child(2) h1 { - flex: 1 0 100%; -} - -.phb .brewItem { - background:linear-gradient(150deg, red, orange); - flex: 1 1 content; - margin:unset; - height: 150px; - border:1px outset black; - filter:drop-shadow(3px 3px 8px black); - color:white; - display:flex; - flex-direction:column; -} - -.phb .brewItem:active { - transform:scale(.99); -} - -.phb div:nth-child(2) .brewItem { - background:linear-gradient(150deg, blue, purple); -} - -.phb .brewItem h2 { - font-family:CodeBold; - color:white; - /* width:max(90%,300px); */ - flex:0 0 auto; -} - -.phb .brewItem .description { - /* width:clamp(200px,100%,300px); */ - flex:1 1 auto; -} - -.phb .brewItem .info { - all:unset; - /* width:clamp(200px,100%,300px); */ - flex:0 0 20px; - opacity:30% -} - -.phb .brewItem:hover .info { - opacity:unset; -} From fdb294bad96072bebb00dbb0250031f2baf63ed3 Mon Sep 17 00:00:00 2001 From: Gazook89 <58999374+Gazook89@users.noreply.github.com> Date: Thu, 29 Jul 2021 20:36:58 -0500 Subject: [PATCH 4/9] Update to v3 moustache syntax - Added moustache syntax - replaced class `wide` with `full` so that new styling is applied, including adding a "spell slots per spell level" header for only full class tables. - included a quick-change css variable to the snippet to control row color. **can be updated to use hex code or whichever is preferred for the snippet** --- .../homebrew/editor/snippetbar/snippets/classtable.gen.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippets/classtable.gen.js b/client/homebrew/editor/snippetbar/snippets/classtable.gen.js index 867aa625e..c375c1fa7 100644 --- a/client/homebrew/editor/snippetbar/snippets/classtable.gen.js +++ b/client/homebrew/editor/snippetbar/snippets/classtable.gen.js @@ -70,7 +70,7 @@ module.exports = { let cantrips = 3; let spells = 1; let slots = 2; - return `
\n##### The ${classname}\n` + + return `{{classTable,full,--row-color="rgba(250,0,0,.2)"\n##### The ${classname}\n` + `| Level | Proficiency Bonus | Features | Cantrips Known | Spells Known | 1st | 2nd | 3rd | 4th | 5th | 6th | 7th | 8th | 9th |\n`+ `|:---:|:---:|:---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|\n${ _.map(levels, function(levelName, level){ @@ -88,14 +88,14 @@ module.exports = { slots += _.random(0, 2); return `| ${res} |`; - }).join('\n')}\n
\n\n`; + }).join('\n')}\n}}\n\n`; }, half : function(){ const classname = _.sample(classnames); let featureScore = 1; - return `
\n##### The ${classname}\n` + + return `{{classTable,--row-color="rgba(250,0,0,.2)"\n##### The ${classname}\n` + `| Level | Proficiency Bonus | Features | ${_.sample(features)}|\n` + `|:---:|:---:|:---|:---:|\n${ _.map(levels, function(levelName, level){ @@ -109,6 +109,6 @@ module.exports = { featureScore += _.random(0, 1); return `| ${res} |`; - }).join('\n')}\n
\n\n`; + }).join('\n')}\n}}\n\n`; } }; From 3c2feeb2aa6aad0cff3bc2eeb155e1d752013e73 Mon Sep 17 00:00:00 2001 From: Gazook89 <58999374+Gazook89@users.noreply.github.com> Date: Thu, 29 Jul 2021 20:52:23 -0500 Subject: [PATCH 5/9] Update css for classTables v3 - add "- spell slots per spell level -" header to full class tables - add rules for `.classTables.full` which is similar to `wide` but adds the previously mentioned header as well. - add css variable `--row-color` so the odd row colors can be set in the inline moustache syntax easily. --- themes/5ePhb.style.less | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/themes/5ePhb.style.less b/themes/5ePhb.style.less index ac8fff139..1112ab769 100644 --- a/themes/5ePhb.style.less +++ b/themes/5ePhb.style.less @@ -526,7 +526,25 @@ body { h5{ margin-bottom : 10px; } + &.full{ + column-span : all; + --row-color : ; + &:after{ + content : '— Spell Slots per Spell Level —'; + font-weight : bold; + font-family : ScalySans; + position : absolute; + top : 20px; + right : 43px; + } + } + tbody tr:nth-child(odd) { + background : var(--row-color); + } } + + + //***************************** // * TABLE OF CONTENTS // *****************************/ From f469a7e36038fdcdc00ac292b5c27153db00a02b Mon Sep 17 00:00:00 2001 From: Gazook89 <58999374+Gazook89@users.noreply.github.com> Date: Thu, 29 Jul 2021 21:42:14 -0500 Subject: [PATCH 6/9] Update page number snippet in snippet.js --- client/homebrew/editor/snippetbar/snippets/snippets.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippets/snippets.js b/client/homebrew/editor/snippetbar/snippets/snippets.js index e61289b6b..2ac8c7ea0 100644 --- a/client/homebrew/editor/snippetbar/snippets/snippets.js +++ b/client/homebrew/editor/snippetbar/snippets/snippets.js @@ -73,12 +73,12 @@ module.exports = [ { name : 'Page Number', icon : 'fas fa-bookmark', - gen : '{{pageNumber\n1\n}}\n{{footnote\nPART 1 | FANCINESS\n}}\n\n' + gen : '{{pageNumber 1}}\n{{footnote PART 1 | SECTION NAME}}\n\n' }, { name : 'Auto-incrementing Page Number', icon : 'fas fa-sort-numeric-down', - gen : '{{pageNumber,auto\n}}\n\n' + gen : '{{pageNumber,auto}}\n{{footnote PART 1 | SECTION NAME}}\n\n' }, { name : 'Link to page', From ce73e9293d98e1fe977a8dc8e0b2968cec26b428 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 30 Jul 2021 20:33:24 -0400 Subject: [PATCH 7/9] Revert "Update to v3 moustache syntax" This reverts commit fdb294bad96072bebb00dbb0250031f2baf63ed3. --- .../homebrew/editor/snippetbar/snippets/classtable.gen.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippets/classtable.gen.js b/client/homebrew/editor/snippetbar/snippets/classtable.gen.js index c375c1fa7..867aa625e 100644 --- a/client/homebrew/editor/snippetbar/snippets/classtable.gen.js +++ b/client/homebrew/editor/snippetbar/snippets/classtable.gen.js @@ -70,7 +70,7 @@ module.exports = { let cantrips = 3; let spells = 1; let slots = 2; - return `{{classTable,full,--row-color="rgba(250,0,0,.2)"\n##### The ${classname}\n` + + return `
\n##### The ${classname}\n` + `| Level | Proficiency Bonus | Features | Cantrips Known | Spells Known | 1st | 2nd | 3rd | 4th | 5th | 6th | 7th | 8th | 9th |\n`+ `|:---:|:---:|:---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|\n${ _.map(levels, function(levelName, level){ @@ -88,14 +88,14 @@ module.exports = { slots += _.random(0, 2); return `| ${res} |`; - }).join('\n')}\n}}\n\n`; + }).join('\n')}\n
\n\n`; }, half : function(){ const classname = _.sample(classnames); let featureScore = 1; - return `{{classTable,--row-color="rgba(250,0,0,.2)"\n##### The ${classname}\n` + + return `
\n##### The ${classname}\n` + `| Level | Proficiency Bonus | Features | ${_.sample(features)}|\n` + `|:---:|:---:|:---|:---:|\n${ _.map(levels, function(levelName, level){ @@ -109,6 +109,6 @@ module.exports = { featureScore += _.random(0, 1); return `| ${res} |`; - }).join('\n')}\n}}\n\n`; + }).join('\n')}\n
\n\n`; } }; From 2a40f05e90e3b40881ef55fb78852bb8891a3c30 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 30 Jul 2021 20:33:34 -0400 Subject: [PATCH 8/9] Revert "Update css for classTables v3" This reverts commit 3c2feeb2aa6aad0cff3bc2eeb155e1d752013e73. --- themes/5ePhb.style.less | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/themes/5ePhb.style.less b/themes/5ePhb.style.less index 1112ab769..ac8fff139 100644 --- a/themes/5ePhb.style.less +++ b/themes/5ePhb.style.less @@ -526,25 +526,7 @@ body { h5{ margin-bottom : 10px; } - &.full{ - column-span : all; - --row-color : ; - &:after{ - content : '— Spell Slots per Spell Level —'; - font-weight : bold; - font-family : ScalySans; - position : absolute; - top : 20px; - right : 43px; - } - } - tbody tr:nth-child(odd) { - background : var(--row-color); - } } - - - //***************************** // * TABLE OF CONTENTS // *****************************/ From 8a03062e3ddd98f8532934cd3a1945d1e0c26cea Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 30 Jul 2021 22:32:17 -0400 Subject: [PATCH 9/9] Fix indent and vertical spacing --- themes/5ePhb.style.less | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/themes/5ePhb.style.less b/themes/5ePhb.style.less index ac8fff139..a5a3b6aa5 100644 --- a/themes/5ePhb.style.less +++ b/themes/5ePhb.style.less @@ -385,13 +385,14 @@ body { } } .pageNumber{ - position : absolute; - right : 2px; - bottom : 22px; - width : 50px; - font-size : 0.9em; - color : #c9ad6a; - text-align : center; + position : absolute; + right : 2px; + bottom : 22px; + width : 50px; + font-size : 0.9em; + color : #c9ad6a; + text-align : center; + text-indent : 0; &.auto::after { content : counter(phb-page-numbers); } @@ -605,6 +606,7 @@ body { .inline-block { display : inline-block; text-indent : initial; + line-height : 1.3em; } div { column-gap : 0.5cm; //Default spacing if a div uses multicolumns