aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2019-10-22 14:07:37 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2019-10-22 14:07:37 +0200
commitf80585cc72088839f982b490602eb3e468869ca7 (patch)
treeda804078cfb89ad854951a69a6d8db0a71879675
parentd59b8258a875c51a6fc046aa13506f9c4151aef8 (diff)
downloadmitjafelicijan.com-f80585cc72088839f982b490602eb3e468869ca7.tar.gz
Added new lighter code theme and added cache busting with ?v
-rw-r--r--site.tmpl7
-rw-r--r--src/static/style.css126
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 @@
12 <link rel="preconnect" href="https://www.google-analytics.com"> 12 <link rel="preconnect" href="https://www.google-analytics.com">
13 13
14 <link rel="alternate" type="application/atom+xml" title="{{ html .Site.Other.Title }} feed" href="{{ .Rel "feed.atom" }}"> 14 <link rel="alternate" type="application/atom+xml" title="{{ html .Site.Other.Title }} feed" href="{{ .Rel "feed.atom" }}">
15 <link rel="stylesheet" type="text/css" href="{{ .Rel "static/style.css" }}"> 15 <link rel="stylesheet" type="text/css" href="{{ .Rel "static/style.css" }}?v={{ .ModTime.Format "20060102150405" }}">
16 <link rel="icon" type="image/png" href="{{ .Rel "static/avatar-64x64.png" }}"> 16 <link rel="icon" type="image/png" href="{{ .Rel "static/avatar-64x64.png" }}?v={{ .ModTime.Format "20060102150405" }}">
17 17
18 <title>{{ if .Title }}{{ .Title }} - {{ end }}{{ .Site.Other.Title }}</title> 18 <title>{{ if .Title }}{{ .Title }} - {{ end }}{{ .Site.Other.Title }}</title>
19 <meta name="author" content="{{ html .Site.Other.Author }}"> 19 <meta name="author" content="{{ html .Site.Other.Author }}">
@@ -57,7 +57,7 @@
57{{end}} 57{{end}}
58 58
59{{define "modified"}} 59{{define "modified"}}
60 <p class="modified">Modified on {{ .ModTime }}</p> 60 <p class="modified">Modified on {{ .ModTime.Format "2006-01-02T15:04:05" }}</p>
61{{end}} 61{{end}}
62 62
63{{ define "page" }} 63{{ define "page" }}
@@ -111,7 +111,6 @@
111{{ end }} 111{{ end }}
112 112
113{{ define "prism" }} 113{{ define "prism" }}
114 <link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/themes/prism-solarizedlight.min.css" rel="stylesheet">
115 <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/components/prism-core.min.js"></script> 114 <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/components/prism-core.min.js"></script>
116 <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/plugins/autoloader/prism-autoloader.min.js"></script> 115 <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/plugins/autoloader/prism-autoloader.min.js"></script>
117{{ end }} 116{{ 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 {
84 color: #000; 84 color: #000;
85} 85}
86 86
87code[class*=language-] {
88 font-size: 14px !important;
89}
90
91@media only screen and (max-width:480px) { 87@media only screen and (max-width:480px) {
92 main { 88 main {
93 padding: 20px; 89 padding: 20px;
@@ -128,3 +124,125 @@ code[class*=language-] {
128 font-size: 160%; 124 font-size: 160%;
129 } 125 }
130} 126}
127
128/* prism theme */
129
130/**
131 * GHColors theme by Avi Aryan (http://aviaryan.in)
132 * Inspired by Github syntax coloring
133 */
134
135 code[class*="language-"],
136 pre[class*="language-"] {
137 color: #393A34;
138 font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace;
139 direction: ltr;
140 text-align: left;
141 white-space: pre;
142 word-spacing: normal;
143 word-break: normal;
144 font-size: .75em;
145 line-height: 1.2em;
146
147 -moz-tab-size: 4;
148 -o-tab-size: 4;
149 tab-size: 4;
150
151 -webkit-hyphens: none;
152 -moz-hyphens: none;
153 -ms-hyphens: none;
154 hyphens: none;
155 }
156
157 pre > code[class*="language-"] {
158 font-size: 1em;
159 }
160
161 pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
162 code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
163 background: #b3d4fc;
164 }
165
166 pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
167 code[class*="language-"]::selection, code[class*="language-"] ::selection {
168 background: #b3d4fc;
169 }
170
171 /* Code blocks */
172 pre[class*="language-"] {
173 padding: 1em;
174 margin: .5em 0;
175 overflow: auto;
176 border: 1px solid #dddddd;
177 background-color: white;
178 }
179
180 /* Inline code */
181 :not(pre) > code[class*="language-"] {
182 padding: .2em;
183 padding-top: 1px; padding-bottom: 1px;
184 background: #f8f8f8;
185 border: 1px solid #dddddd;
186 }
187
188 .token.comment,
189 .token.prolog,
190 .token.doctype,
191 .token.cdata {
192 color: #999988; font-style: italic;
193 }
194
195 .token.namespace {
196 opacity: .7;
197 }
198
199 .token.string,
200 .token.attr-value {
201 color: #e3116c;
202 }
203 .token.punctuation,
204 .token.operator {
205 color: #393A34; /* no highlight */
206 }
207
208 .token.entity,
209 .token.url,
210 .token.symbol,
211 .token.number,
212 .token.boolean,
213 .token.variable,
214 .token.constant,
215 .token.property,
216 .token.regex,
217 .token.inserted {
218 color: #36acaa;
219 }
220
221 .token.atrule,
222 .token.keyword,
223 .token.attr-name,
224 .language-autohotkey .token.selector {
225 color: #00a4db;
226 }
227
228 .token.function,
229 .token.deleted,
230 .language-autohotkey .token.tag {
231 color: #9a050f;
232 }
233
234 .token.tag,
235 .token.selector,
236 .language-autohotkey .token.keyword {
237 color: #00009f;
238 }
239
240 .token.important,
241 .token.function,
242 .token.bold {
243 font-weight: bold;
244 }
245
246 .token.italic {
247 font-style: italic;
248 }