diff --git a/plugins/admin/CHANGELOG.md b/plugins/admin/CHANGELOG.md index 0a57a76..d0f8820 100644 --- a/plugins/admin/CHANGELOG.md +++ b/plugins/admin/CHANGELOG.md @@ -1,3 +1,9 @@ +# v1.10.36 +## 09/08/2022 + +1. [](#bugfix) + * Fixed `fieldset.html.twig` not rendering with `markdown: false` [#2313](https://github.com/getgrav/grav-plugin-admin/pull/2313) + # v1.10.35 ## 08/04/2022 diff --git a/plugins/admin/blueprints.yaml b/plugins/admin/blueprints.yaml index 3a4bec4..c7a2035 100644 --- a/plugins/admin/blueprints.yaml +++ b/plugins/admin/blueprints.yaml @@ -1,7 +1,7 @@ name: Admin Panel slug: admin type: plugin -version: 1.10.35 +version: 1.10.36 description: Adds an advanced administration panel to manage your site icon: empire author: diff --git a/plugins/admin/themes/grav/templates/forms/fields/fieldset/fieldset.html.twig b/plugins/admin/themes/grav/templates/forms/fields/fieldset/fieldset.html.twig index aa030d1..5c5a18e 100644 --- a/plugins/admin/themes/grav/templates/forms/fields/fieldset/fieldset.html.twig +++ b/plugins/admin/themes/grav/templates/forms/fields/fieldset/fieldset.html.twig @@ -49,7 +49,7 @@ {% block group %} {% if field.text %} - {{ field.markdown ? field.text|t|markdown : ('
' ~ field.t ~ '
')|raw }} + {{ field.markdown ? field.text|t|markdown : ('' ~ field.text|t ~ '
')|raw }} {% endif %} {% if field.fields %} diff --git a/plugins/flex-objects/CHANGELOG.md b/plugins/flex-objects/CHANGELOG.md index cbb0cc7..66dd8af 100644 --- a/plugins/flex-objects/CHANGELOG.md +++ b/plugins/flex-objects/CHANGELOG.md @@ -1,3 +1,9 @@ +# v1.3.1 +## 09/08/2022 + +1. [](#bugfix) + * Fixed `covnertUrls` action + # v1.3.0 ## 06/14/2022 diff --git a/plugins/flex-objects/blueprints.yaml b/plugins/flex-objects/blueprints.yaml index 15a7d47..d5e9261 100644 --- a/plugins/flex-objects/blueprints.yaml +++ b/plugins/flex-objects/blueprints.yaml @@ -1,7 +1,7 @@ name: Flex Objects slug: flex-objects type: plugin -version: 1.3.0 +version: 1.3.1 description: Flex Objects plugin allows you to manage Flex Objects in Grav Admin. icon: list-alt author: diff --git a/plugins/flex-objects/classes/Admin/AdminController.php b/plugins/flex-objects/classes/Admin/AdminController.php index c9602a2..1313cbc 100644 --- a/plugins/flex-objects/classes/Admin/AdminController.php +++ b/plugins/flex-objects/classes/Admin/AdminController.php @@ -1040,7 +1040,7 @@ class AdminController * * @return ResponseInterface */ - public function taskConvertUrls(): ResponseInterface + public function actionConvertUrls(): ResponseInterface { $directory = $this->getDirectory(); if (!$directory) { diff --git a/plugins/form/CHANGELOG.md b/plugins/form/CHANGELOG.md index b5d8ac7..1e0d3d3 100644 --- a/plugins/form/CHANGELOG.md +++ b/plugins/form/CHANGELOG.md @@ -1,3 +1,9 @@ +# v6.0.4 +## 08/08/2022 + +1. [](#improved) + * Added `attributes` to field [#573](https://github.com/getgrav/grav-plugin-form/pull/573) + # v6.0.3 ## 05/05/2022 diff --git a/plugins/form/blueprints.yaml b/plugins/form/blueprints.yaml index e807dd5..853a3e8 100644 --- a/plugins/form/blueprints.yaml +++ b/plugins/form/blueprints.yaml @@ -1,8 +1,8 @@ name: Form slug: form type: plugin -version: 6.0.3 -description: Enables the forms handling +version: 6.0.4 +description: Enables forms handling and processing icon: check-square author: name: Team Grav diff --git a/plugins/form/templates/forms/fields/select/select.html.twig b/plugins/form/templates/forms/fields/select/select.html.twig index dbe484a..24f94a2 100644 --- a/plugins/form/templates/forms/fields/select/select.html.twig +++ b/plugins/form/templates/forms/fields/select/select.html.twig @@ -28,6 +28,11 @@ data-{{ datakey }}="{{ datavalue|e('html_attr') }}" {% endfor %} {% endif %} + {% if field.attributes %} + {% for key, value in field.attributes %} + {{ key }}="{{ value|e('html_attr') }}" + {% endfor %} + {% endif %} > {% if field.placeholder %}{% endif %} diff --git a/plugins/prism-highlight/CHANGELOG.md b/plugins/prism-highlight/CHANGELOG.md index 15b5756..b5b0782 100644 --- a/plugins/prism-highlight/CHANGELOG.md +++ b/plugins/prism-highlight/CHANGELOG.md @@ -1,3 +1,13 @@ +# v3.0.0 +## 08/23/2022 + +1. [](#new) + * Added support for custom-built JS, CSS, and Theme files + * Instructions on how to modify/build/use custom-built JS and CSS files + * Upgraded to latest PrismJS `1.29.0` + * Added 7 new themes: `gruvbox-light`, `holi-theme`, `laserwave`, `one-dark`, `one-light`, `soloarized-dark-atom`, and `z-touch` + * Changed default theme to `prism-one-light.css` + # v2.0.6 ## 02/22/2022 diff --git a/plugins/prism-highlight/README.md b/plugins/prism-highlight/README.md index 0215451..f8ecfa0 100644 --- a/plugins/prism-highlight/README.md +++ b/plugins/prism-highlight/README.md @@ -216,6 +216,10 @@ Configuration shall be set in `config/plugins/prism-highlight.yaml`. enabled: true theme: prism-base16-ocean.dark.css all-pre-blocks: true +custom: + js_location: 'user://data/prism-highlight/prism.js' + css_location: 'user://data/prism-highlight/prism.css' + theme_location: 'user://data/prism-highlight/custom-theme.css' plugins: line-numbers: false command-line: false @@ -405,7 +409,10 @@ prism-duotone-space.css prism-funky.css prism-ghcolors.css prism-gruvbox-dark.css +prism-gruvbox-light.css +prism-holi-theme.css prism-hopscotch.css +prism-laserwave.css prism-lucario.css prism-material-dark.css prism-material-light.css @@ -413,8 +420,11 @@ prism-material-oceanic.css prism-night-owl.css prism-nord.css prism-okaidia.css +prism-one-dark.css +prism-one-light.css prism-pojoaque.css prism-shades-of-purple.css +prism-solarized-dark-atom.css prism-solarizedlight.css prism-synthwave84.css prism-tomorrow.css @@ -422,8 +432,30 @@ prism-twilight.css prism-vs.css prism-vsc-dark-plus.css prism-xonokai.css +prism-z-touch.css ``` Check out a [live test](http://prismjs.com/test.html) or a [live demo](http://prismjs.com/index.html#examples). +## Customizaton of languages, plugins and built-in themes +To customize the Prism you will need to customize the `prism.js` file. This requires cloning our Forked repository (it contains some extra languages and styling tweaks) from: https://github.com/getgrav/prism + +Then run the following commands: + +```shell +npm run build +npm run start +``` + +The second command starts a built-in webserver. Locate the `prism.js` file included in this plugin, and view the source, Find the build URL and paste that into your browser. It should look something like: + +``` +http://127.0.0.1:8080/download.html#themes=prism&languages=markup+css+clike+javascript+apacheconf+bash+bbcode+c+csharp+cpp+coffeescript+css-extras+diff+docker+ecscript+git+go+java+json+json5+less+lua+markdown+markup-templating+php+php-extras+python+regex+ruby+sass+scss+sql+twig+yaml&plugins=line-highlight+line-numbers+command-line+toolbar+copy-to-clipboard +``` + +This pre-configures the languages, plugins, etc. + +Make your changes, including adding additional languages, plugins etc. Then click **DOWNLOAD JS** and **DOWNLOAD CSS** buttons and upload your copies to a safe location, e.g. `/user/data/prims-highlight/`. + +You can then edit the configuration of the `prism-highlight` plugin and point the `custom.js_location` and `custom.css_location` options to the custom file locations (default is already `user://data/prismjs` folder). diff --git a/plugins/prism-highlight/blueprints.yaml b/plugins/prism-highlight/blueprints.yaml index 85de027..90653df 100644 --- a/plugins/prism-highlight/blueprints.yaml +++ b/plugins/prism-highlight/blueprints.yaml @@ -1,5 +1,7 @@ -name: Prism Highlighter -version: 2.0.6 +name: Prism Highlight +slug: prism-highlight +type: plugin +version: 3.0.0 description: "This plugin provides code highlighting functionality via the [Prism.js](http://prismjs.com/) syntax highlighter with lots of themes and plugins." icon: code author: @@ -28,7 +30,7 @@ form: theme: type: select label: CSS Theme - default: prism-base16-ocean.dark.css + default: prism-one-light.css size: large data-options@: '\Grav\Plugin\PrismHighlightPlugin::themeOptions' @@ -75,5 +77,23 @@ form: size: small label: Command Line Prompt + section_advanced: + type: section + title: Advanced + underline: true + fields: + custom.js_location: + type: text + label: Custom JS location + default: user://data/prism-highlight/prism.js + custom.css_location: + type: text + label: Custom CSS location + default: user://data/prism-highlight/prism.css + custom.theme_location: + type: text + label: Custom CSS location + default: user://data/prism-highlight/prism.css + diff --git a/plugins/prism-highlight/css/prism.css b/plugins/prism-highlight/css/prism.css index dd95787..3a55013 100644 --- a/plugins/prism-highlight/css/prism.css +++ b/plugins/prism-highlight/css/prism.css @@ -1,7 +1,7 @@ -/* PrismJS 1.27.0 -http://127.0.0.1:8081/download.html#themes=prism&languages=markup+css+clike+javascript+apacheconf+bash+bbcode+c+csharp+cpp+coffeescript+css-extras+diff+docker+ecscript+git+go+java+json+json5+less+lua+markdown+markup-templating+php+php-extras+python+regex+ruby+sass+scss+sql+twig+yaml&plugins=line-highlight+line-numbers+command-line+toolbar+copy-to-clipboard */ +/* PrismJS 1.29.0 +http://127.0.0.1:8080/download.html#themes=prism&languages=markup+css+clike+javascript+apacheconf+bash+bbcode+c+csharp+cpp+coffeescript+css-extras+diff+docker+ecscript+git+go+java+json+json5+less+lua+markdown+markup-templating+php+php-extras+python+regex+ruby+sass+scss+sql+twig+yaml&plugins=line-highlight+line-numbers+command-line+toolbar+copy-to-clipboard */ code[class*=language-],pre[class*=language-]{color:#000;background:0 0;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help} pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}@media print{.line-highlight{-webkit-print-color-adjust:exact;color-adjust:exact}}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:#f4f1ef;font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px #fff}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:after,.line-numbers .line-highlight:before{content:none}pre[id].linkable-line-numbers span.line-numbers-rows{pointer-events:all}pre[id].linkable-line-numbers span.line-numbers-rows>span:before{cursor:pointer}pre[id].linkable-line-numbers span.line-numbers-rows>span:hover:before{background-color:rgba(128,128,128,.2)} pre[class*=language-].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right} -.command-line-prompt{border-right:1px solid #999;display:block;float:left;font-size:100%;letter-spacing:-1px;margin-right:1em;pointer-events:none;text-align:right;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.command-line-prompt>span:before{opacity:.4;content:' ';display:block;padding-right:.8em}.command-line-prompt>span[data-user]:before{content:"[" attr(data-user) "@" attr(data-host) "] $"}.command-line-prompt>span[data-user=root]:before{content:"[" attr(data-user) "@" attr(data-host) "] #"}.command-line-prompt>span[data-prompt]:before{content:attr(data-prompt)}.command-line-prompt>span[data-continuation-prompt]:before{content:attr(data-continuation-prompt)}.command-line span.token.output{opacity:.7} +.command-line-prompt{border-right:1px solid #999;display:block;float:left;font-size:100%;letter-spacing:-1px;margin-right:1em;pointer-events:none;text-align:right;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.command-line-prompt>span:before{opacity:.7;content:' ';display:block;padding-right:.8em}.command-line-prompt>span[data-user]:before{content:"[" attr(data-user) "@" attr(data-host) "] $"}.command-line-prompt>span[data-user=root]:before{content:"[" attr(data-user) "@" attr(data-host) "] #"}.command-line-prompt>span[data-prompt]:before{content:attr(data-prompt)}.command-line-prompt>span[data-continuation-prompt]:before{content:attr(data-continuation-prompt)}.command-line span.token.output{opacity:.7} div.code-toolbar{position:relative}div.code-toolbar>.toolbar{position:absolute;z-index:10;top:.3em;right:.2em;transition:opacity .3s ease-in-out;opacity:0}div.code-toolbar:hover>.toolbar{opacity:1}div.code-toolbar:focus-within>.toolbar{opacity:1}div.code-toolbar>.toolbar>.toolbar-item{display:inline-block}div.code-toolbar>.toolbar>.toolbar-item>a{cursor:pointer}div.code-toolbar>.toolbar>.toolbar-item>button{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar>.toolbar>.toolbar-item>a,div.code-toolbar>.toolbar>.toolbar-item>button,div.code-toolbar>.toolbar>.toolbar-item>span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,.2);box-shadow:0 2px 0 0 rgba(0,0,0,.2);border-radius:.5em}div.code-toolbar>.toolbar>.toolbar-item>a:focus,div.code-toolbar>.toolbar>.toolbar-item>a:hover,div.code-toolbar>.toolbar>.toolbar-item>button:focus,div.code-toolbar>.toolbar>.toolbar-item>button:hover,div.code-toolbar>.toolbar>.toolbar-item>span:focus,div.code-toolbar>.toolbar>.toolbar-item>span:hover{color:inherit;text-decoration:none} diff --git a/plugins/prism-highlight/css/themes/prism-atom-dark.css b/plugins/prism-highlight/css/themes/prism-atom-dark.css index 10acc43..749b17c 100644 --- a/plugins/prism-highlight/css/themes/prism-atom-dark.css +++ b/plugins/prism-highlight/css/themes/prism-atom-dark.css @@ -8,7 +8,7 @@ code[class*="language-"], pre[class*="language-"] { color: #c5c8c6; text-shadow: 0 1px rgba(0, 0, 0, 0.3); - font-family: Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace; + font-family: Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace; direction: ltr; text-align: left; white-space: pre; @@ -63,7 +63,7 @@ pre[class*="language-"] { .token.property, .token.keyword, .token.tag { - color: #96CBFE; + color: #96CBFE; } .token.class-name { @@ -73,7 +73,7 @@ pre[class*="language-"] { .token.boolean, .token.constant { - color: #99CC99; + color: #99CC99; } .token.symbol, @@ -99,16 +99,16 @@ pre[class*="language-"] { } .token.operator { - color: #EDEDED; + color: #EDEDED; } .token.entity { - color: #FFFFB6; - /* text-decoration: underline; */ + color: #FFFFB6; + cursor: help; } .token.url { - color: #96CBFE; + color: #96CBFE; } .language-css .token.string, @@ -118,7 +118,7 @@ pre[class*="language-"] { .token.atrule, .token.attr-value { - color: #F9EE98; + color: #F9EE98; } .token.function { @@ -126,7 +126,7 @@ pre[class*="language-"] { } .token.regex { - color: #E9C062; + color: #E9C062; } .token.important { @@ -137,10 +137,7 @@ pre[class*="language-"] { .token.bold { font-weight: bold; } + .token.italic { font-style: italic; } - -.token.entity { - cursor: help; -} diff --git a/plugins/prism-highlight/css/themes/prism-base16-ateliersulphurpool.light.css b/plugins/prism-highlight/css/themes/prism-base16-ateliersulphurpool.light.css index 0ba8d5b..34851af 100644 --- a/plugins/prism-highlight/css/themes/prism-base16-ateliersulphurpool.light.css +++ b/plugins/prism-highlight/css/themes/prism-base16-ateliersulphurpool.light.css @@ -9,95 +9,100 @@ Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/b */ code[class*="language-"], pre[class*="language-"] { - font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace; - font-size: 14px; - line-height: 1.3; - direction: ltr; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; - -webkit-hyphens: none; - -ms-hyphens: none; - hyphens: none; - background: #f5f7ff; - color: #5e6687; + font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace; + font-size: 14px; + line-height: 1.375; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; + background: #f5f7ff; + color: #5e6687; +} + +pre > code[class*="language-"] { + font-size: 1em; } pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { - text-shadow: none; - background: #dfe2f1; + text-shadow: none; + background: #dfe2f1; } pre[class*="language-"]::selection, pre[class*="language-"] ::selection, code[class*="language-"]::selection, code[class*="language-"] ::selection { - text-shadow: none; - background: #dfe2f1; + text-shadow: none; + background: #dfe2f1; } /* Code blocks */ pre[class*="language-"] { - padding: 1em; - margin: .5em 0; - overflow: auto; + padding: 1em; + margin: .5em 0; + overflow: auto; } /* Inline code */ :not(pre) > code[class*="language-"] { - padding: .1em; - border-radius: .3em; + padding: .1em; + border-radius: .3em; } .token.comment, .token.prolog, .token.doctype, .token.cdata { - color: #898ea4; + color: #898ea4; } .token.punctuation { - color: #5e6687; + color: #5e6687; } .token.namespace { - opacity: .7; + opacity: .7; } .token.operator, .token.boolean, .token.number { - color: #c76b29; + color: #c76b29; } .token.property { - color: #c08b30; + color: #c08b30; } .token.tag { - color: #3d8fd1; + color: #3d8fd1; } .token.string { - color: #22a2c9; + color: #22a2c9; } .token.selector { - color: #6679cc; + color: #6679cc; } .token.attr-name { - color: #c76b29; + color: #c76b29; } .token.entity, .token.url, .language-css .token.string, .style .token.string { - color: #22a2c9; + color: #22a2c9; } .token.attr-value, @@ -105,61 +110,67 @@ pre[class*="language-"] { .token.control, .token.directive, .token.unit { - color: #ac9739; + color: #ac9739; } .token.statement, .token.regex, .token.atrule { - color: #22a2c9; + color: #22a2c9; } .token.placeholder, .token.variable { - color: #3d8fd1; + color: #3d8fd1; } .token.deleted { - text-decoration: line-through; + text-decoration: line-through; } .token.inserted { - border-bottom: 1px dotted #202746; - text-decoration: none; + border-bottom: 1px dotted #202746; + text-decoration: none; } .token.italic { - font-style: italic; + font-style: italic; } .token.important, .token.bold { - font-weight: bold; + font-weight: bold; } .token.important { - color: #c94922; + color: #c94922; } .token.entity { - cursor: help; + cursor: help; } pre > code.highlight { - outline: 0.4em solid #c94922; - outline-offset: .4em; + outline: 0.4em solid #c94922; + outline-offset: .4em; } -.line-numbers .line-numbers-rows { - border-right-color: #dfe2f1 !important; +/* overrides color-values for the Line Numbers plugin + * http://prismjs.com/plugins/line-numbers/ + */ +.line-numbers.line-numbers .line-numbers-rows { + border-right-color: #dfe2f1; } -.line-numbers-rows > span:before { - color: #979db4 !important; +.line-numbers .line-numbers-rows > span:before { + color: #979db4; } -.line-highlight { - background: rgba(32, 39, 70, 0.2) !important; - background: -webkit-linear-gradient(left, rgba(32, 39, 70, 0.2) 70%, rgba(32, 39, 70, 0)) !important; - background: linear-gradient(to right, rgba(32, 39, 70, 0.2) 70%, rgba(32, 39, 70, 0)) !important; +/* overrides color-values for the Line Highlight plugin + * http://prismjs.com/plugins/line-highlight/ + */ +.line-highlight.line-highlight { + background: rgba(107, 115, 148, 0.2); + background: -webkit-linear-gradient(left, rgba(107, 115, 148, 0.2) 70%, rgba(107, 115, 148, 0)); + background: linear-gradient(to right, rgba(107, 115, 148, 0.2) 70%, rgba(107, 115, 148, 0)); } diff --git a/plugins/prism-highlight/css/themes/prism-cb.css b/plugins/prism-highlight/css/themes/prism-cb.css index 9c2a15b..146efe5 100644 --- a/plugins/prism-highlight/css/themes/prism-cb.css +++ b/plugins/prism-highlight/css/themes/prism-cb.css @@ -125,52 +125,22 @@ pre[class*="language-"] { } /* Line highlight plugin */ -pre[data-line] { - position: relative; - padding: 1em 0 1em 3em; -} - -.line-highlight { - position: absolute; - left: 0; - right: 0; - margin-top: 1em; /* Same as .prism's padding-top */ +.line-highlight.line-highlight { background: rgba(255, 255, 255, .2); - pointer-events: none; - line-height: inherit; - white-space: pre; } -.line-highlight:before, -.line-highlight[data-end]:after { - content: attr(data-start); - position: absolute; +.line-highlight.line-highlight:before, +.line-highlight.line-highlight[data-end]:after { top: .3em; - left: .6em; - min-width: 1em; - padding: 0 .5em; background-color: rgba(255, 255, 255, .3); color: #fff; - font: bold 65%/1.5 sans-serif; - text-align: center; -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; - text-shadow: none; -} - -.line-highlight[data-end]:after { - content: attr(data-end); - top: auto; - bottom: .4em; } /* for line numbers */ -.line-numbers-rows { - margin: 0; -} - -.line-numbers-rows span { - padding-right: 10px; +/* span instead of span:before for a two-toned border */ +.line-numbers .line-numbers-rows > span { border-right: 3px #d9d336 solid; } diff --git a/plugins/prism-highlight/css/themes/prism-coldark-cold.css b/plugins/prism-highlight/css/themes/prism-coldark-cold.css index c948a62..39e2232 100644 --- a/plugins/prism-highlight/css/themes/prism-coldark-cold.css +++ b/plugins/prism-highlight/css/themes/prism-coldark-cold.css @@ -202,34 +202,34 @@ pre[class*="language-"] { /* overrides color-values for the Show Invisibles plugin * https://prismjs.com/plugins/show-invisibles/ */ -.token.tab:not(:empty):before, -.token.cr:before, -.token.lf:before, -.token.space:before { +.token.token.tab:not(:empty):before, +.token.token.cr:before, +.token.token.lf:before, +.token.token.space:before { color: #3c526d; } /* overrides color-values for the Toolbar plugin * https://prismjs.com/plugins/toolbar/ */ -div.code-toolbar > .toolbar a, -div.code-toolbar > .toolbar button { +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button { color: #e3eaf2; background: #005a8e; } -div.code-toolbar > .toolbar a:hover, -div.code-toolbar > .toolbar a:focus, -div.code-toolbar > .toolbar button:hover, -div.code-toolbar > .toolbar button:focus { +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus { color: #e3eaf2; background: #005a8eda; text-decoration: none; } -div.code-toolbar > .toolbar span, -div.code-toolbar > .toolbar span:hover, -div.code-toolbar > .toolbar span:focus { +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus { color: #e3eaf2; background: #3c526d; } @@ -237,81 +237,81 @@ div.code-toolbar > .toolbar span:focus { /* overrides color-values for the Line Highlight plugin * http://prismjs.com/plugins/line-highlight/ */ -.line-highlight { +.line-highlight.line-highlight { background: #8da1b92f; background: linear-gradient(to right, #8da1b92f 70%, #8da1b925); } -.line-highlight:before, -.line-highlight[data-end]:after { +.line-highlight.line-highlight:before, +.line-highlight.line-highlight[data-end]:after { background-color: #3c526d; color: #e3eaf2; box-shadow: 0 1px #8da1b9; } -pre[id].linkable-line-numbers span.line-numbers-rows > span:hover:before { +pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before { background-color: #3c526d1f; } /* overrides color-values for the Line Numbers plugin * http://prismjs.com/plugins/line-numbers/ */ -.line-numbers .line-numbers-rows { +.line-numbers.line-numbers .line-numbers-rows { border-right: 1px solid #8da1b97a; background: #d0dae77a; } -.line-numbers-rows > span:before { +.line-numbers .line-numbers-rows > span:before { color: #3c526dda; } /* overrides color-values for the Match Braces plugin * https://prismjs.com/plugins/match-braces/ */ -.rainbow-braces .token.punctuation.brace-level-1, -.rainbow-braces .token.punctuation.brace-level-5, -.rainbow-braces .token.punctuation.brace-level-9 { +.rainbow-braces .token.token.punctuation.brace-level-1, +.rainbow-braces .token.token.punctuation.brace-level-5, +.rainbow-braces .token.token.punctuation.brace-level-9 { color: #755f00; } -.rainbow-braces .token.punctuation.brace-level-2, -.rainbow-braces .token.punctuation.brace-level-6, -.rainbow-braces .token.punctuation.brace-level-10 { +.rainbow-braces .token.token.punctuation.brace-level-2, +.rainbow-braces .token.token.punctuation.brace-level-6, +.rainbow-braces .token.token.punctuation.brace-level-10 { color: #af00af; } -.rainbow-braces .token.punctuation.brace-level-3, -.rainbow-braces .token.punctuation.brace-level-7, -.rainbow-braces .token.punctuation.brace-level-11 { +.rainbow-braces .token.token.punctuation.brace-level-3, +.rainbow-braces .token.token.punctuation.brace-level-7, +.rainbow-braces .token.token.punctuation.brace-level-11 { color: #005a8e; } -.rainbow-braces .token.punctuation.brace-level-4, -.rainbow-braces .token.punctuation.brace-level-8, -.rainbow-braces .token.punctuation.brace-level-12 { +.rainbow-braces .token.token.punctuation.brace-level-4, +.rainbow-braces .token.token.punctuation.brace-level-8, +.rainbow-braces .token.token.punctuation.brace-level-12 { color: #7c00aa; } /* overrides color-values for the Diff Highlight plugin * https://prismjs.com/plugins/diff-highlight/ */ -pre.diff-highlight > code .token.deleted:not(.prefix), -pre > code.diff-highlight .token.deleted:not(.prefix) { +pre.diff-highlight > code .token.token.deleted:not(.prefix), +pre > code.diff-highlight .token.token.deleted:not(.prefix) { background-color: #c22f2e1f; } -pre.diff-highlight > code .token.inserted:not(.prefix), -pre > code.diff-highlight .token.inserted:not(.prefix) { +pre.diff-highlight > code .token.token.inserted:not(.prefix), +pre > code.diff-highlight .token.token.inserted:not(.prefix) { background-color: #116b001f; } /* overrides color-values for the Command Line plugin * https://prismjs.com/plugins/command-line/ */ -.command-line-prompt { +.command-line .command-line-prompt { border-right: 1px solid #8da1b97a; } -.command-line-prompt > span:before { +.command-line .command-line-prompt > span:before { color: #3c526dda; } diff --git a/plugins/prism-highlight/css/themes/prism-coldark-dark.css b/plugins/prism-highlight/css/themes/prism-coldark-dark.css index 2adcf57..39dd470 100644 --- a/plugins/prism-highlight/css/themes/prism-coldark-dark.css +++ b/plugins/prism-highlight/css/themes/prism-coldark-dark.css @@ -202,34 +202,34 @@ pre[class*="language-"] { /* overrides color-values for the Show Invisibles plugin * https://prismjs.com/plugins/show-invisibles/ */ -.token.tab:not(:empty):before, -.token.cr:before, -.token.lf:before, -.token.space:before { +.token.token.tab:not(:empty):before, +.token.token.cr:before, +.token.token.lf:before, +.token.token.space:before { color: #8da1b9; } /* overrides color-values for the Toolbar plugin * https://prismjs.com/plugins/toolbar/ */ -div.code-toolbar > .toolbar a, -div.code-toolbar > .toolbar button { +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button { color: #111b27; background: #6cb8e6; } -div.code-toolbar > .toolbar a:hover, -div.code-toolbar > .toolbar a:focus, -div.code-toolbar > .toolbar button:hover, -div.code-toolbar > .toolbar button:focus { +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus { color: #111b27; background: #6cb8e6da; text-decoration: none; } -div.code-toolbar > .toolbar span, -div.code-toolbar > .toolbar span:hover, -div.code-toolbar > .toolbar span:focus { +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus { color: #111b27; background: #8da1b9; } @@ -237,81 +237,81 @@ div.code-toolbar > .toolbar span:focus { /* overrides color-values for the Line Highlight plugin * http://prismjs.com/plugins/line-highlight/ */ -.line-highlight { +.line-highlight.line-highlight { background: #3c526d5f; background: linear-gradient(to right, #3c526d5f 70%, #3c526d55); } -.line-highlight:before, -.line-highlight[data-end]:after { +.line-highlight.line-highlight:before, +.line-highlight.line-highlight[data-end]:after { background-color: #8da1b9; color: #111b27; box-shadow: 0 1px #3c526d; } -pre[id].linkable-line-numbers span.line-numbers-rows > span:hover:before { +pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before { background-color: #8da1b918; } /* overrides color-values for the Line Numbers plugin * http://prismjs.com/plugins/line-numbers/ */ -.line-numbers .line-numbers-rows { +.line-numbers.line-numbers .line-numbers-rows { border-right: 1px solid #0b121b; background: #0b121b7a; } -.line-numbers-rows > span:before { +.line-numbers .line-numbers-rows > span:before { color: #8da1b9da; } /* overrides color-values for the Match Braces plugin * https://prismjs.com/plugins/match-braces/ */ -.rainbow-braces .token.punctuation.brace-level-1, -.rainbow-braces .token.punctuation.brace-level-5, -.rainbow-braces .token.punctuation.brace-level-9 { +.rainbow-braces .token.token.punctuation.brace-level-1, +.rainbow-braces .token.token.punctuation.brace-level-5, +.rainbow-braces .token.token.punctuation.brace-level-9 { color: #e6d37a; } -.rainbow-braces .token.punctuation.brace-level-2, -.rainbow-braces .token.punctuation.brace-level-6, -.rainbow-braces .token.punctuation.brace-level-10 { +.rainbow-braces .token.token.punctuation.brace-level-2, +.rainbow-braces .token.token.punctuation.brace-level-6, +.rainbow-braces .token.token.punctuation.brace-level-10 { color: #f4adf4; } -.rainbow-braces .token.punctuation.brace-level-3, -.rainbow-braces .token.punctuation.brace-level-7, -.rainbow-braces .token.punctuation.brace-level-11 { +.rainbow-braces .token.token.punctuation.brace-level-3, +.rainbow-braces .token.token.punctuation.brace-level-7, +.rainbow-braces .token.token.punctuation.brace-level-11 { color: #6cb8e6; } -.rainbow-braces .token.punctuation.brace-level-4, -.rainbow-braces .token.punctuation.brace-level-8, -.rainbow-braces .token.punctuation.brace-level-12 { +.rainbow-braces .token.token.punctuation.brace-level-4, +.rainbow-braces .token.token.punctuation.brace-level-8, +.rainbow-braces .token.token.punctuation.brace-level-12 { color: #c699e3; } /* overrides color-values for the Diff Highlight plugin * https://prismjs.com/plugins/diff-highlight/ */ -pre.diff-highlight > code .token.deleted:not(.prefix), -pre > code.diff-highlight .token.deleted:not(.prefix) { +pre.diff-highlight > code .token.token.deleted:not(.prefix), +pre > code.diff-highlight .token.token.deleted:not(.prefix) { background-color: #cd66601f; } -pre.diff-highlight > code .token.inserted:not(.prefix), -pre > code.diff-highlight .token.inserted:not(.prefix) { +pre.diff-highlight > code .token.token.inserted:not(.prefix), +pre > code.diff-highlight .token.token.inserted:not(.prefix) { background-color: #91d0761f; } /* overrides color-values for the Command Line plugin * https://prismjs.com/plugins/command-line/ */ -.command-line-prompt { +.command-line .command-line-prompt { border-right: 1px solid #0b121b; } -.command-line-prompt > span:before { +.command-line .command-line-prompt > span:before { color: #8da1b9da; } diff --git a/plugins/prism-highlight/css/themes/prism-duotone-dark.css b/plugins/prism-highlight/css/themes/prism-duotone-dark.css index db1dd1d..c4afe51 100644 --- a/plugins/prism-highlight/css/themes/prism-duotone-dark.css +++ b/plugins/prism-highlight/css/themes/prism-duotone-dark.css @@ -154,18 +154,18 @@ pre > code.highlight { /* overrides color-values for the Line Numbers plugin * http://prismjs.com/plugins/line-numbers/ */ -.line-numbers .line-numbers-rows { +.line-numbers.line-numbers .line-numbers-rows { border-right-color: #2c2937; } -.line-numbers-rows > span:before { +.line-numbers .line-numbers-rows > span:before { color: #3c3949; } /* overrides color-values for the Line Highlight plugin * http://prismjs.com/plugins/line-highlight/ */ -.line-highlight { +.line-highlight.line-highlight { background: rgba(224, 145, 66, 0.2); background: -webkit-linear-gradient(left, rgba(224, 145, 66, 0.2) 70%, rgba(224, 145, 66, 0)); background: linear-gradient(to right, rgba(224, 145, 66, 0.2) 70%, rgba(224, 145, 66, 0)); diff --git a/plugins/prism-highlight/css/themes/prism-duotone-earth.css b/plugins/prism-highlight/css/themes/prism-duotone-earth.css index 92fe664..3fd35d1 100644 --- a/plugins/prism-highlight/css/themes/prism-duotone-earth.css +++ b/plugins/prism-highlight/css/themes/prism-duotone-earth.css @@ -154,18 +154,18 @@ pre > code.highlight { /* overrides color-values for the Line Numbers plugin * http://prismjs.com/plugins/line-numbers/ */ -.line-numbers .line-numbers-rows { +.line-numbers.line-numbers .line-numbers-rows { border-right-color: #35302b; } -.line-numbers-rows > span:before { +.line-numbers .line-numbers-rows > span:before { color: #46403d; } /* overrides color-values for the Line Highlight plugin * http://prismjs.com/plugins/line-highlight/ */ -.line-highlight { +.line-highlight.line-highlight { background: rgba(191, 160, 90, 0.2); background: -webkit-linear-gradient(left, rgba(191, 160, 90, 0.2) 70%, rgba(191, 160, 90, 0)); background: linear-gradient(to right, rgba(191, 160, 90, 0.2) 70%, rgba(191, 160, 90, 0)); diff --git a/plugins/prism-highlight/css/themes/prism-duotone-forest.css b/plugins/prism-highlight/css/themes/prism-duotone-forest.css index c5f4281..2bf3b1d 100644 --- a/plugins/prism-highlight/css/themes/prism-duotone-forest.css +++ b/plugins/prism-highlight/css/themes/prism-duotone-forest.css @@ -154,18 +154,18 @@ pre > code.highlight { /* overrides color-values for the Line Numbers plugin * http://prismjs.com/plugins/line-numbers/ */ -.line-numbers .line-numbers-rows { +.line-numbers.line-numbers .line-numbers-rows { border-right-color: #2c302c; } -.line-numbers-rows > span:before { +.line-numbers .line-numbers-rows > span:before { color: #3b423b; } /* overrides color-values for the Line Highlight plugin * http://prismjs.com/plugins/line-highlight/ */ -.line-highlight { +.line-highlight.line-highlight { background: rgba(162, 179, 77, 0.2); background: -webkit-linear-gradient(left, rgba(162, 179, 77, 0.2) 70%, rgba(162, 179, 77, 0)); background: linear-gradient(to right, rgba(162, 179, 77, 0.2) 70%, rgba(162, 179, 77, 0)); diff --git a/plugins/prism-highlight/css/themes/prism-duotone-light.css b/plugins/prism-highlight/css/themes/prism-duotone-light.css index 6267141..dd84c4d 100644 --- a/plugins/prism-highlight/css/themes/prism-duotone-light.css +++ b/plugins/prism-highlight/css/themes/prism-duotone-light.css @@ -154,18 +154,18 @@ pre > code.highlight { /* overrides color-values for the Line Numbers plugin * http://prismjs.com/plugins/line-numbers/ */ -.line-numbers .line-numbers-rows { +.line-numbers.line-numbers .line-numbers-rows { border-right-color: #ece8de; } -.line-numbers-rows > span:before { +.line-numbers .line-numbers-rows > span:before { color: #cdc4b1; } /* overrides color-values for the Line Highlight plugin * http://prismjs.com/plugins/line-highlight/ */ -.line-highlight { +.line-highlight.line-highlight { background: rgba(45, 32, 6, 0.2); background: -webkit-linear-gradient(left, rgba(45, 32, 6, 0.2) 70%, rgba(45, 32, 6, 0)); background: linear-gradient(to right, rgba(45, 32, 6, 0.2) 70%, rgba(45, 32, 6, 0)); diff --git a/plugins/prism-highlight/css/themes/prism-duotone-sea.css b/plugins/prism-highlight/css/themes/prism-duotone-sea.css index 492a9c5..747748f 100644 --- a/plugins/prism-highlight/css/themes/prism-duotone-sea.css +++ b/plugins/prism-highlight/css/themes/prism-duotone-sea.css @@ -154,18 +154,18 @@ pre > code.highlight { /* overrides color-values for the Line Numbers plugin * http://prismjs.com/plugins/line-numbers/ */ -.line-numbers .line-numbers-rows { +.line-numbers.line-numbers .line-numbers-rows { border-right-color: #1f2932; } -.line-numbers-rows > span:before { +.line-numbers .line-numbers-rows > span:before { color: #2c3847; } /* overrides color-values for the Line Highlight plugin * http://prismjs.com/plugins/line-highlight/ */ -.line-highlight { +.line-highlight.line-highlight { background: rgba(10, 163, 112, 0.2); background: -webkit-linear-gradient(left, rgba(10, 163, 112, 0.2) 70%, rgba(10, 163, 112, 0)); background: linear-gradient(to right, rgba(10, 163, 112, 0.2) 70%, rgba(10, 163, 112, 0)); diff --git a/plugins/prism-highlight/css/themes/prism-duotone-space.css b/plugins/prism-highlight/css/themes/prism-duotone-space.css index 8a1bed1..fa3102b 100644 --- a/plugins/prism-highlight/css/themes/prism-duotone-space.css +++ b/plugins/prism-highlight/css/themes/prism-duotone-space.css @@ -154,18 +154,18 @@ pre > code.highlight { /* overrides color-values for the Line Numbers plugin * http://prismjs.com/plugins/line-numbers/ */ -.line-numbers .line-numbers-rows { +.line-numbers.line-numbers .line-numbers-rows { border-right-color: #262631; } -.line-numbers-rows > span:before { +.line-numbers .line-numbers-rows > span:before { color: #393949; } /* overrides color-values for the Line Highlight plugin * http://prismjs.com/plugins/line-highlight/ */ -.line-highlight { +.line-highlight.line-highlight { background: rgba(221, 103, 44, 0.2); background: -webkit-linear-gradient(left, rgba(221, 103, 44, 0.2) 70%, rgba(221, 103, 44, 0)); background: linear-gradient(to right, rgba(221, 103, 44, 0.2) 70%, rgba(221, 103, 44, 0)); diff --git a/plugins/prism-highlight/css/themes/prism-gruvbox-dark.css b/plugins/prism-highlight/css/themes/prism-gruvbox-dark.css index 3f01bad..b570451 100644 --- a/plugins/prism-highlight/css/themes/prism-gruvbox-dark.css +++ b/plugins/prism-highlight/css/themes/prism-gruvbox-dark.css @@ -10,7 +10,7 @@ code[class*="language-"], pre[class*="language-"] { - color: #ebdbb2; + color: #ebdbb2; /* fg1 / fg */ font-family: Consolas, Monaco, "Andale Mono", monospace; direction: ltr; text-align: left; @@ -33,16 +33,16 @@ pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { - color: #fff; - background: #f05e23; + color: #fbf1c7; /* fg0 */ + background: #7c6f64; /* bg4 */ } pre[class*="language-"]::selection, pre[class*="language-"] ::selection, code[class*="language-"]::selection, code[class*="language-"] ::selection { - color: #fff; - background: #f05e23; + color: #fbf1c7; /* fg0 */ + background: #7c6f64; /* bg4 */ } /* Code blocks */ @@ -54,7 +54,7 @@ pre[class*="language-"] { :not(pre) > code[class*="language-"], pre[class*="language-"] { - background: #1d2021; + background: #1d2021; /* bg0_h */ } /* Inline code */ @@ -66,7 +66,7 @@ pre[class*="language-"] { .token.comment, .token.prolog, .token.cdata { - color: #a89984; + color: #a89984; /* fg4 / gray1 */ } .token.delimiter, @@ -75,55 +75,55 @@ pre[class*="language-"] { .token.selector, .token.important, .token.atrule { - color: #fb4934; + color: #fb4934; /* red2 */ } .token.operator, .token.punctuation, .token.attr-name { - color: #a89984; + color: #a89984; /* fg4 / gray1 */ } .token.tag, .token.tag .punctuation, .token.doctype, .token.builtin { - color: #fabd2f; + color: #fabd2f; /* yellow2 */ } .token.entity, .token.number, .token.symbol { - color: #d3869b; + color: #d3869b; /* purple2 */ } .token.property, .token.constant, .token.variable { - color: #fb4934; + color: #fb4934; /* red2 */ } .token.string, .token.char { - color: #b8bb26; + color: #b8bb26; /* green2 */ } .token.attr-value, .token.attr-value .punctuation { - color: #a89984; + color: #a89984; /* fg4 / gray1 */ } .token.url { - color: #b8bb26; + color: #b8bb26; /* green2 */ text-decoration: underline; } .token.function { - color: #fabd2f; + color: #fabd2f; /* yellow2 */ } .token.regex { - background: #b8bb26; + background: #b8bb26; /* green2 */ } .token.bold { @@ -135,9 +135,9 @@ pre[class*="language-"] { } .token.inserted { - background: #a89984; + background: #a89984; /* fg4 / gray1 */ } .token.deleted { - background: #fb4934; + background: #fb4934; /* red2 */ } diff --git a/plugins/prism-highlight/css/themes/prism-gruvbox-light.css b/plugins/prism-highlight/css/themes/prism-gruvbox-light.css new file mode 100644 index 0000000..bfa7816 --- /dev/null +++ b/plugins/prism-highlight/css/themes/prism-gruvbox-light.css @@ -0,0 +1,143 @@ +/** + * Gruvbox light theme + * + * Based on Gruvbox: https://github.com/morhetz/gruvbox + * Adapted from PrismJS gruvbox-dark theme: https://github.com/schnerring/prism-themes/blob/master/themes/prism-gruvbox-dark.css + * + * @author Michael Schnerring (https://schnerring.net) + * @version 1.0 + */ + +code[class*="language-"], +pre[class*="language-"] { + color: #3c3836; /* fg1 / fg */ + font-family: Consolas, Monaco, "Andale Mono", monospace; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + line-height: 1.5; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +pre[class*="language-"]::-moz-selection, +pre[class*="language-"] ::-moz-selection, +code[class*="language-"]::-moz-selection, +code[class*="language-"] ::-moz-selection { + color: #282828; /* fg0 */ + background: #a89984; /* bg4 */ +} + +pre[class*="language-"]::selection, +pre[class*="language-"] ::selection, +code[class*="language-"]::selection, +code[class*="language-"] ::selection { + color: #282828; /* fg0 */ + background: #a89984; /* bg4 */ +} + +/* Code blocks */ +pre[class*="language-"] { + padding: 1em; + margin: 0.5em 0; + overflow: auto; +} + +:not(pre) > code[class*="language-"], +pre[class*="language-"] { + background: #f9f5d7; /* bg0_h */ +} + +/* Inline code */ +:not(pre) > code[class*="language-"] { + padding: 0.1em; + border-radius: 0.3em; +} + +.token.comment, +.token.prolog, +.token.cdata { + color: #7c6f64; /* fg4 / gray1 */ +} + +.token.delimiter, +.token.boolean, +.token.keyword, +.token.selector, +.token.important, +.token.atrule { + color: #9d0006; /* red2 */ +} + +.token.operator, +.token.punctuation, +.token.attr-name { + color: #7c6f64; /* fg4 / gray1 */ +} + +.token.tag, +.token.tag .punctuation, +.token.doctype, +.token.builtin { + color: #b57614; /* yellow2 */ +} + +.token.entity, +.token.number, +.token.symbol { + color: #8f3f71; /* purple2 */ +} + +.token.property, +.token.constant, +.token.variable { + color: #9d0006; /* red2 */ +} + +.token.string, +.token.char { + color: #797403; /* green2 */ +} + +.token.attr-value, +.token.attr-value .punctuation { + color: #7c6f64; /* fg4 / gray1 */ +} + +.token.url { + color: #797403; /* green2 */ + text-decoration: underline; +} + +.token.function { + color: #b57614; /* yellow2 */ +} + +.token.regex { + background: #797403; /* green2 */ +} + +.token.bold { + font-weight: bold; +} + +.token.italic { + font-style: italic; +} + +.token.inserted { + background: #7c6f64; /* fg4 / gray1 */ +} + +.token.deleted { + background: #9d0006; /* red2 */ +} diff --git a/plugins/prism-highlight/css/themes/prism-holi-theme.css b/plugins/prism-highlight/css/themes/prism-holi-theme.css new file mode 100644 index 0000000..a1f7de3 --- /dev/null +++ b/plugins/prism-highlight/css/themes/prism-holi-theme.css @@ -0,0 +1,119 @@ +/** + * MIT License + * Copyright (c) 2021 Ayush Saini + * Holi Theme for prism.js + * @author Ayush Saini <@AyushCodes on Twitter> + */ + +code[class*='language-'], +pre[class*='language-'] { + color: #d6e7ff; + background: #030314; + text-shadow: none; + font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace; + font-size: 1em; + line-height: 1.5; + letter-spacing: .2px; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + text-align: left; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +pre[class*='language-']::-moz-selection, +pre[class*='language-'] ::-moz-selection, +code[class*='language-']::-moz-selection, +code[class*='language-'] ::-moz-selection, +pre[class*='language-']::selection, +pre[class*='language-'] ::selection, +code[class*='language-']::selection, +code[class*='language-'] ::selection { + color: inherit; + background: #1d3b54; + text-shadow: none; +} + +pre[class*='language-'] { + border: 1px solid #2a4555; + border-radius: 5px; + padding: 1.5em 1em; + margin: 1em 0; + overflow: auto; +} + +:not(pre) > code[class*='language-'] { + color: #f0f6f6; + background: #2a4555; + padding: 0.2em 0.3em; + border-radius: 0.2em; + box-decoration-break: clone; +} + +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: #446e69; +} + +.token.punctuation { + color: #d6b007; +} + +.token.property, +.token.tag, +.token.boolean, +.token.number, +.token.constant, +.token.symbol, +.token.deleted { + color: #d6e7ff; +} + +.token.selector, +.token.attr-name, +.token.builtin, +.token.inserted { + color: #e60067; +} + +.token.string, +.token.char { + color: #49c6ec; +} + +.token.operator, +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string { + color: #ec8e01; + background: transparent; +} + +.token.atrule, +.token.attr-value, +.token.keyword { + color: #0fe468; +} + +.token.function, +.token.class-name { + color: #78f3e9; +} + +.token.regex, +.token.important, +.token.variable { + color: #d6e7ff; +} diff --git a/plugins/prism-highlight/css/themes/prism-laserwave.css b/plugins/prism-highlight/css/themes/prism-laserwave.css new file mode 100644 index 0000000..f36b550 --- /dev/null +++ b/plugins/prism-highlight/css/themes/prism-laserwave.css @@ -0,0 +1,133 @@ +/* + * Laserwave Theme originally by Jared Jones for Visual Studio Code + * https://github.com/Jaredk3nt/laserwave + * + * Ported for PrismJS by Simon Jespersen [https://github.com/simjes] + */ + +code[class*="language-"], +pre[class*="language-"] { + background: #27212e; + color: #ffffff; + font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace; /* this is the default */ + /* The following properties are standard, please leave them as they are */ + font-size: 1em; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + line-height: 1.5; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; + /* The following properties are also standard */ + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +code[class*="language-"]::-moz-selection, +code[class*="language-"] ::-moz-selection, +pre[class*="language-"]::-moz-selection, +pre[class*="language-"] ::-moz-selection { + background: #eb64b927; + color: inherit; +} + +code[class*="language-"]::selection, +code[class*="language-"] ::selection, +pre[class*="language-"]::selection, +pre[class*="language-"] ::selection { + background: #eb64b927; + color: inherit; +} + +/* Properties specific to code blocks */ +pre[class*="language-"] { + padding: 1em; /* this is standard */ + margin: 0.5em 0; /* this is the default */ + overflow: auto; /* this is standard */ + border-radius: 0.5em; +} + +/* Properties specific to inline code */ +:not(pre) > code[class*="language-"] { + padding: 0.2em 0.3em; + border-radius: 0.5rem; + white-space: normal; /* this is standard */ +} + +.token.comment, +.token.prolog, +.token.cdata { + color: #91889b; +} + +.token.punctuation { + color: #7b6995; +} + +.token.builtin, +.token.constant, +.token.boolean { + color: #ffe261; +} + +.token.number { + color: #b381c5; +} + +.token.important, +.token.atrule, +.token.property, +.token.keyword { + color: #40b4c4; +} + +.token.doctype, +.token.operator, +.token.inserted, +.token.tag, +.token.class-name, +.token.symbol { + color: #74dfc4; +} + +.token.attr-name, +.token.function, +.token.deleted, +.token.selector { + color: #eb64b9; +} + +.token.attr-value, +.token.regex, +.token.char, +.token.string { + color: #b4dce7; +} + +.token.entity, +.token.url, +.token.variable { + color: #ffffff; +} + +/* The following rules are pretty similar across themes, but feel free to adjust them */ +.token.bold { + font-weight: bold; +} + +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} + +.token.namespace { + opacity: 0.7; +} diff --git a/plugins/prism-highlight/css/themes/prism-one-dark.css b/plugins/prism-highlight/css/themes/prism-one-dark.css new file mode 100644 index 0000000..51944e8 --- /dev/null +++ b/plugins/prism-highlight/css/themes/prism-one-dark.css @@ -0,0 +1,440 @@ +/** + * One Dark theme for prism.js + * Based on Atom's One Dark theme: https://github.com/atom/atom/tree/master/packages/one-dark-syntax + */ + +/** + * One Dark colours (accurate as of commit 8ae45ca on 6 Sep 2018) + * From colors.less + * --mono-1: hsl(220, 14%, 71%); + * --mono-2: hsl(220, 9%, 55%); + * --mono-3: hsl(220, 10%, 40%); + * --hue-1: hsl(187, 47%, 55%); + * --hue-2: hsl(207, 82%, 66%); + * --hue-3: hsl(286, 60%, 67%); + * --hue-4: hsl(95, 38%, 62%); + * --hue-5: hsl(355, 65%, 65%); + * --hue-5-2: hsl(5, 48%, 51%); + * --hue-6: hsl(29, 54%, 61%); + * --hue-6-2: hsl(39, 67%, 69%); + * --syntax-fg: hsl(220, 14%, 71%); + * --syntax-bg: hsl(220, 13%, 18%); + * --syntax-gutter: hsl(220, 14%, 45%); + * --syntax-guide: hsla(220, 14%, 71%, 0.15); + * --syntax-accent: hsl(220, 100%, 66%); + * From syntax-variables.less + * --syntax-selection-color: hsl(220, 13%, 28%); + * --syntax-gutter-background-color-selected: hsl(220, 13%, 26%); + * --syntax-cursor-line: hsla(220, 100%, 80%, 0.04); + */ + +code[class*="language-"], +pre[class*="language-"] { + background: hsl(220, 13%, 18%); + color: hsl(220, 14%, 71%); + text-shadow: 0 1px rgba(0, 0, 0, 0.3); + font-family: "Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + line-height: 1.5; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +/* Selection */ +code[class*="language-"]::-moz-selection, +code[class*="language-"] *::-moz-selection, +pre[class*="language-"] *::-moz-selection { + background: hsl(220, 13%, 28%); + color: inherit; + text-shadow: none; +} + +code[class*="language-"]::selection, +code[class*="language-"] *::selection, +pre[class*="language-"] *::selection { + background: hsl(220, 13%, 28%); + color: inherit; + text-shadow: none; +} + +/* Code blocks */ +pre[class*="language-"] { + padding: 1em; + margin: 0.5em 0; + overflow: auto; + border-radius: 0.3em; +} + +/* Inline code */ +:not(pre) > code[class*="language-"] { + padding: 0.2em 0.3em; + border-radius: 0.3em; + white-space: normal; +} + +/* Print */ +@media print { + code[class*="language-"], + pre[class*="language-"] { + text-shadow: none; + } +} + +.token.comment, +.token.prolog, +.token.cdata { + color: hsl(220, 10%, 40%); +} + +.token.doctype, +.token.punctuation, +.token.entity { + color: hsl(220, 14%, 71%); +} + +.token.attr-name, +.token.class-name, +.token.boolean, +.token.constant, +.token.number, +.token.atrule { + color: hsl(29, 54%, 61%); +} + +.token.keyword { + color: hsl(286, 60%, 67%); +} + +.token.property, +.token.tag, +.token.symbol, +.token.deleted, +.token.important { + color: hsl(355, 65%, 65%); +} + +.token.selector, +.token.string, +.token.char, +.token.builtin, +.token.inserted, +.token.regex, +.token.attr-value, +.token.attr-value > .token.punctuation { + color: hsl(95, 38%, 62%); +} + +.token.variable, +.token.operator, +.token.function { + color: hsl(207, 82%, 66%); +} + +.token.url { + color: hsl(187, 47%, 55%); +} + +/* HTML overrides */ +.token.attr-value > .token.punctuation.attr-equals, +.token.special-attr > .token.attr-value > .token.value.css { + color: hsl(220, 14%, 71%); +} + +/* CSS overrides */ +.language-css .token.selector { + color: hsl(355, 65%, 65%); +} + +.language-css .token.property { + color: hsl(220, 14%, 71%); +} + +.language-css .token.function, +.language-css .token.url > .token.function { + color: hsl(187, 47%, 55%); +} + +.language-css .token.url > .token.string.url { + color: hsl(95, 38%, 62%); +} + +.language-css .token.important, +.language-css .token.atrule .token.rule { + color: hsl(286, 60%, 67%); +} + +/* JS overrides */ +.language-javascript .token.operator { + color: hsl(286, 60%, 67%); +} + +.language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation { + color: hsl(5, 48%, 51%); +} + +/* JSON overrides */ +.language-json .token.operator { + color: hsl(220, 14%, 71%); +} + +.language-json .token.null.keyword { + color: hsl(29, 54%, 61%); +} + +/* MD overrides */ +.language-markdown .token.url, +.language-markdown .token.url > .token.operator, +.language-markdown .token.url-reference.url > .token.string { + color: hsl(220, 14%, 71%); +} + +.language-markdown .token.url > .token.content { + color: hsl(207, 82%, 66%); +} + +.language-markdown .token.url > .token.url, +.language-markdown .token.url-reference.url { + color: hsl(187, 47%, 55%); +} + +.language-markdown .token.blockquote.punctuation, +.language-markdown .token.hr.punctuation { + color: hsl(220, 10%, 40%); + font-style: italic; +} + +.language-markdown .token.code-snippet { + color: hsl(95, 38%, 62%); +} + +.language-markdown .token.bold .token.content { + color: hsl(29, 54%, 61%); +} + +.language-markdown .token.italic .token.content { + color: hsl(286, 60%, 67%); +} + +.language-markdown .token.strike .token.content, +.language-markdown .token.strike .token.punctuation, +.language-markdown .token.list.punctuation, +.language-markdown .token.title.important > .token.punctuation { + color: hsl(355, 65%, 65%); +} + +/* General */ +.token.bold { + font-weight: bold; +} + +.token.comment, +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} + +.token.namespace { + opacity: 0.8; +} + +/* Plugin overrides */ +/* Selectors should have higher specificity than those in the plugins' default stylesheets */ + +/* Show Invisibles plugin overrides */ +.token.token.tab:not(:empty):before, +.token.token.cr:before, +.token.token.lf:before, +.token.token.space:before { + color: hsla(220, 14%, 71%, 0.15); + text-shadow: none; +} + +/* Toolbar plugin overrides */ +/* Space out all buttons and move them away from the right edge of the code block */ +div.code-toolbar > .toolbar.toolbar > .toolbar-item { + margin-right: 0.4em; +} + +/* Styling the buttons */ +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span { + background: hsl(220, 13%, 26%); + color: hsl(220, 9%, 55%); + padding: 0.1em 0.4em; + border-radius: 0.3em; +} + +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus { + background: hsl(220, 13%, 28%); + color: hsl(220, 14%, 71%); +} + +/* Line Highlight plugin overrides */ +/* The highlighted line itself */ +.line-highlight.line-highlight { + background: hsla(220, 100%, 80%, 0.04); +} + +/* Default line numbers in Line Highlight plugin */ +.line-highlight.line-highlight:before, +.line-highlight.line-highlight[data-end]:after { + background: hsl(220, 13%, 26%); + color: hsl(220, 14%, 71%); + padding: 0.1em 0.6em; + border-radius: 0.3em; + box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2); /* same as Toolbar plugin default */ +} + +/* Hovering over a linkable line number (in the gutter area) */ +/* Requires Line Numbers plugin as well */ +pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before { + background-color: hsla(220, 100%, 80%, 0.04); +} + +/* Line Numbers and Command Line plugins overrides */ +/* Line separating gutter from coding area */ +.line-numbers.line-numbers .line-numbers-rows, +.command-line .command-line-prompt { + border-right-color: hsla(220, 14%, 71%, 0.15); +} + +/* Stuff in the gutter */ +.line-numbers .line-numbers-rows > span:before, +.command-line .command-line-prompt > span:before { + color: hsl(220, 14%, 45%); +} + +/* Match Braces plugin overrides */ +/* Note: Outline colour is inherited from the braces */ +.rainbow-braces .token.token.punctuation.brace-level-1, +.rainbow-braces .token.token.punctuation.brace-level-5, +.rainbow-braces .token.token.punctuation.brace-level-9 { + color: hsl(355, 65%, 65%); +} + +.rainbow-braces .token.token.punctuation.brace-level-2, +.rainbow-braces .token.token.punctuation.brace-level-6, +.rainbow-braces .token.token.punctuation.brace-level-10 { + color: hsl(95, 38%, 62%); +} + +.rainbow-braces .token.token.punctuation.brace-level-3, +.rainbow-braces .token.token.punctuation.brace-level-7, +.rainbow-braces .token.token.punctuation.brace-level-11 { + color: hsl(207, 82%, 66%); +} + +.rainbow-braces .token.token.punctuation.brace-level-4, +.rainbow-braces .token.token.punctuation.brace-level-8, +.rainbow-braces .token.token.punctuation.brace-level-12 { + color: hsl(286, 60%, 67%); +} + +/* Diff Highlight plugin overrides */ +/* Taken from https://github.com/atom/github/blob/master/styles/variables.less */ +pre.diff-highlight > code .token.token.deleted:not(.prefix), +pre > code.diff-highlight .token.token.deleted:not(.prefix) { + background-color: hsla(353, 100%, 66%, 0.15); +} + +pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection, +pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection { + background-color: hsla(353, 95%, 66%, 0.25); +} + +pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection, +pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection { + background-color: hsla(353, 95%, 66%, 0.25); +} + +pre.diff-highlight > code .token.token.inserted:not(.prefix), +pre > code.diff-highlight .token.token.inserted:not(.prefix) { + background-color: hsla(137, 100%, 55%, 0.15); +} + +pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection, +pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection { + background-color: hsla(135, 73%, 55%, 0.25); +} + +pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection, +pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection { + background-color: hsla(135, 73%, 55%, 0.25); +} + +/* Previewers plugin overrides */ +/* Based on https://github.com/atom-community/atom-ide-datatip/blob/master/styles/atom-ide-datatips.less and https://github.com/atom/atom/blob/master/packages/one-dark-ui */ +/* Border around popup */ +.prism-previewer.prism-previewer:before, +.prism-previewer-gradient.prism-previewer-gradient div { + border-color: hsl(224, 13%, 17%); +} + +/* Angle and time should remain as circles and are hence not included */ +.prism-previewer-color.prism-previewer-color:before, +.prism-previewer-gradient.prism-previewer-gradient div, +.prism-previewer-easing.prism-previewer-easing:before { + border-radius: 0.3em; +} + +/* Triangles pointing to the code */ +.prism-previewer.prism-previewer:after { + border-top-color: hsl(224, 13%, 17%); +} + +.prism-previewer-flipped.prism-previewer-flipped.after { + border-bottom-color: hsl(224, 13%, 17%); +} + +/* Background colour within the popup */ +.prism-previewer-angle.prism-previewer-angle:before, +.prism-previewer-time.prism-previewer-time:before, +.prism-previewer-easing.prism-previewer-easing { + background: hsl(219, 13%, 22%); +} + +/* For angle, this is the positive area (eg. 90deg will display one quadrant in this colour) */ +/* For time, this is the alternate colour */ +.prism-previewer-angle.prism-previewer-angle circle, +.prism-previewer-time.prism-previewer-time circle { + stroke: hsl(220, 14%, 71%); + stroke-opacity: 1; +} + +/* Stroke colours of the handle, direction point, and vector itself */ +.prism-previewer-easing.prism-previewer-easing circle, +.prism-previewer-easing.prism-previewer-easing path, +.prism-previewer-easing.prism-previewer-easing line { + stroke: hsl(220, 14%, 71%); +} + +/* Fill colour of the handle */ +.prism-previewer-easing.prism-previewer-easing circle { + fill: transparent; +} diff --git a/plugins/prism-highlight/css/themes/prism-one-light.css b/plugins/prism-highlight/css/themes/prism-one-light.css new file mode 100644 index 0000000..b99b0e3 --- /dev/null +++ b/plugins/prism-highlight/css/themes/prism-one-light.css @@ -0,0 +1,428 @@ +/** + * One Light theme for prism.js + * Based on Atom's One Light theme: https://github.com/atom/atom/tree/master/packages/one-light-syntax + */ + +/** + * One Light colours (accurate as of commit eb064bf on 19 Feb 2021) + * From colors.less + * --mono-1: hsl(230, 8%, 24%); + * --mono-2: hsl(230, 6%, 44%); + * --mono-3: hsl(230, 4%, 64%) + * --hue-1: hsl(198, 99%, 37%); + * --hue-2: hsl(221, 87%, 60%); + * --hue-3: hsl(301, 63%, 40%); + * --hue-4: hsl(119, 34%, 47%); + * --hue-5: hsl(5, 74%, 59%); + * --hue-5-2: hsl(344, 84%, 43%); + * --hue-6: hsl(35, 99%, 36%); + * --hue-6-2: hsl(35, 99%, 40%); + * --syntax-fg: hsl(230, 8%, 24%); + * --syntax-bg: hsl(230, 1%, 98%); + * --syntax-gutter: hsl(230, 1%, 62%); + * --syntax-guide: hsla(230, 8%, 24%, 0.2); + * --syntax-accent: hsl(230, 100%, 66%); + * From syntax-variables.less + * --syntax-selection-color: hsl(230, 1%, 90%); + * --syntax-gutter-background-color-selected: hsl(230, 1%, 90%); + * --syntax-cursor-line: hsla(230, 8%, 24%, 0.05); + */ + +code[class*="language-"], +pre[class*="language-"] { + background: hsl(230, 1%, 98%); + color: hsl(230, 8%, 24%); + font-family: "Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + line-height: 1.5; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +/* Selection */ +code[class*="language-"]::-moz-selection, +code[class*="language-"] *::-moz-selection, +pre[class*="language-"] *::-moz-selection { + background: hsl(230, 1%, 90%); + color: inherit; +} + +code[class*="language-"]::selection, +code[class*="language-"] *::selection, +pre[class*="language-"] *::selection { + background: hsl(230, 1%, 90%); + color: inherit; +} + +/* Code blocks */ +pre[class*="language-"] { + padding: 1em; + margin: 0.5em 0; + overflow: auto; + border-radius: 0.3em; +} + +/* Inline code */ +:not(pre) > code[class*="language-"] { + padding: 0.2em 0.3em; + border-radius: 0.3em; + white-space: normal; +} + +.token.comment, +.token.prolog, +.token.cdata { + color: hsl(230, 4%, 64%); +} + +.token.doctype, +.token.punctuation, +.token.entity { + color: hsl(230, 8%, 24%); +} + +.token.attr-name, +.token.class-name, +.token.boolean, +.token.constant, +.token.number, +.token.atrule { + color: hsl(35, 99%, 36%); +} + +.token.keyword { + color: hsl(301, 63%, 40%); +} + +.token.property, +.token.tag, +.token.symbol, +.token.deleted, +.token.important { + color: hsl(5, 74%, 59%); +} + +.token.selector, +.token.string, +.token.char, +.token.builtin, +.token.inserted, +.token.regex, +.token.attr-value, +.token.attr-value > .token.punctuation { + color: hsl(119, 34%, 47%); +} + +.token.variable, +.token.operator, +.token.function { + color: hsl(221, 87%, 60%); +} + +.token.url { + color: hsl(198, 99%, 37%); +} + +/* HTML overrides */ +.token.attr-value > .token.punctuation.attr-equals, +.token.special-attr > .token.attr-value > .token.value.css { + color: hsl(230, 8%, 24%); +} + +/* CSS overrides */ +.language-css .token.selector { + color: hsl(5, 74%, 59%); +} + +.language-css .token.property { + color: hsl(230, 8%, 24%); +} + +.language-css .token.function, +.language-css .token.url > .token.function { + color: hsl(198, 99%, 37%); +} + +.language-css .token.url > .token.string.url { + color: hsl(119, 34%, 47%); +} + +.language-css .token.important, +.language-css .token.atrule .token.rule { + color: hsl(301, 63%, 40%); +} + +/* JS overrides */ +.language-javascript .token.operator { + color: hsl(301, 63%, 40%); +} + +.language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation { + color: hsl(344, 84%, 43%); +} + +/* JSON overrides */ +.language-json .token.operator { + color: hsl(230, 8%, 24%); +} + +.language-json .token.null.keyword { + color: hsl(35, 99%, 36%); +} + +/* MD overrides */ +.language-markdown .token.url, +.language-markdown .token.url > .token.operator, +.language-markdown .token.url-reference.url > .token.string { + color: hsl(230, 8%, 24%); +} + +.language-markdown .token.url > .token.content { + color: hsl(221, 87%, 60%); +} + +.language-markdown .token.url > .token.url, +.language-markdown .token.url-reference.url { + color: hsl(198, 99%, 37%); +} + +.language-markdown .token.blockquote.punctuation, +.language-markdown .token.hr.punctuation { + color: hsl(230, 4%, 64%); + font-style: italic; +} + +.language-markdown .token.code-snippet { + color: hsl(119, 34%, 47%); +} + +.language-markdown .token.bold .token.content { + color: hsl(35, 99%, 36%); +} + +.language-markdown .token.italic .token.content { + color: hsl(301, 63%, 40%); +} + +.language-markdown .token.strike .token.content, +.language-markdown .token.strike .token.punctuation, +.language-markdown .token.list.punctuation, +.language-markdown .token.title.important > .token.punctuation { + color: hsl(5, 74%, 59%); +} + +/* General */ +.token.bold { + font-weight: bold; +} + +.token.comment, +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} + +.token.namespace { + opacity: 0.8; +} + +/* Plugin overrides */ +/* Selectors should have higher specificity than those in the plugins' default stylesheets */ + +/* Show Invisibles plugin overrides */ +.token.token.tab:not(:empty):before, +.token.token.cr:before, +.token.token.lf:before, +.token.token.space:before { + color: hsla(230, 8%, 24%, 0.2); +} + +/* Toolbar plugin overrides */ +/* Space out all buttons and move them away from the right edge of the code block */ +div.code-toolbar > .toolbar.toolbar > .toolbar-item { + margin-right: 0.4em; +} + +/* Styling the buttons */ +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span { + background: hsl(230, 1%, 90%); + color: hsl(230, 6%, 44%); + padding: 0.1em 0.4em; + border-radius: 0.3em; +} + +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover, +div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus { + background: hsl(230, 1%, 78%); /* custom: darken(--syntax-bg, 20%) */ + color: hsl(230, 8%, 24%); +} + +/* Line Highlight plugin overrides */ +/* The highlighted line itself */ +.line-highlight.line-highlight { + background: hsla(230, 8%, 24%, 0.05); +} + +/* Default line numbers in Line Highlight plugin */ +.line-highlight.line-highlight:before, +.line-highlight.line-highlight[data-end]:after { + background: hsl(230, 1%, 90%); + color: hsl(230, 8%, 24%); + padding: 0.1em 0.6em; + border-radius: 0.3em; + box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2); /* same as Toolbar plugin default */ +} + +/* Hovering over a linkable line number (in the gutter area) */ +/* Requires Line Numbers plugin as well */ +pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before { + background-color: hsla(230, 8%, 24%, 0.05); +} + +/* Line Numbers and Command Line plugins overrides */ +/* Line separating gutter from coding area */ +.line-numbers.line-numbers .line-numbers-rows, +.command-line .command-line-prompt { + border-right-color: hsla(230, 8%, 24%, 0.2); +} + +/* Stuff in the gutter */ +.line-numbers .line-numbers-rows > span:before, +.command-line .command-line-prompt > span:before { + color: hsl(230, 1%, 62%); +} + +/* Match Braces plugin overrides */ +/* Note: Outline colour is inherited from the braces */ +.rainbow-braces .token.token.punctuation.brace-level-1, +.rainbow-braces .token.token.punctuation.brace-level-5, +.rainbow-braces .token.token.punctuation.brace-level-9 { + color: hsl(5, 74%, 59%); +} + +.rainbow-braces .token.token.punctuation.brace-level-2, +.rainbow-braces .token.token.punctuation.brace-level-6, +.rainbow-braces .token.token.punctuation.brace-level-10 { + color: hsl(119, 34%, 47%); +} + +.rainbow-braces .token.token.punctuation.brace-level-3, +.rainbow-braces .token.token.punctuation.brace-level-7, +.rainbow-braces .token.token.punctuation.brace-level-11 { + color: hsl(221, 87%, 60%); +} + +.rainbow-braces .token.token.punctuation.brace-level-4, +.rainbow-braces .token.token.punctuation.brace-level-8, +.rainbow-braces .token.token.punctuation.brace-level-12 { + color: hsl(301, 63%, 40%); +} + +/* Diff Highlight plugin overrides */ +/* Taken from https://github.com/atom/github/blob/master/styles/variables.less */ +pre.diff-highlight > code .token.token.deleted:not(.prefix), +pre > code.diff-highlight .token.token.deleted:not(.prefix) { + background-color: hsla(353, 100%, 66%, 0.15); +} + +pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection, +pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection { + background-color: hsla(353, 95%, 66%, 0.25); +} + +pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection, +pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection, +pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection { + background-color: hsla(353, 95%, 66%, 0.25); +} + +pre.diff-highlight > code .token.token.inserted:not(.prefix), +pre > code.diff-highlight .token.token.inserted:not(.prefix) { + background-color: hsla(137, 100%, 55%, 0.15); +} + +pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection, +pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection { + background-color: hsla(135, 73%, 55%, 0.25); +} + +pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection, +pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection, +pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection { + background-color: hsla(135, 73%, 55%, 0.25); +} + +/* Previewers plugin overrides */ +/* Based on https://github.com/atom-community/atom-ide-datatip/blob/master/styles/atom-ide-datatips.less and https://github.com/atom/atom/blob/master/packages/one-light-ui */ +/* Border around popup */ +.prism-previewer.prism-previewer:before, +.prism-previewer-gradient.prism-previewer-gradient div { + border-color: hsl(0, 0, 95%); +} + +/* Angle and time should remain as circles and are hence not included */ +.prism-previewer-color.prism-previewer-color:before, +.prism-previewer-gradient.prism-previewer-gradient div, +.prism-previewer-easing.prism-previewer-easing:before { + border-radius: 0.3em; +} + +/* Triangles pointing to the code */ +.prism-previewer.prism-previewer:after { + border-top-color: hsl(0, 0, 95%); +} + +.prism-previewer-flipped.prism-previewer-flipped.after { + border-bottom-color: hsl(0, 0, 95%); +} + +/* Background colour within the popup */ +.prism-previewer-angle.prism-previewer-angle:before, +.prism-previewer-time.prism-previewer-time:before, +.prism-previewer-easing.prism-previewer-easing { + background: hsl(0, 0%, 100%); +} + +/* For angle, this is the positive area (eg. 90deg will display one quadrant in this colour) */ +/* For time, this is the alternate colour */ +.prism-previewer-angle.prism-previewer-angle circle, +.prism-previewer-time.prism-previewer-time circle { + stroke: hsl(230, 8%, 24%); + stroke-opacity: 1; +} + +/* Stroke colours of the handle, direction point, and vector itself */ +.prism-previewer-easing.prism-previewer-easing circle, +.prism-previewer-easing.prism-previewer-easing path, +.prism-previewer-easing.prism-previewer-easing line { + stroke: hsl(230, 8%, 24%); +} + +/* Fill colour of the handle */ +.prism-previewer-easing.prism-previewer-easing circle { + fill: transparent; +} diff --git a/plugins/prism-highlight/css/themes/prism-shades-of-purple.css b/plugins/prism-highlight/css/themes/prism-shades-of-purple.css index a4a0cd5..1d0c4d4 100644 --- a/plugins/prism-highlight/css/themes/prism-shades-of-purple.css +++ b/plugins/prism-highlight/css/themes/prism-shades-of-purple.css @@ -185,16 +185,12 @@ code.language-css .token.selector > .token.pseudo-element { background: none; } -pre .line-highlight, -pre .line-highlight.line-highlight, -pre > code.line-highlight { +.line-highlight.line-highlight { margin-top: 36px; background: linear-gradient(to right, rgba(179, 98, 255, 0.17), transparent); } -pre .line-highlight:before, -pre > code.line-highlight:before, -pre .line-highlight[data-end]:after, -pre > code.line-highlight[data-end]:after { +.line-highlight.line-highlight:before, +.line-highlight.line-highlight[data-end]:after { content: ''; } diff --git a/plugins/prism-highlight/css/themes/prism-solarized-dark-atom.css b/plugins/prism-highlight/css/themes/prism-solarized-dark-atom.css new file mode 100644 index 0000000..4ea259e --- /dev/null +++ b/plugins/prism-highlight/css/themes/prism-solarized-dark-atom.css @@ -0,0 +1,143 @@ +/** + * Solarized dark atom theme for `prism.js` + * Based on Atom's `atom-dark` theme: https://github.com/atom/atom-dark-syntax + * @author Pranay Chauhan (@PranayChauhan2516) + */ + +code[class*="language-"], +pre[class*="language-"] { + color: #839496; + text-shadow: 0 1px rgba(0, 0, 0, 0.3); + font-family: Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + line-height: 1.5; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +/* Code blocks */ +pre[class*="language-"] { + padding: 1em; + margin: .5em 0; + overflow: auto; + border-radius: 0.3em; +} + +:not(pre) > code[class*="language-"], +pre[class*="language-"] { + background: #002b36; +} + +/* Inline code */ +:not(pre) > code[class*="language-"] { + padding: .1em; + border-radius: .3em; +} + +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: #586e75; +} + +.token.punctuation { + color: #93a1a1; +} + +.namespace { + opacity: .7; +} + +.token.property, +.token.keyword, +.token.tag { + color: #268bd2; +} + +.token.class-name { + color: #FFFFB6; + text-decoration: underline; +} + +.token.boolean, +.token.constant { + color: #b58900; +} + +.token.symbol, +.token.deleted { + color: #dc322f; +} + +.token.number { + color: #859900; +} + +.token.selector, +.token.attr-name, +.token.string, +.token.char, +.token.builtin, +.token.inserted { + color: #859900; +} + +.token.variable { + color: #268bd2; +} + +.token.operator { + color: #EDEDED; +} + +.token.function { + color: #268bd2; +} + +.token.regex { + color: #E9C062; +} + +.token.important { + color: #fd971f; +} + +.token.entity { + color: #FFFFB6; + cursor: help; +} + +.token.url { + color: #96CBFE; +} + +.language-css .token.string, +.style .token.string { + color: #87C38A; +} + +.token.important, +.token.bold { + font-weight: bold; +} + +.token.italic { + font-style: italic; +} + +.token.atrule, +.token.attr-value { + color: #F9EE98; +} diff --git a/plugins/prism-highlight/css/themes/prism-vs.css b/plugins/prism-highlight/css/themes/prism-vs.css index d65978c..54377df 100644 --- a/plugins/prism-highlight/css/themes/prism-vs.css +++ b/plugins/prism-highlight/css/themes/prism-vs.css @@ -150,18 +150,18 @@ code[class*="language-css"] { /* overrides color-values for the Line Numbers plugin * http://prismjs.com/plugins/line-numbers/ */ -.line-numbers .line-numbers-rows { +.line-numbers.line-numbers .line-numbers-rows { border-right-color: #a5a5a5; } -.line-numbers-rows > span:before { +.line-numbers .line-numbers-rows > span:before { color: #2B91AF; } /* overrides color-values for the Line Highlight plugin * http://prismjs.com/plugins/line-highlight/ */ -.line-highlight { +.line-highlight.line-highlight { background: rgba(193, 222, 241, 0.2); background: -webkit-linear-gradient(left, rgba(193, 222, 241, 0.2) 70%, rgba(221, 222, 241, 0)); background: linear-gradient(to right, rgba(193, 222, 241, 0.2) 70%, rgba(221, 222, 241, 0)); diff --git a/plugins/prism-highlight/css/themes/prism-vsc-dark-plus.css b/plugins/prism-highlight/css/themes/prism-vsc-dark-plus.css index 98add75..d3bd501 100644 --- a/plugins/prism-highlight/css/themes/prism-vsc-dark-plus.css +++ b/plugins/prism-highlight/css/themes/prism-vsc-dark-plus.css @@ -24,7 +24,7 @@ code[class*="language-"]::selection, pre[class*="language-"] *::selection, code[class*="language-"] *::selection { text-shadow: none; - background: #75a7ca; + background: #264F78; } @media print { @@ -45,7 +45,7 @@ pre[class*="language-"] { padding: .1em .3em; border-radius: .3em; color: #db4c69; - background: #f9f2f4; + background: #1e1e1e; } /********************************************************* * Tokens @@ -263,25 +263,13 @@ code[class*="language-html"] { /********************************************************* * Line highlighting */ -pre[data-line] { - position: relative; -} - pre[class*="language-"] > code[class*="language-"] { position: relative; z-index: 1; } -.line-highlight { - position: absolute; - left: 0; - right: 0; - padding: inherit 0; - margin-top: 1em; +.line-highlight.line-highlight { background: #f7ebc6; box-shadow: inset 5px 0 0 #f7d87c; z-index: 0; - pointer-events: none; - line-height: inherit; - white-space: pre; } diff --git a/plugins/prism-highlight/css/themes/prism-xonokai.css b/plugins/prism-highlight/css/themes/prism-xonokai.css index 8cdceb5..27ee67e 100644 --- a/plugins/prism-highlight/css/themes/prism-xonokai.css +++ b/plugins/prism-highlight/css/themes/prism-xonokai.css @@ -146,44 +146,17 @@ code.language-markup .token.script .token.keyword { } /* Line highlight plugin */ -pre[class*="language-"][data-line] { - position: relative; - padding: 1em 0 1em 3em; -} - -pre[data-line] .line-highlight { - position: absolute; - left: 0; - right: 0; +.line-highlight.line-highlight { padding: 0; - margin-top: 1em; background: rgba(255, 255, 255, 0.08); - pointer-events: none; - line-height: inherit; - white-space: pre; } -pre[data-line] .line-highlight:before, -pre[data-line] .line-highlight[data-end]:after { - content: attr(data-start); - position: absolute; - top: .4em; - left: .6em; - min-width: 1em; +.line-highlight.line-highlight:before, +.line-highlight.line-highlight[data-end]:after { padding: 0.2em 0.5em; background-color: rgba(255, 255, 255, 0.4); color: black; - font: bold 65%/1 sans-serif; height: 1em; line-height: 1em; - text-align: center; - border-radius: 999px; - text-shadow: none; box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); } - -pre[data-line] .line-highlight[data-end]:after { - content: attr(data-end); - top: auto; - bottom: .4em; -} diff --git a/plugins/prism-highlight/css/themes/prism-z-touch.css b/plugins/prism-highlight/css/themes/prism-z-touch.css new file mode 100644 index 0000000..08ecbc6 --- /dev/null +++ b/plugins/prism-highlight/css/themes/prism-z-touch.css @@ -0,0 +1,160 @@ +/* + * Z-Toch + * by Zeel Codder + * https://github.com/zeel-codder + * + */ +code[class*="language-"], +pre[class*="language-"] { + color: #22da17; + font-family: monospace; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; + line-height: 25px; + font-size: 18px; + margin: 5px 0; +} + +pre[class*="language-"] * { + font-family: monospace; +} + +:not(pre) > code[class*="language-"], +pre[class*="language-"] { + color: white; + background: #0a143c; + padding: 22px; +} + +/* Code blocks */ +pre[class*="language-"] { + padding: 1em; + margin: 0.5em 0; + overflow: auto; +} + +pre[class*="language-"]::-moz-selection, +pre[class*="language-"] ::-moz-selection, +code[class*="language-"]::-moz-selection, +code[class*="language-"] ::-moz-selection { + text-shadow: none; + background: rgba(29, 59, 83, 0.99); +} + +pre[class*="language-"]::selection, +pre[class*="language-"] ::selection, +code[class*="language-"]::selection, +code[class*="language-"] ::selection { + text-shadow: none; + background: rgba(29, 59, 83, 0.99); +} + +@media print { + code[class*="language-"], + pre[class*="language-"] { + text-shadow: none; + } +} + +:not(pre) > code[class*="language-"] { + padding: 0.1em; + border-radius: 0.3em; + white-space: normal; +} + +.token.comment, +.token.prolog, +.token.cdata { + color: rgb(99, 119, 119); + font-style: italic; +} + +.token.punctuation { + color: rgb(199, 146, 234); +} + +.namespace { + color: rgb(178, 204, 214); +} + +.token.deleted { + color: rgba(239, 83, 80, 0.56); + font-style: italic; +} + +.token.symbol, +.token.property { + color: rgb(128, 203, 196); +} + +.token.tag, +.token.operator, +.token.keyword { + color: rgb(127, 219, 202); +} + +.token.boolean { + color: rgb(255, 88, 116); +} + +.token.number { + color: rgb(247, 140, 108); +} + +.token.constant, +.token.function, +.token.builtin, +.token.char { + color: rgb(34 183 199); +} + +.token.selector, +.token.doctype { + color: rgb(199, 146, 234); + font-style: italic; +} + +.token.attr-name, +.token.inserted { + color: rgb(173, 219, 103); + font-style: italic; +} + +.token.string, +.token.url, +.token.entity, +.language-css .token.string, +.style .token.string { + color: rgb(173, 219, 103); +} + +.token.class-name, +.token.atrule, +.token.attr-value { + color: rgb(255, 203, 139); +} + +.token.regex, +.token.important, +.token.variable { + color: rgb(214, 222, 235); +} + +.token.important, +.token.bold { + font-weight: bold; +} + +.token.italic { + font-style: italic; +} diff --git a/plugins/prism-highlight/js/prism.js b/plugins/prism-highlight/js/prism.js index 069b8a4..531b0dc 100644 --- a/plugins/prism-highlight/js/prism.js +++ b/plugins/prism-highlight/js/prism.js @@ -1,42 +1,42 @@ -/* PrismJS 1.27.0 - http://127.0.0.1:8081/download.html#themes=prism&languages=markup+css+clike+javascript+apacheconf+bash+bbcode+c+csharp+cpp+coffeescript+css-extras+diff+docker+ecscript+git+go+java+json+json5+less+lua+markdown+markup-templating+php+php-extras+python+regex+ruby+sass+scss+sql+twig+yaml&plugins=line-highlight+line-numbers+command-line+toolbar+copy-to-clipboard */ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(s){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,e={},C={manual:s.Prism&&s.Prism.manual,disableWorkerMessageHandler:s.Prism&&s.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof N?new N(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=n.reach);i+=a.value.length,a=a.next){var l=a.value;if(e.length>g.length)return;if(!(l instanceof N)){var o,A=1;if(x){if(!(o=_(w,i,g,k))||o.index>=g.length)break;var E=o.index,P=o.index+o[0].length,s=i;for(s+=a.value.length;s<=E;)a=a.next,s+=a.value.length;if(s-=a.value.length,i=s,a.value instanceof N)continue;for(var L=a;L!==e.tail&&(sn.reach&&(n.reach=l),a.prev),S=(S&&(j=M(e,j,S),i+=S.length),W(e,j,A),new N(t,y?C.tokenize(u,y):u,b,u));a=M(e,j,S),O&&M(e,a,O),1n.reach&&(n.reach=u.reach))}}}}}(e,a,n,a.head,0),a),l=[],o=i.head.next;o!==i.tail;)l.push(o.value),o=o.next;return l},hooks:{all:{},add:function(e,n){var t=C.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=C.hooks.all[e];if(t&&t.length)for(var r,a=0;r=t[a++];)r(n)}},Token:N};function N(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=0|(r||"").length}function _(e,n,t,r){e.lastIndex=n;n=e.exec(t);return n&&r&&n[1]&&(e=n[1].length,n.index+=e,n[0]=n[0].slice(e)),n}function u(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function M(e,n,t){var r=n.next,t={value:t,prev:n,next:r};return n.next=t,r.prev=t,e.length++,t}function W(e,n,t){for(var r=n.next,a=0;a
",document.body.appendChild(e),t=38===e.offsetHeight,document.body.removeChild(e)),t},b=!0,Prism.plugins.lineHighlight={highlightLines:function(u,e,p){var t,i,e=(e="string"==typeof e?e:u.getAttribute("data-line")||"").replace(/\s+/g,"").split(",").filter(Boolean),g=+u.getAttribute("data-line-offset")||0,m=(y()?parseInt:parseFloat)(getComputedStyle(u).lineHeight),a=Prism.util.isActive(u,l),n=u.querySelector("code"),c=!a&&n||u,d=[],h=n&&c!=n?(t=u,n=n,t=getComputedStyle(u),i=getComputedStyle(n),n.offsetTop+r(i.borderTopWidth)+r(i.paddingTop)-r(t.paddingTop)):0;function r(e){return+e.substr(0,e.length-2)}e.forEach(function(e){var t,i,n,r=e.split("-"),o=+r[0],s=+r[1]||o,l=u.querySelector('.line-highlight[data-range="'+e+'"]')||document.createElement("div");d.push(function(){l.setAttribute("aria-hidden","true"),l.setAttribute("data-range",e),l.className=(p||"")+" line-highlight"}),a&&Prism.plugins.lineNumbers?(r=Prism.plugins.lineNumbers.getLine(u,o),t=Prism.plugins.lineNumbers.getLine(u,s),r&&(i=r.offsetTop+h+"px",d.push(function(){l.style.top=i})),t&&(n=t.offsetTop-r.offsetTop+t.offsetHeight+"px",d.push(function(){l.style.height=n}))):d.push(function(){l.setAttribute("data-start",String(o)),o span",u).forEach(function(e,t){var i=t+o;e.onclick=function(){b=!1,location.hash=s+"."+i,setTimeout(function(){b=!0},1)}})),function(){d.forEach(P)}}},r=0,Prism.hooks.add("before-sanity-check",function(e){var t,i=e.element.parentElement;o(i)&&(t=0,v(".line-highlight",i).forEach(function(e){t+=e.textContent.length,e.parentNode.removeChild(e)}),t&&/^(?: \n)+$/.test(e.code.slice(-t))&&(e.code=e.code.slice(0,-t)))}),Prism.hooks.add("complete",function e(t){var i,n=t.element.parentElement;o(n)&&(clearTimeout(r),i=Prism.plugins.lineNumbers,t=t.plugins&&t.plugins.lineNumbers,A(n,l)&&i&&!t?Prism.hooks.add("line-numbers",e):(Prism.plugins.lineHighlight.highlightLines(n)(),r=setTimeout(s,1)))}),window.addEventListener("hashchange",s),window.addEventListener("resize",function(){v("pre").filter(o).map(function(e){return Prism.plugins.lineHighlight.highlightLines(e)}).forEach(P)}))}();
-!function(){var r,s,e,n;function l(e){0!=(e=e.filter(function(e){e=((e=e)?window.getComputedStyle?getComputedStyle(e):e.currentStyle||null:null)["white-space"];return"pre-wrap"===e||"pre-line"===e})).length&&((e=e.map(function(e){var n,t=e.querySelector("code"),i=e.querySelector(".line-numbers-rows");if(t&&i)return i=e.querySelector(".line-numbers-sizer"),n=t.textContent.split(s),i||((i=document.createElement("span")).className="line-numbers-sizer",t.appendChild(i)),i.innerHTML="0",i.style.display="block",t=i.getBoundingClientRect().height,i.innerHTML="",{element:e,lines:n,lineHeights:[],oneLinerHeight:t,sizer:i}}).filter(Boolean)).forEach(function(e){var i=e.sizer,n=e.lines,r=e.lineHeights,s=e.oneLinerHeight;r[n.length-1]=void 0,n.forEach(function(e,n){var t;e&&1
",document.body.appendChild(t),e=38===t.offsetHeight,document.body.removeChild(t)}return e}()?parseInt:parseFloat)(getComputedStyle(o).lineHeight),p=Prism.util.isActive(o,t),g=o.querySelector("code"),m=p?o:g||o,v=[],y=g.textContent.match(n),b=y?y.length+1:1,A=g&&m!=g?function(e,t){var i=getComputedStyle(e),n=getComputedStyle(t);function r(e){return+e.substr(0,e.length-2)}return t.offsetTop+r(n.borderTopWidth)+r(n.paddingTop)-r(i.paddingTop)}(o,g):0;h.forEach((function(e){var t=e.split("-"),i=+t[0],n=+t[1]||i;if(!((n=Math.min(b+d,n))i&&r.setAttribute("data-end",String(n)),r.style.top=(i-d-1)*f+A+"px",r.textContent=new Array(n-i+2).join(" \n")}));v.push((function(){r.style.width=o.scrollWidth+"px"})),v.push((function(){m.appendChild(r)}))}}));var P=o.id;if(p&&Prism.util.isActive(o,i)&&P){l(o,i)||v.push((function(){o.classList.add(i)}));var E=parseInt(o.getAttribute("data-start")||"1");s(".line-numbers-rows > span",o).forEach((function(e,t){var i=t+E;e.onclick=function(){var e=P+"."+i;r=!1,location.hash=e,setTimeout((function(){r=!0}),1)}}))}return function(){v.forEach(a)}}};var o=0;Prism.hooks.add("before-sanity-check",(function(e){var t=e.element.parentElement;if(u(t)){var i=0;s(".line-highlight",t).forEach((function(e){i+=e.textContent.length,e.parentNode.removeChild(e)})),i&&/^(?: \n)+$/.test(e.code.slice(-i))&&(e.code=e.code.slice(0,-i))}})),Prism.hooks.add("complete",(function e(i){var n=i.element.parentElement;if(u(n)){clearTimeout(o);var r=Prism.plugins.lineNumbers,s=i.plugins&&i.plugins.lineNumbers;l(n,t)&&r&&!s?Prism.hooks.add("line-numbers",e):(Prism.plugins.lineHighlight.highlightLines(n)(),o=setTimeout(c,1))}})),window.addEventListener("hashchange",c),window.addEventListener("resize",(function(){s("pre").filter(u).map((function(e){return Prism.plugins.lineHighlight.highlightLines(e)})).forEach(a)}))}function s(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function l(e,t){return e.classList.contains(t)}function a(e){e()}function u(e){return!!(e&&/pre/i.test(e.nodeName)&&(e.hasAttribute("data-line")||e.id&&Prism.util.isActive(e,i)))}function c(){var e=location.hash.slice(1);s(".temporary.line-highlight").forEach((function(e){e.parentNode.removeChild(e)}));var t=(e.match(/\.([\d,-]+)$/)||[,""])[1];if(t&&!document.getElementById(e)){var i=e.slice(0,e.lastIndexOf(".")),n=document.getElementById(i);n&&(n.hasAttribute("data-line")||n.setAttribute("data-line",""),Prism.plugins.lineHighlight.highlightLines(n,t,"temporary ")(),r&&document.querySelector(".temporary.line-highlight").scrollIntoView())}}}();
+!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var e="line-numbers",n=/\n(?!$)/g,t=Prism.plugins.lineNumbers={getLine:function(n,t){if("PRE"===n.tagName&&n.classList.contains(e)){var i=n.querySelector(".line-numbers-rows");if(i){var r=parseInt(n.getAttribute("data-start"),10)||1,s=r+(i.children.length-1);t