aboutsummaryrefslogtreecommitdiff
path: root/site.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'site.tmpl')
-rw-r--r--site.tmpl95
1 files changed, 95 insertions, 0 deletions
diff --git a/site.tmpl b/site.tmpl
new file mode 100644
index 0000000..dc7bb97
--- /dev/null
+++ b/site.tmpl
@@ -0,0 +1,95 @@
1{{ define "header" }}
2 <!doctype html>
3 <html lang="en">
4 <head>
5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
7 <meta name="theme-color" content="#ffffff">
8 <meta name="google-site-verification" content="{{ html .Site.Other.Google_verification }}">
9 <meta http-equiv="X-UA-Compatible" content="ie=edge">
10 <meta name=description content="{{ html .Site.Other.Description }}">
11
12 <meta name="author" content="{{ html .Site.Other.Author }}">
13 <link rel="alternate" type="application/atom+xml" title="{{ html .Site.Other.Title }} feed" href="{{ .Rel "feed.atom" }}">
14 <title>{{ .Site.Other.Title }}{{ if .Title }}: {{ .Title }}{{ end }}</title>
15 <link rel="stylesheet" type="text/css" href="{{ .Rel "static/style.css" }}">
16
17 <link rel="icon" type="image/png" href="{{ .Rel "static/avatar-64x64.png" }}">
18 </head>
19 <body>
20 <main>
21{{ end }}
22
23{{ define "footer" }}
24 </main>
25 {{ template "ga" . }}
26 </body>
27 </html>
28{{ end }}
29
30{{ define "navigation" }}
31 <nav>
32 <a href="/">{{ html .Site.Other.Author }}</a>
33 <a href="/curriculum-vitae">Curriculum Vitae</a>
34 <a href="https://twitter.com/mitjafelicijan" target="_blank" rel="noopener nofollow">Twitter</a>
35 <a href="https://github.com/mitjafelicijan" target="_blank" rel="noopener nofollow">Github</a>
36 </nav>
37{{ end }}
38
39{{ define "author" }}
40 <span>by {{ html .Site.Other.Author }}</span>
41{{ end }}
42
43{{define "date"}}
44 <time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">
45 {{ .Format "2006, January 02" }}
46 </time>
47{{end}}
48
49{{ define "page" }}
50 {{ template "header" . }}
51 {{ template "navigation" . }}
52 {{ .Content }}
53 {{ template "mathjax" . }}
54 {{ template "footer" . }}
55{{ end }}
56
57{{ define "post" }}
58 <article>
59 <header>
60 <h1>{{ .Title }}</h1>
61 <div class="info">
62 {{ template "date" .Date }}
63 {{ template "author" . }}
64 </div>
65 </header>
66 <section>
67 {{ .Content }}
68 </section>
69 </article>
70{{ end }}
71
72{{ define "mathjax" }}
73 <script type="text/x-mathjax-config">
74 MathJax.Hub.Config({
75 TeX: { equationNumbers: { autoNumber: "AMS" } },
76 tex2jax: {
77 inlineMath: [ [ '$', '$' ], [ '\\(', '\\)' ] ],
78 displayMath: [ ['$$', '$$'] ],
79 processEscapes: true
80 }});
81 </script>
82 <script src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML" async="async"></script>
83{{ end }}
84
85{{ define "ga" }}
86 <script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-12769079-10"></script>
87 <script>
88 window.dataLayer = window.dataLayer || [];
89 function gtag() {
90 dataLayer.push(arguments);
91 }
92 gtag('js', new Date());
93 gtag('config', 'UA-12769079-10');
94 </script>
95{{ end }} \ No newline at end of file