From f5a07cac4461d35537599ec2e7b799c78704626b Mon Sep 17 00:00:00 2001 From: Victor Losada Hernandez Date: Fri, 28 Apr 2023 23:07:02 +0200 Subject: [PATCH] merge cover gen files --- themes/V3/5ePHB/snippets.js | 7 +-- themes/V3/5ePHB/snippets/backcoverpage.gen.js | 27 ---------- themes/V3/5ePHB/snippets/coverpage.gen.js | 24 +++++++++ themes/V3/5ePHB/snippets/partcoverpage.gen.js | 50 ------------------- 4 files changed, 28 insertions(+), 80 deletions(-) delete mode 100644 themes/V3/5ePHB/snippets/backcoverpage.gen.js delete mode 100644 themes/V3/5ePHB/snippets/partcoverpage.gen.js diff --git a/themes/V3/5ePHB/snippets.js b/themes/V3/5ePHB/snippets.js index c30f1aebc..5b19c31ca 100644 --- a/themes/V3/5ePHB/snippets.js +++ b/themes/V3/5ePHB/snippets.js @@ -190,9 +190,10 @@ module.exports = [ experimental : true }, { - name : 'Back Cover Page', - icon : 'fac book-back-cover', - gen : BackCoverPageGen, + name : 'Back Cover Page', + icon : 'fac book-back-cover', + gen : CoverPageGen.back, + experimental : true }, { name : 'Magic Item', diff --git a/themes/V3/5ePHB/snippets/backcoverpage.gen.js b/themes/V3/5ePHB/snippets/backcoverpage.gen.js deleted file mode 100644 index ba94eb050..000000000 --- a/themes/V3/5ePHB/snippets/backcoverpage.gen.js +++ /dev/null @@ -1,27 +0,0 @@ -const _ = require('lodash'); -const dedent = require('dedent-tabs').default; - - -module.exports = ()=>{ - return dedent`{{backCover}} - -![background image](https://i.imgur.com/Mqx8Vf7.png){right:-350px;} - -# Back cover - -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris. -: -Nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. -: -Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -: -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. -__________ - -For use with the fifth edition manuals, existing and to exist. - - -{{logo -Homebrewery.Naturalcrit.com -}}`; -}; \ No newline at end of file diff --git a/themes/V3/5ePHB/snippets/coverpage.gen.js b/themes/V3/5ePHB/snippets/coverpage.gen.js index bd52e1d9e..6b0062c9d 100644 --- a/themes/V3/5ePHB/snippets/coverpage.gen.js +++ b/themes/V3/5ePHB/snippets/coverpage.gen.js @@ -120,5 +120,29 @@ module.exports = { }} \page`; + }, + + back : function() { + return dedent`{{backCover}} + + ![background image](https://i.imgur.com/Mqx8Vf7.png){right:-350px;} + + # Back cover + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris. + : + Nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. + : + Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + : + Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. + __________ + + For use with the fifth edition manuals, existing and to exist. + + + {{logo + Homebrewery.Naturalcrit.com + }}`; } }; diff --git a/themes/V3/5ePHB/snippets/partcoverpage.gen.js b/themes/V3/5ePHB/snippets/partcoverpage.gen.js deleted file mode 100644 index 5b808aabb..000000000 --- a/themes/V3/5ePHB/snippets/partcoverpage.gen.js +++ /dev/null @@ -1,50 +0,0 @@ -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`; -};