0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-19 14:12:40 +00:00

initial draft

This commit is contained in:
Victor Losada Hernandez
2023-03-16 17:54:19 +01:00
parent cc89ad1c7d
commit b041ef921e
16 changed files with 110 additions and 49 deletions

View File

@@ -2,6 +2,15 @@ const _ = require('lodash');
const dedent = require('dedent-tabs').default;
module.exports = {
center :()=>{
return dedent`
{{imageMaskCenter${_.random(1, 10)},--offsetX:0cm,--offsetY:0cm,--rotation:0;
![](https://i.imgur.com/GZfjDWV.png){height:100%}
}}
<!-- Use --offset to shift the mask toward or away from the page center.
Use --rotation to set rotation angle in degrees. -->\n\n`;
},
edge : (side = 'bottom')=>{
const rotation = {
'bottom' : 0,
@@ -21,7 +30,7 @@ module.exports = {
const offsetX = (x == 'left' ? '-50%' : '50%');
const offsetY = (y == 'top' ? '50%' : '-50%');
return dedent`
{{imageMaskCorner${_.random(1, 37)},--offsetX:${offsetX},--offsetY:${offsetY},--rotation:0
{{imageMaskCorner${_.random(1, 37)},--offsetX:${offsetX},--offsetY:${offsetY},--rotation:0deg
![](https://i.imgur.com/GZfjDWV.png){height:100%}
}}
<!-- Use --offsetX to shift the mask left or right (can use cm instead of %)