0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Match Legacy snippets to v3, remove <style> from style snippets

- Matched the Legacy snippets to v3, with appropriate syntax.
- Small adjustments to Ink Friendly snippet (retains images, reduces drop shadows, sets more backgrounds to White)
- Adds commented snippet 'titles' for Page snippets
This commit is contained in:
Gazook89
2021-08-12 07:42:08 -05:00
parent 50c07a5c8e
commit 807f865d8b
2 changed files with 45 additions and 29 deletions

View File

@@ -298,35 +298,39 @@ module.exports = [
{
name : 'A4 Page Size',
icon : 'far fa-file',
gen : ['<style>',
' .phb{',
' width : 210mm;',
' height : 296.8mm;',
' }',
'</style>'
gen : ['/* A4 Page Size */',
'.phb{',
' width : 210mm;',
' height : 296.8mm;',
'}',
''
].join('\n')
},
{
name : 'Square Page Size',
icon : 'far fa-file',
gen : ['<style>',
' .page {',
' width:5.25in;',
' height:5.25in;',
' padding:.5in;',
' columns:unset;',
' }',
'</style>'
gen : ['/* Square Page Size */',
'.page {',
' width:5.25in;',
' height:5.25in;',
' padding:.5in;',
' columns:unset;',
'}',
''
].join('\n')
},
{
name : 'Ink Friendly',
icon : 'fas fa-tint',
gen : ['<style>',
' .pages *:is(.page,.monster,.note,.descriptive) {',
' background:white !important;',
' }',
'</style>',
gen : ['/* Ink Friendly */',
'.pages *:is(.page,.monster,.note,.descriptive) {',
' background:white !important;',
' box-shadow:0px 0px 3px !important;',
'}',
'',
'.page .note:before {',
' box-shadow:0px 0px 3px;',
'}',
''
].join('\n')
},

View File

@@ -271,24 +271,36 @@ module.exports = [
view : 'style',
snippets : [
{
name : 'A4 PageSize',
name : 'A4 Page Size',
icon : 'far fa-file',
gen : ['<style>',
' .phb{',
gen : ['/* A4 Page Size */',
'.phb {',
' width : 210mm;',
' height : 296.8mm;',
' }',
'</style>'
'}'
].join('\n')
},
{
name : 'Square Page Size',
icon : 'far fa-file',
gen : ['/* Square Page Size */',
'.phb {',
' width:5.25in;',
' height:5.25in;',
' padding:.5in;',
' columns:unset;',
'}',
''
].join('\n')
},
{
name : 'Ink Friendly',
icon : 'fas fa-tint',
gen : ['<style>',
' .phb{ background : white;}',
' .phb img{ display : none;}',
' .phb hr+blockquote{background : white;}',
'</style>',
gen : ['/* Ink Friendly */',
'.phb, .phb blockquote, .phb hr+blockquote {',
' background : white;',
' box-shadow : 0px 0px 3px;',
'}',
''
].join('\n')
},