diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 988853f7..6a9fdbe1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -56,11 +56,23 @@ $ cargo run --example generate_sublime synpack ../../sublime/syntaxes ../../subl ### Adding a theme A gallery containing lots of themes is located at https://tmtheme-editor.herokuapp.com/#!/editor/theme/Agola%20Dark. -More themes can be easily added to Zola, just make a PR with the wanted theme added in the `sublime_themes` directory -and run the following command from the root of the components/config: +More themes can be easily added to Zola, just make a PR with the wanted theme added in the `sublime_themes` directory. + +If you want to test Zola with a new theme, it needs to be built into the syntect file `all.themedump`. + +First build the tool to generate the syntect file: ```bash -$ cargo run --example generate_sublime themepack ../../sublime/themes ../../sublime/themes/all.themedump +$ git clone https://github.com/getzola/zola.git && cd zola/components/config +$ cargo build --example generate_sublime +``` + +copy your theme in `sublime/themes/`, then regenerate the syntect file: + +``` bash +$ ./target/debug/examples/generate_sublime themepack sublime/themes/ sublime/themes/all.themedump ``` You should see the list of themes being added. + +To test your new theme, rebuild Zola with `cargo build`. diff --git a/sublime/themes/all.themedump b/sublime/themes/all.themedump index a79c10bd..e585213c 100644 Binary files a/sublime/themes/all.themedump and b/sublime/themes/all.themedump differ diff --git a/sublime/themes/green.tmTheme b/sublime/themes/green.tmTheme new file mode 100644 index 00000000..be827d9c --- /dev/null +++ b/sublime/themes/green.tmTheme @@ -0,0 +1,160 @@ + + + + + + + + + name + Green + settings + + + settings + + background + #1B1D16 + caret + #F8FFE2 + foreground + #D7FF68 + invisibles + #808080 + lineHighlight + #2B321C + selection + #3C4822 + + + + name + Comment + scope + comment + settings + + fontStyle + + foreground + #738939 + + + + name + Keyword + scope + keyword, storage + settings + + fontStyle + + foreground + #9DC443 + + + + name + Number + scope + constant.numeric + settings + + fontStyle + + foreground + #E6FFA4 + + + + name + Constant + scope + constant + settings + + fontStyle + + foreground + #E6FFA4 + + + + name + String + scope + string + settings + + fontStyle + + foreground + #E6FFA4 + + + + name + Invalid + scope + invalid + settings + + background + #990000 + foreground + #FFFFFF + + + + name + Diff Header + scope + meta.diff.header, meta.separator.diff, meta.diff.index, meta.diff.range + settings + + background + #2F33AB + + + + name + diff.deleted + scope + markup.deleted + settings + + foreground + #F92672 + + + + name + diff.inserted + scope + markup.inserted + settings + + foreground + #A6E22E + + + + name + diff.changed + scope + markup.changed + settings + + foreground + #967EFB + + + + uuid + 15675CF3-9DE0-420B-8863-DDF5AFA1D7CA + colorSpaceName + sRGB + semanticClass + theme.dark.green + + \ No newline at end of file diff --git a/sublime/themes/railsbase16-green-screen-dark.tmTheme b/sublime/themes/railsbase16-green-screen-dark.tmTheme new file mode 100644 index 00000000..eb34364c --- /dev/null +++ b/sublime/themes/railsbase16-green-screen-dark.tmTheme @@ -0,0 +1,726 @@ + + + + + + + + + author + Chris Kempson (http://chriskempson.com) + name + RailsBase16 Green Screen Dark + semanticClass + theme.dark.rails_base16_green_screen_dark + colorSpaceName + sRGB + gutterSettings + + background + #003300 + divider + #003300 + foreground + #007700 + selectionBackground + #005500 + selectionForeground + #009900 + + settings + + + settings + + background + #001100 + caret + #00bb00 + foreground + #00bb00 + invisibles + #007700 + lineHighlight + #003300 + selection + #005500 + + + + name + Text + scope + variable.parameter.function, meta.function.parameters variable.parameter + settings + + foreground + #00bb00 + + + + name + Comments + scope + comment, punctuation.definition.comment + settings + + foreground + #007700 + fontStyle + italic + + + + name + Punctuation + scope + punctuation.definition.variable, punctuation.definition.parameters, punctuation.definition.array, punctuation.definition.constant, punctuation.definition.keyword, punctuation.definition.entity, punctuationctuation.definition.entity.css, punctuation.section.function, punctuation.separator + settings + + foreground + #00bb00 + + + + name + Delimiters + scope + none + settings + + foreground + #00bb00 + + + + name + Operators + scope + keyword.operator + settings + + foreground + #005500 + + + + name + Keywords + scope + keyword + settings + + foreground + #00bb00 + + + + name + Variables + scope + variable + settings + + foreground + #007700 + + + + name + Functions + scope + entity.name.function, meta.require, support.function.any-method + settings + + foreground + #009900 + + + + name + Functions Invocations (Elixir) + scope + source.elixir entity.name.function.elixir + settings + + foreground + #00bb00 + + + + name + Classes + scope + support.class, entity.name.class, entity.name.type.class, entity.name.module, entity.name.type.module + settings + + foreground + #007700 + + + + name + Inherited Class + scope + entity.other.inherited-class + settings + + foreground + #007700 + + + + name + Class and Module Namespace separators + scope + meta.module entity.name.module punctuation.accessor.ruby, meta.class entity.name.class punctuation.accessor.ruby, meta.class entity.other.inherited-class punctuation.accessor.ruby + settings + + foreground + #00bb00 + + + + name + Classes + scope + meta.class + settings + + foreground + #00ff00 + + + + name + Methods + scope + keyword.other.special-method + settings + + foreground + #009900 + + + + name + Storage + scope + storage + settings + + foreground + #00bb00 + + + + name + Support + scope + support.function + settings + + foreground + #005500 + + + + name + Builtin Function + scope + support.function.builtin + settings + + foreground + #00bb00 + + + + name + Strings + scope + string, string source string + settings + + foreground + #00bb00 + + + + name + Symbols + scope + constant.other.symbol + settings + + foreground + #009900 + + + + name + Integers + scope + constant.numeric + settings + + foreground + #009900 + + + + name + Floats + scope + none + settings + + foreground + #009900 + + + + name + Boolean + scope + none + settings + + foreground + #009900 + + + + name + Constants + scope + constant + settings + + foreground + #009900 + + + + name + Tags + scope + entity.name.tag + settings + + foreground + #007700 + + + + name + Haml Tags + scope + entity.name.tag.haml + settings + + foreground + #007700 + + + + name + Haml Class + scope + entity.name.tag.class.haml + settings + + foreground + #007700 + + + + name + Haml Id + scope + entity.name.tag.id.haml + settings + + foreground + #009900 + + + + name + Attributes + scope + entity.other.attribute-name + settings + + foreground + #009900 + + + + name + Attribute IDs + scope + entity.other.attribute-name.id + settings + + foreground + #009900 + + + + name + Selector + scope + meta.selector + settings + + foreground + #00bb00 + + + + name + Values + scope + none + settings + + foreground + #009900 + + + + name + Headings + scope + markup.heading punctuation.definition.heading, entity.name.section + settings + + fontStyle + + foreground + #009900 + + + + name + Units + scope + keyword.other.unit + settings + + foreground + #007700 + + + + name + Bold + scope + markup.bold, punctuation.definition.bold + settings + + fontStyle + bold + foreground + #007700 + + + + name + Italic + scope + markup.italic, punctuation.definition.italic + settings + + fontStyle + italic + foreground + #00bb00 + + + + name + Code + scope + markup.raw.inline + settings + + foreground + #00bb00 + + + + name + Link Text + scope + string.other.link + settings + + foreground + #007700 + + + + name + Link Url + scope + meta.link + settings + + foreground + #009900 + + + + name + Lists + scope + markup.list + settings + + foreground + #007700 + + + + name + Quotes + scope + markup.quote + settings + + foreground + #009900 + + + + name + Separator + scope + meta.separator + settings + + background + #005500 + foreground + #00bb00 + + + + name + Inserted + scope + markup.inserted + settings + + foreground + #00bb00 + + + + name + Deleted + scope + markup.deleted + settings + + foreground + #007700 + + + + name + Changed + scope + markup.changed + settings + + foreground + #00bb00 + + + + name + Colors + scope + constant.other.color, punctuation.definition.constant.scss + settings + + foreground + #005500 + + + + name + Regular Expressions + scope + string.regexp + settings + + foreground + #005500 + + + + name + Escape Characters + scope + constant.character.escape + settings + + foreground + #005500 + + + + name + Embedded + scope + variable.interpolation + settings + + foreground + #005500 + + + + name + Invalid + scope + invalid.illegal + settings + + background + #007700 + foreground + #001100 + + + + name + Embedded Source + scope + string source, text source, source meta.interpolation source + settings + + foreground + #00bb00 + background + #003300 + + + + name + ERB tags + scope + text source punctuation.section.embedded, text string source punctuation.section.embedded + settings + + foreground + #007700 + + + + name + EEx tags + scope + + text meta.embedded punctuation.section.embedded.begin, + text meta.embedded punctuation.section.embedded.end, + text meta.embedded punctuation.section.embedded.end.elixir source.elixir + + settings + + foreground + #007700 + background + #003300 + + + + name + String Interpolation Chars (Ruby) + scope + source.ruby meta.interpolation punctuation.section.interpolation.begin, source.ruby meta.interpolation punctuation.section.interpolation.end + settings + + foreground + #00ff00 + background + #003300 + + + + name + String Interpolation Chars (Elixir) + scope + source.elixir string punctuation.section.embedded.begin, source.elixir string punctuation.section.embedded.end + settings + + foreground + #00ff00 + background + #003300 + + + + name + SCSS variable + scope + variable.scss + settings + + foreground + #007700 + + + + name + Support Constant + scope + support.constant + settings + + foreground + #009900 + + + + name + Block Variables + scope + variable.other.block, meta.block.parameters variable.parameter.ruby + settings + + foreground + #00ff00 + + + + name + Constant Variables + scope + meta.constant entity.name.constant.ruby, variable.other.constant.ruby + settings + + foreground + #007700 + + + + name + Elixir Protocol Names + scope + entity.name.type.protocol.elixir + settings + + foreground + #007700 + + + + uuid + 26a61b83-b1a6-495a-9f68-157b17ec3d74 + + \ No newline at end of file