diff --git a/config.toml b/config.toml index 5fd91d7..7abe650 100644 --- a/config.toml +++ b/config.toml @@ -12,6 +12,9 @@ title = "Thomas Schwery" author = "Thomas Schwery" copyright = "Thomas Schwery, No rights reserved (CC0)." +pygmentsCodeFences = true +pygmentsCodeFencesGuessSyntax = true + [params] logo = "/images/logo.png" subtitle = "A Glog ... Plog ... Blog ..." diff --git a/themes/hugo-tschwery/assets/css/skeleton.css b/themes/hugo-tschwery/assets/css/skeleton.css index f28bf6c..0710106 100644 --- a/themes/hugo-tschwery/assets/css/skeleton.css +++ b/themes/hugo-tschwery/assets/css/skeleton.css @@ -303,23 +303,6 @@ ol ul { li { margin-bottom: 1rem; } - -/* Code -–––––––––––––––––––––––––––––––––––––––––––––––––– */ -code { - padding: .2rem .5rem; - margin: 0 .2rem; - font-size: 90%; - white-space: nowrap; - background: #F1F1F1; - border: 1px solid #E1E1E1; - border-radius: 4px; } -pre > code { - display: block; - padding: 1rem 1.5rem; - white-space: pre; } - - /* Tables –––––––––––––––––––––––––––––––––––––––––––––––––– */ th, diff --git a/themes/hugo-tschwery/assets/css/syntax.css b/themes/hugo-tschwery/assets/css/syntax.css new file mode 100644 index 0000000..421d4c3 --- /dev/null +++ b/themes/hugo-tschwery/assets/css/syntax.css @@ -0,0 +1,59 @@ +/* Background */ .chroma { color: #93a1a1; background-color: #002b36 } +/* Other */ .chroma .x { color: #cb4b16 } +/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } +/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } +/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc } +/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; } +/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; } +/* Keyword */ .chroma .k { color: #719e07 } +/* KeywordConstant */ .chroma .kc { color: #cb4b16 } +/* KeywordDeclaration */ .chroma .kd { color: #268bd2 } +/* KeywordNamespace */ .chroma .kn { color: #719e07 } +/* KeywordPseudo */ .chroma .kp { color: #719e07 } +/* KeywordReserved */ .chroma .kr { color: #268bd2 } +/* KeywordType */ .chroma .kt { color: #dc322f } +/* NameBuiltin */ .chroma .nb { color: #b58900 } +/* NameBuiltinPseudo */ .chroma .bp { color: #268bd2 } +/* NameClass */ .chroma .nc { color: #268bd2 } +/* NameConstant */ .chroma .no { color: #cb4b16 } +/* NameDecorator */ .chroma .nd { color: #268bd2 } +/* NameEntity */ .chroma .ni { color: #cb4b16 } +/* NameException */ .chroma .ne { color: #cb4b16 } +/* NameFunction */ .chroma .nf { color: #268bd2 } +/* NameTag */ .chroma .nt { color: #268bd2 } +/* NameVariable */ .chroma .nv { color: #268bd2 } +/* LiteralString */ .chroma .s { color: #2aa198 } +/* LiteralStringAffix */ .chroma .sa { color: #2aa198 } +/* LiteralStringBacktick */ .chroma .sb { color: #586e75 } +/* LiteralStringChar */ .chroma .sc { color: #2aa198 } +/* LiteralStringDelimiter */ .chroma .dl { color: #2aa198 } +/* LiteralStringDouble */ .chroma .s2 { color: #2aa198 } +/* LiteralStringEscape */ .chroma .se { color: #cb4b16 } +/* LiteralStringInterpol */ .chroma .si { color: #2aa198 } +/* LiteralStringOther */ .chroma .sx { color: #2aa198 } +/* LiteralStringRegex */ .chroma .sr { color: #dc322f } +/* LiteralStringSingle */ .chroma .s1 { color: #2aa198 } +/* LiteralStringSymbol */ .chroma .ss { color: #2aa198 } +/* LiteralNumber */ .chroma .m { color: #2aa198 } +/* LiteralNumberBin */ .chroma .mb { color: #2aa198 } +/* LiteralNumberFloat */ .chroma .mf { color: #2aa198 } +/* LiteralNumberHex */ .chroma .mh { color: #2aa198 } +/* LiteralNumberInteger */ .chroma .mi { color: #2aa198 } +/* LiteralNumberIntegerLong */ .chroma .il { color: #2aa198 } +/* LiteralNumberOct */ .chroma .mo { color: #2aa198 } +/* Operator */ .chroma .o { color: #719e07 } +/* OperatorWord */ .chroma .ow { color: #719e07 } +/* Comment */ .chroma .c { color: #586e75 } +/* CommentHashbang */ .chroma .ch { color: #586e75 } +/* CommentMultiline */ .chroma .cm { color: #586e75 } +/* CommentSingle */ .chroma .c1 { color: #586e75 } +/* CommentSpecial */ .chroma .cs { color: #719e07 } +/* CommentPreproc */ .chroma .cp { color: #719e07 } +/* CommentPreprocFile */ .chroma .cpf { color: #719e07 } +/* GenericDeleted */ .chroma .gd { color: #dc322f } +/* GenericEmph */ .chroma .ge { font-style: italic } +/* GenericError */ .chroma .gr { color: #dc322f; font-weight: bold } +/* GenericHeading */ .chroma .gh { color: #cb4b16 } +/* GenericInserted */ .chroma .gi { color: #719e07 } +/* GenericStrong */ .chroma .gs { font-weight: bold } +/* GenericSubheading */ .chroma .gu { color: #268bd2 } diff --git a/themes/hugo-tschwery/assets/js/init.js b/themes/hugo-tschwery/assets/js/init.js deleted file mode 100644 index 0cc359d..0000000 --- a/themes/hugo-tschwery/assets/js/init.js +++ /dev/null @@ -1 +0,0 @@ -hljs.initHighlightingOnLoad(); diff --git a/themes/hugo-tschwery/layouts/partials/footer.html b/themes/hugo-tschwery/layouts/partials/footer.html index 81c0269..805ed13 100644 --- a/themes/hugo-tschwery/layouts/partials/footer.html +++ b/themes/hugo-tschwery/layouts/partials/footer.html @@ -13,9 +13,5 @@ - -{{ $highlightInitJs := resources.Get "js/init.js" | resources.Minify | resources.Fingerprint }} - - diff --git a/themes/hugo-tschwery/layouts/partials/header.html b/themes/hugo-tschwery/layouts/partials/header.html index a4f8870..ed2953f 100644 --- a/themes/hugo-tschwery/layouts/partials/header.html +++ b/themes/hugo-tschwery/layouts/partials/header.html @@ -6,14 +6,15 @@ {{ $skeletonCss := resources.Get "css/skeleton.css" | resources.Minify | resources.Fingerprint }} {{ $customCss := resources.Get "css/custom.css" | resources.Minify | resources.Fingerprint }} {{ $normalizeCss := resources.Get "css/normalize.css" | resources.Minify | resources.Fingerprint }} +{{ $syntaxCss := resources.Get "css/syntax.css" | resources.Minify | resources.Fingerprint }} - +