0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-30 04:32:38 +00:00

Add "Style Editor" menu to Style pane

And other tweaks:
- Move drop caps snippets to Style Editor menu
- retitle Editor menu to either Text Editor or Style Editor
- minor:  removed old unnecessary comments in code from earlier (my own).
- Removed leading spaces on drop cap comment
- added drop cap comment on "remove drop caps" snippet.
This commit is contained in:
Gazook89
2021-08-14 19:50:12 -05:00
parent 88c485ffe5
commit 143d390895

View File

@@ -12,7 +12,7 @@ const dedent = require('dedent-tabs').default;
module.exports = [ module.exports = [
{ {
groupName : 'Editor', groupName : 'Text Editor',
icon : 'fas fa-pencil-alt', icon : 'fas fa-pencil-alt',
view : 'text', view : 'text',
snippets : [ snippets : [
@@ -91,34 +91,45 @@ module.exports = [
icon : 'fas fa-book', icon : 'fas fa-book',
gen : TableOfContentsGen gen : TableOfContentsGen
}, },
{
name : 'Add Comment',
icon : 'fas fa-code',
gen : dedent`\n
<!-- This is a comment that will not be rendered into your brew. Hotkey (Ctrl/Cmd + /). -->
`
},
]
},
{
groupName : 'Style Editor',
icon : 'fas fa-pencil-alt',
view : 'style',
snippets : [
{ {
name : 'Remove Drop Cap', name : 'Remove Drop Cap',
icon : 'fas fa-remove-format', icon : 'fas fa-remove-format',
gen : '<style>\n' + gen : '/* Removes Drop Caps */\n' +
' .phb3 h1+p:first-letter {\n' + '.phb3 h1+p:first-letter {\n' +
' all: unset;\n' + ' all: unset;\n' +
' }\n' + '}\n'
'</style>'
}, },
{ {
name : 'Tweak Drop Cap', name : 'Tweak Drop Cap',
icon : 'fas fa-sliders-h', icon : 'fas fa-sliders-h',
gen : '<style>\n' + gen : '/* Drop Cap settings */\n' +
' /* Drop Cap settings */\n' + '.phb3 h1 + p::first-letter {\n' +
' .phb3 h1 + p::first-letter {\n' + ' float: left;\n' +
' float: left;\n' + ' font-family: SolberaImitationRemake;\n' +
' font-family: SolberaImitationRemake;\n' + ' font-size: 3.5cm;\n' +
' font-size: 3.5cm;\n' + ' color: #222;\n' +
' color: #222;\n' + ' line-height: .8em;\n' +
' line-height: .8em;\n' + '}\n'
' }\n' +
'</style>'
}, },
{ {
name : 'Add Comment', name : 'Add Comment',
icon : 'fas fa-code', /* might need to be fa-solid fa-comment-code --not sure, Gazook */ icon : 'fas fa-code',
gen : dedent`\n gen : dedent`\n
<!-- This is a comment that will not be rendered into your brew. Hotkey (Ctrl/Cmd + /). --> /* This is a comment that will not be rendered into your brew. Hotkey (Ctrl/Cmd + /). */
` `
}, },
] ]