From f80585cc72088839f982b490602eb3e468869ca7 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Tue, 22 Oct 2019 14:07:37 +0200 Subject: Added new lighter code theme and added cache busting with ?v --- site.tmpl | 7 ++- src/static/style.css | 126 +++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 125 insertions(+), 8 deletions(-) diff --git a/site.tmpl b/site.tmpl index 47ba627..5811545 100644 --- a/site.tmpl +++ b/site.tmpl @@ -12,8 +12,8 @@ - - + + {{ if .Title }}{{ .Title }} - {{ end }}{{ .Site.Other.Title }} @@ -57,7 +57,7 @@ {{end}} {{define "modified"}} -

Modified on {{ .ModTime }}

+

Modified on {{ .ModTime.Format "2006-01-02T15:04:05" }}

{{end}} {{ define "page" }} @@ -111,7 +111,6 @@ {{ end }} {{ define "prism" }} - {{ end }} diff --git a/src/static/style.css b/src/static/style.css index 3cb585a..b7fe7f7 100644 --- a/src/static/style.css +++ b/src/static/style.css @@ -84,10 +84,6 @@ p.modified { color: #000; } -code[class*=language-] { - font-size: 14px !important; -} - @media only screen and (max-width:480px) { main { padding: 20px; @@ -128,3 +124,125 @@ code[class*=language-] { font-size: 160%; } } + +/* prism theme */ + +/** + * GHColors theme by Avi Aryan (http://aviaryan.in) + * Inspired by Github syntax coloring + */ + + code[class*="language-"], + pre[class*="language-"] { + color: #393A34; + font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + font-size: .75em; + line-height: 1.2em; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; + } + + 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 { + background: #b3d4fc; + } + + pre[class*="language-"]::selection, pre[class*="language-"] ::selection, + code[class*="language-"]::selection, code[class*="language-"] ::selection { + background: #b3d4fc; + } + + /* Code blocks */ + pre[class*="language-"] { + padding: 1em; + margin: .5em 0; + overflow: auto; + border: 1px solid #dddddd; + background-color: white; + } + + /* Inline code */ + :not(pre) > code[class*="language-"] { + padding: .2em; + padding-top: 1px; padding-bottom: 1px; + background: #f8f8f8; + border: 1px solid #dddddd; + } + + .token.comment, + .token.prolog, + .token.doctype, + .token.cdata { + color: #999988; font-style: italic; + } + + .token.namespace { + opacity: .7; + } + + .token.string, + .token.attr-value { + color: #e3116c; + } + .token.punctuation, + .token.operator { + color: #393A34; /* no highlight */ + } + + .token.entity, + .token.url, + .token.symbol, + .token.number, + .token.boolean, + .token.variable, + .token.constant, + .token.property, + .token.regex, + .token.inserted { + color: #36acaa; + } + + .token.atrule, + .token.keyword, + .token.attr-name, + .language-autohotkey .token.selector { + color: #00a4db; + } + + .token.function, + .token.deleted, + .language-autohotkey .token.tag { + color: #9a050f; + } + + .token.tag, + .token.selector, + .language-autohotkey .token.keyword { + color: #00009f; + } + + .token.important, + .token.function, + .token.bold { + font-weight: bold; + } + + .token.italic { + font-style: italic; + } -- cgit v1.2.3