0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-01 13:02:43 +00:00

Fix snippet hover highlight not full button width

This commit is contained in:
Trevor Buckner
2023-02-07 10:20:43 -05:00
parent d02fcc9252
commit 051fdbbc60
2 changed files with 6 additions and 4 deletions

View File

@@ -11,10 +11,12 @@ module.exports = {
Use --rotation to set rotation angle in degrees. -->\n\n`;
},
corner : ()=>{
corner : (y = 'top', x = 'left')=>{
const offsetX = (x == 'left' ? '-50%' : '50%');
const offsetY = (y == 'top' ? '-50%' : '50%');
return dedent`
{{imageMaskCorner${_.random(1, 8)},--offsetX:0%,offsetY:0%,--rotation:0
![](https://i.imgur.com/1w5khYt.png){height:100%}
{{imageMaskCorner${_.random(1, 8)},--offsetX:${offsetX},--offsetY:${offsetY},--rotation:0
![](https://i.imgur.com/GZfjDWV.png){height:100%}
}}
<!-- Use --offsetX to shift the mask left or right (you can use cm instead of %)
Use --offsetY to shift the mask up or down