diff --git a/client/icons/book-part-cover.svg b/client/icons/book-part-cover.svg new file mode 100644 index 000000000..098881e53 --- /dev/null +++ b/client/icons/book-part-cover.svg @@ -0,0 +1,54 @@ + + + + + + + + + diff --git a/client/icons/customIcons.less b/client/icons/customIcons.less index d89afdab1..b2bad2b76 100644 --- a/client/icons/customIcons.less +++ b/client/icons/customIcons.less @@ -43,6 +43,9 @@ .book-inside-cover { content: url('../icons/book-inside-cover.svg'); } +.book-part-cover { + content: url('../icons/book-part-cover.svg'); +} .davek { content: url('../icons/Davek.svg'); } diff --git a/themes/V3/5eDMG/style.less b/themes/V3/5eDMG/style.less index 50a3af0a3..ffc73d992 100644 --- a/themes/V3/5eDMG/style.less +++ b/themes/V3/5eDMG/style.less @@ -1,3 +1,5 @@ +@import (less) './themes/assets/assets.less'; + :root { //Colors --HB_Color_Accent : #EBCEC3; // Salmon @@ -17,3 +19,10 @@ bottom : 40px; } } + +.page:has(.partCover) { + + .partCover { + background-image: @partCoverHeaderDMG; + } +} \ No newline at end of file diff --git a/themes/V3/5ePHB/snippets.js b/themes/V3/5ePHB/snippets.js index 99aa00e23..4e88a7a22 100644 --- a/themes/V3/5ePHB/snippets.js +++ b/themes/V3/5ePHB/snippets.js @@ -6,6 +6,7 @@ const MonsterBlockGen = require('./snippets/monsterblock.gen.js'); const scriptGen = require('./snippets/script.gen.js'); const ClassFeatureGen = require('./snippets/classfeature.gen.js'); const CoverPageGen = require('./snippets/coverpage.gen.js'); +const PartCoverPageGen = require('./snippets/partcoverpage.gen.js'); const TableOfContentsGen = require('./snippets/tableOfContents.gen.js'); const dedent = require('dedent-tabs').default; @@ -181,6 +182,12 @@ module.exports = [ gen : CoverPageGen.inside, experimental : true }, + { + name : 'Part Cover Page', + icon : 'fac book-part-cover', + gen : CoverPageGen.part, + experimental : true + }, { name : 'Magic Item', icon : 'fas fa-hat-wizard', diff --git a/themes/V3/5ePHB/snippets/coverpage.gen.js b/themes/V3/5ePHB/snippets/coverpage.gen.js index 7f9d0cd2a..bd52e1d9e 100644 --- a/themes/V3/5ePHB/snippets/coverpage.gen.js +++ b/themes/V3/5ePHB/snippets/coverpage.gen.js @@ -100,11 +100,25 @@ module.exports = { ___ {{imageMaskCenter${_.random(1, 16)},--offsetX:0%,--offsetY:0%,--rotation:0 - ![](https://i.imgur.com/IsfUnFR.jpg){height:100%} + ![background image](https://i.imgur.com/IsfUnFR.jpg){position:absolute,bottom:0,left:0,height:100%} }} {{logo ![](/assets/naturalCritLogo.svg)}} + \page`; + }, + + part : function() { + return dedent` + {{partCover}} + + # PART X + ## ${_.sample(subtitles)} + + {{imageMaskEdge${_.random(1, 8)},--offset:10cm,--rotation:180 + ![Background image](https://i.imgur.com/9TU96xY.jpg){position:absolute,bottom:0,left:0,height:100%} + }} + \page`; } }; diff --git a/themes/V3/5ePHB/snippets/partcoverpage.gen.js b/themes/V3/5ePHB/snippets/partcoverpage.gen.js new file mode 100644 index 000000000..5b808aabb --- /dev/null +++ b/themes/V3/5ePHB/snippets/partcoverpage.gen.js @@ -0,0 +1,50 @@ +const _ = require('lodash'); + +var titles = [ + 'Introduction to the World of DnD', + 'Creating Your Character', + 'The Rules of the Game', + 'Combat and Combat Strategies', + 'Magic and Spellcasting', + 'Adventuring and Exploration', + 'Dungeon Delving', + 'Campaign Building and World Building', + 'DM Techniques and Tips', + 'Appendix: Reference Material', + 'Monsters and Creatures', + 'Equipment and Treasure', + 'Non-Player Characters (NPCs)', + 'Experience and Leveling', + 'Races and Classes', + 'Skills and Abilities', + 'Alignment and Moral Choices', + 'Player-vs-Player Conflict', + 'Game Mastering 101', + 'Running a Successful Campaign', + 'Worldbuilding and Lore', + 'Designing Encounters and Adventures', + 'Managing Players and their Expectations', + 'Factions and Political Intrigue', + 'Adventure Hooks and Plot Ideas', + 'Building a Campaign Setting', + 'Handling Rules Disputes', + 'Running Large-Scale Battles', + 'Designing Unique Magic Systems', + 'Developing and Using NPCs', + 'Crafting Memorable Quests', + 'Improvising When Things Don\'t Go as Planned', + 'Managing Session Flow and Pacing', + 'Building a World That Feels Alive' +]; + +module.exports = ()=>{ + return `{{partCover}} + +# PART X +## ${_.sample(titles)} + +{{imageMaskEdge5,--offset:10cm,--rotation:180 +![Background](https://i.imgur.com/9TU96xY.jpg){height:100%} +}} +\\page`; +}; diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index 2acbe88bf..e5be33ad1 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -821,6 +821,45 @@ h5 + table{ } } +//***************************** + // * PART COVER + // *****************************/ + .page:has(.partCover) { + columns : 1; + text-align : center; + padding-top: 0; + + .partCover { + background-image: @partCoverHeaderPHB; + background-repeat: no-repeat; + position: absolute; + background-size: 100%; + top: 0; + left: 0; + height: 6cm; + width: 100%; + } + + h1 { + position: relative; + text-align: center; + text-transform: uppercase; + font-size: 2.3cm; + font-family: NodestoCapsCondensed; + margin-top: .4cm; + } + + h2 { + font-family: Overpass; + font-size: 0.45cm; + position: relative; + margin-top: -0.7em; + line-height: 1.1em; + margin-left : auto; + margin-right : auto; + } + } + //***************************** // * TABLE OF CONTENTS // *****************************/ diff --git a/themes/assets/assets.less b/themes/assets/assets.less index 53863b8c5..0547e8c70 100644 --- a/themes/assets/assets.less +++ b/themes/assets/assets.less @@ -13,6 +13,8 @@ @naturalCritLogo : url('/assets/naturalCritLogo.svg'); @coverPageBanner : url('/assets/coverPageBanner.svg'); @horizontalRule : url('/assets/horizontalRule.svg'); +@partCoverHeaderPHB : url('/assets/partCoverHeaderPHB.png'); +@partCoverHeaderDMG : url('/assets/partCoverHeaderDMG.svg'); @insideCoverMask : url('/assets/insideCoverMask.png'); @scriptBorder : url('/assets/scriptBorder.png'); diff --git a/themes/assets/partCoverHeaderDMG.svg b/themes/assets/partCoverHeaderDMG.svg new file mode 100644 index 000000000..b7defc541 --- /dev/null +++ b/themes/assets/partCoverHeaderDMG.svg @@ -0,0 +1 @@ +Asset 2 \ No newline at end of file diff --git a/themes/assets/partCoverHeaderPHB.png b/themes/assets/partCoverHeaderPHB.png new file mode 100644 index 000000000..f359668ba Binary files /dev/null and b/themes/assets/partCoverHeaderPHB.png differ diff --git a/themes/fonts/5e/Martel Sans Black.woff2 b/themes/fonts/5e/Martel Sans Black.woff2 new file mode 100644 index 000000000..44580467d Binary files /dev/null and b/themes/fonts/5e/Martel Sans Black.woff2 differ