0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 14:12:40 +00:00

Move snippet to common CoverPage.gen

This commit is contained in:
Trevor Buckner
2023-04-28 16:51:53 -04:00
parent f771e24788
commit e235c705ae
3 changed files with 22 additions and 9 deletions

View File

@@ -183,9 +183,10 @@ module.exports = [
experimental : true
},
{
name : 'Part Cover Page',
icon : 'fas fa-file-alt',
gen : PartCoverPageGen,
name : 'Part Cover Page',
icon : 'fac book-part-cover',
gen : CoverPageGen.part,
experimental : true
},
{
name : 'Magic Item',

View File

@@ -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`;
}
};

View File

@@ -43,10 +43,8 @@ module.exports = ()=>{
# PART X
## ${_.sample(titles)}
{{imageMaskEdge5,--offset:10cm,--rotation:180
![Background](https://i.imgur.com/dpg5qPT.png)
{{imageMaskEdge5,--offset:10cm,--rotation:180
![Background](https://i.imgur.com/9TU96xY.jpg){height:100%}
}}
<!-- Use --offset to shift the mask toward or away from the page center.
Use --rotation to set rotation angle in degrees. -->
\\page`;
};
};