mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-22 01:26:54 +00:00
Add subsnippets for edge masks
This commit is contained in:
1 parent
2ea639000b
commit
63346cfd7a
2 files changed
+32
-3
No files matched your search
@@ -2,9 +2,16 @@ const _ = require('lodash');
|
||||
const dedent = require('dedent-tabs').default;
|
||||
|
||||
module.exports = {
|
||||
edge : ()=>{
|
||||
edge : (side = 'bottom')=>{
|
||||
let rotation;
|
||||
switch (side){
|
||||
case 'bottom': rotation = 0; break;
|
||||
case 'top' : rotation = 180; break;
|
||||
case 'left' : rotation = 90; break;
|
||||
case 'right' : rotation = 270; break;
|
||||
}
|
||||
return dedent`
|
||||
{{imageMaskEdge${_.random(1, 8)},--offset:0cm,--rotation:0
|
||||
{{imageMaskEdge${_.random(1, 8)},--offset:0cm,--rotation:${rotation};
|
||||
{height:100%}
|
||||
}}
|
||||
<!-- Use --offset to shift the edge up or down from the page center.
|
||||
|
||||
Reference in new issue
Block a user