From 1be0e6bf1eb9fb0081c8409de119212567b5fef0 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Wed, 23 Nov 2022 07:22:30 +0800 Subject: [PATCH] Add Prism stylesheet back --- assets/css/prism.css | 113 ++++++++++++++++++++++++++++ layouts/partials/head_extended.html | 3 + 2 files changed, 116 insertions(+) create mode 100644 assets/css/prism.css diff --git a/assets/css/prism.css b/assets/css/prism.css new file mode 100644 index 0000000..fe9f204 --- /dev/null +++ b/assets/css/prism.css @@ -0,0 +1,113 @@ +/** + * This is a CSS stylesheet template for Prism in case you use that. + * This is based from a Prism CSS port by Albert Vallverdu [@byverdu]. + */ +code[class*="language-"], +pre[class*="language-"] { + color: var(--base05); + background: none; + font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; + 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 blocks */ +pre[class*="language-"] { + overflow: auto; +} + +:not(pre) > code[class*="language-"], +pre[class*="language-"] { + background: var(--base00); +} + +/* Inline code */ +:not(pre) > code[class*="language-"] { + white-space: normal; +} + +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: var(--base03); +} + +.token.punctuation { + color: var(--base05); +} + +.namespace { + opacity: .7; +} + +.token.property, +.token.tag, +.token.constant, +.token.symbol, +.token.deleted { + color: var(--base08); +} + +.token.boolean, +.token.number { + color: var(--base09); +} + +.token.selector, +.token.attr-name, +.token.string, +.token.char, +.token.builtin, +.token.inserted { + color: var(--base0A); +} + +.token.operator, +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string, +.token.variable { + color: var(--base07); +} + +.token.atrule, +.token.attr-value, +.token.function, +.token.class-name { + color: var(--base0D); +} + +.token.keyword { + color: var(--base0E); +} + +.token.regex, +.token.important { + color: var(--base0C); +} + +.token.important, +.token.bold { + font-weight: bold; +} + +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} diff --git a/layouts/partials/head_extended.html b/layouts/partials/head_extended.html index e7d01b0..4f8461c 100644 --- a/layouts/partials/head_extended.html +++ b/layouts/partials/head_extended.html @@ -5,6 +5,9 @@ +{{ $prism := resources.Get "css/prism.css" }} + + {{- /* medium-zoom */ -}}