From a92f5d06943c8156a83c3a1857ed0d0bf7322901 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Fri, 24 Mar 2023 19:06:06 -0400 Subject: [PATCH] Combine .gen files together, add Center mask --- themes/V3/5ePHB/snippets.js | 4 +- themes/V3/5ePHB/snippets/coverpage.gen.js | 45 +++++++++++++------ .../V3/5ePHB/snippets/insidecoverpage.gen.js | 40 ----------------- 3 files changed, 34 insertions(+), 55 deletions(-) delete mode 100644 themes/V3/5ePHB/snippets/insidecoverpage.gen.js diff --git a/themes/V3/5ePHB/snippets.js b/themes/V3/5ePHB/snippets.js index 3c912e9ca..ae9601e48 100644 --- a/themes/V3/5ePHB/snippets.js +++ b/themes/V3/5ePHB/snippets.js @@ -173,13 +173,13 @@ module.exports = [ { name : 'Cover Page', icon : 'fac book-front-cover', - gen : CoverPageGen, + gen : CoverPageGen.front, experimental : true }, { name : 'Inside Cover Page', icon : 'fac book-front-cover', - gen : InsideCoverPageGen, + gen : CoverPageGen.inside, experimental : true }, { diff --git a/themes/V3/5ePHB/snippets/coverpage.gen.js b/themes/V3/5ePHB/snippets/coverpage.gen.js index 5351f5db5..1867d9d08 100644 --- a/themes/V3/5ePHB/snippets/coverpage.gen.js +++ b/themes/V3/5ePHB/snippets/coverpage.gen.js @@ -68,23 +68,42 @@ const footnote = [ 'In an amazing kingdom, in an age of sorcery and lost souls, eight space pirates quest for freedom.' ]; -module.exports = ()=>{ - return dedent` - {{coverPage }} +module.exports = { - {{logo ![](/assets/naturalCritLogo.svg)}} + front : function() { + return dedent` + {{coverPage }} - # ${_.sample(titles)} - ## ${_.sample(subtitles)} - __________ + {{logo ![](/assets/naturalCritLogo.svg)}} - {{banner HOMEBREW}} + # ${_.sample(titles)} + ## ${_.sample(subtitles)} + __________ - {{footnote - ${_.sample(footnote)} - }} + {{banner HOMEBREW}} - ![background image](https://i.imgur.com/Mqx8Vf7.png) + {{footnote + ${_.sample(footnote)} + }} - \page`; + ![background image](https://i.imgur.com/Mqx8Vf7.png) + + \page`; + }, + + inside : function() { + return dedent` + {{insideCover}} + + # ${_.sample(titles)} + ___ + + {{imageMaskCenter${_.random(1, 16)},--offsetX:0%,--offsetY:0%,--rotation:0; + ![](https://i.imgur.com/GZfjDWV.png){height:100%} + }} + + {{logo ![](/assets/naturalCritLogo.svg)}} + + \page`; + } }; diff --git a/themes/V3/5ePHB/snippets/insidecoverpage.gen.js b/themes/V3/5ePHB/snippets/insidecoverpage.gen.js deleted file mode 100644 index 15466eea7..000000000 --- a/themes/V3/5ePHB/snippets/insidecoverpage.gen.js +++ /dev/null @@ -1,40 +0,0 @@ -const _ = require('lodash'); -const dedent = require('dedent-tabs').default; - -const titles = [ - 'The Burning Gallows', 'The Ring of Nenlast', - 'Below the Blind Tavern', 'Below the Hungering River', - 'Before Bahamut\'s Land', 'The Cruel Grave from Within', - 'The Strength of Trade Road', 'Through The Raven Queen\'s Worlds', - 'Within the Settlement', 'The Crown from Within', - 'The Merchant Within the Battlefield', 'Ioun\'s Fading Traveler', - 'The Legion Ingredient', 'The Explorer Lure', - 'Before the Charming Badlands', 'Vecna\'s Hidden Sage', - 'The Living Dead Above the Fearful Cage', 'Bahamut\'s Demonspawn', - 'Across Gruumsh\'s Elemental Chaos', 'The Blade of Orcus', - 'Beyond Revenge', 'Brain of Insanity', - 'Breed Battle!, A New Beginning', 'Evil Lake, A New Beginning', - 'Invasion of the Gigantic Cat, Part II', 'Kraken War 2020', - 'The Body Whisperers', 'The Doctor from Heaven', - 'The Diabolical Tales of the Ape-Women', 'The Doctor Immortal', - 'Core of Heaven: Guardian of Amazement', 'The Graveyard', - 'Guardian: Skies of the Dark Wizard', 'Lute of Eternity', - 'Mercury\'s Planet: Brave Evolution', 'Azure Core', - 'Sky of Zelda: The Thunder of Force', 'Core Battle', - 'Ruby of Atlantis: The Quake of Peace', 'Deadly Amazement III', - 'Dry Chaos IX', 'Gate Thunder', - 'Vyse\'s Skies', 'White Greatness III', - 'Yellow Divinity', 'Zidane\'s Ghost' -]; - -module.exports = ()=>{ -return dedent`{{insideCover}} - -# Player's Hand book -___ - -![image](https://i.imgur.com/dpg5qPT.png) {} - -{{logo ![](/assets/naturalCritLogo.svg)}} -\page`; -}; \ No newline at end of file