diff options
Diffstat (limited to 'site.tmpl')
| -rw-r--r-- | site.tmpl | 140 |
1 files changed, 0 insertions, 140 deletions
diff --git a/site.tmpl b/site.tmpl deleted file mode 100644 index c745997..0000000 --- a/site.tmpl +++ /dev/null | |||
| @@ -1,140 +0,0 @@ | |||
| 1 | {{ define "header" }} | ||
| 2 | <!doctype html> | ||
| 3 | <html lang="en"> | ||
| 4 | |||
| 5 | <head> | ||
| 6 | <meta charset="utf-8"> | ||
| 7 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| 8 | <meta name="theme-color" content="#ffffff"> | ||
| 9 | <meta name="google-site-verification" content="{{ html .Site.Other.Google_verification }}"> | ||
| 10 | <meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
| 11 | |||
| 12 | <link rel="preconnect" href="https://www.google-analytics.com"> | ||
| 13 | |||
| 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" }}?v={{ .ModTime.Format "20060102150405" }}"> | ||
| 16 | <link rel="icon" type="image/png" href="{{ .Rel "static/avatar-64x64.png" }}?v={{ .ModTime.Format "20060102150405" }}"> | ||
| 17 | |||
| 18 | <title>{{ if .Title }}{{ .Title }} - {{ end }}{{ .Site.Other.Title }}</title> | ||
| 19 | <meta name="author" content="{{ html .Site.Other.Author }}"> | ||
| 20 | <meta name="description" content="{{ if .Other.Description }}{{ .Other.Description }}{{ else }}{{ html .Site.Other.Description }}{{ end }}"> | ||
| 21 | |||
| 22 | <meta property="og:title" content="{{ if .Title }}{{ .Title }} - {{ end }}{{ .Site.Other.Title }}"> | ||
| 23 | <meta property="og:description" content="{{ if .Other.Description }}{{ .Other.Description }}{{ else }}{{ html .Site.Other.Description }}{{ end }}"> | ||
| 24 | <meta property="og:url" content="{{ .Site.Other.Url }}/{{ .Url }}"> | ||
| 25 | |||
| 26 | <meta name="twitter:card" content="summary"> | ||
| 27 | <meta name="twitter:site" content="{{ html .Site.Other.Twitter_handle }}"> | ||
| 28 | </head> | ||
| 29 | |||
| 30 | <body> | ||
| 31 | <main> | ||
| 32 | {{ end }} | ||
| 33 | {{ define "footer" }} | ||
| 34 | </main> | ||
| 35 | {{ template "ga" . }} | ||
| 36 | </body> | ||
| 37 | |||
| 38 | </html> | ||
| 39 | {{ end }} | ||
| 40 | |||
| 41 | {{ define "navigation" }} | ||
| 42 | <nav> | ||
| 43 | <a href="/">{{ html .Site.Other.Author }}</a> | ||
| 44 | <a href="/curriculum-vitae.html">CV</a> | ||
| 45 | <a href="https://twitter.com/mitjafelicijan" target="_blank" rel="noopener nofollow">Twitter</a> | ||
| 46 | <a href="https://github.com/mitjafelicijan" target="_blank" rel="noopener nofollow">Github</a> | ||
| 47 | </nav> | ||
| 48 | {{ end }} | ||
| 49 | |||
| 50 | {{ define "author" }} | ||
| 51 | <span>by {{ html .Site.Other.Author }}</span> | ||
| 52 | {{ end }} | ||
| 53 | |||
| 54 | {{define "date"}} | ||
| 55 | <time datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}"> | ||
| 56 | {{ .Format "2006, January 02" }} | ||
| 57 | </time> | ||
| 58 | {{end}} | ||
| 59 | |||
| 60 | {{define "modified"}} | ||
| 61 | <p class="modified">Modified on {{ .ModTime.Format "2006-01-02T15:04:05" }}</p> | ||
| 62 | {{end}} | ||
| 63 | |||
| 64 | {{ define "page" }} | ||
| 65 | {{ template "header" . }} | ||
| 66 | {{ template "navigation" . }} | ||
| 67 | {{ .Content }} | ||
| 68 | {{ template "prism" . }} | ||
| 69 | {{ template "mathjax" . }} | ||
| 70 | {{ template "footer" . }} | ||
| 71 | {{ end }} | ||
| 72 | |||
| 73 | {{ define "post" }} | ||
| 74 | <article> | ||
| 75 | <header> | ||
| 76 | <h1>{{ .Title }}</h1> | ||
| 77 | {{ if eq .Other.Type "post" }} | ||
| 78 | <div class="info"> | ||
| 79 | {{ template "date" .Date }} | ||
| 80 | {{ template "author" . }} | ||
| 81 | </div> | ||
| 82 | {{ end }} | ||
| 83 | </header> | ||
| 84 | <section> | ||
| 85 | {{ .Content }} | ||
| 86 | </section> | ||
| 87 | </article> | ||
| 88 | |||
| 89 | {{ if eq .Other.Type "post" }} | ||
| 90 | {{ template "comments" . }} | ||
| 91 | {{ end }} | ||
| 92 | |||
| 93 | {{ template "modified" . }} | ||
| 94 | {{ end }} | ||
| 95 | |||
| 96 | {{ define "mathjax" }} | ||
| 97 | <script type="text/x-mathjax-config"> | ||
| 98 | MathJax.Hub.Config({ | ||
| 99 | TeX: { equationNumbers: { autoNumber: "AMS" } }, | ||
| 100 | tex2jax: { | ||
| 101 | inlineMath: [ [ '$', '$' ], [ '\\(', '\\)' ] ], | ||
| 102 | displayMath: [ ['$$', '$$'] ], | ||
| 103 | processEscapes: true | ||
| 104 | }}); | ||
| 105 | </script> | ||
| 106 | <script src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML" async="async"></script> | ||
| 107 | {{ end }} | ||
| 108 | |||
| 109 | {{ define "ga" }} | ||
| 110 | <script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-12769079-10"></script> | ||
| 111 | <script> | ||
| 112 | window.dataLayer = window.dataLayer || []; | ||
| 113 | function gtag() { | ||
| 114 | dataLayer.push(arguments); | ||
| 115 | } | ||
| 116 | gtag('js', new Date()); | ||
| 117 | gtag('config', 'UA-12769079-10'); | ||
| 118 | </script> | ||
| 119 | {{ end }} | ||
| 120 | |||
| 121 | {{ define "prism" }} | ||
| 122 | <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/components/prism-core.min.js"></script> | ||
| 123 | <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/plugins/autoloader/prism-autoloader.min.js"></script> | ||
| 124 | {{ end }} | ||
| 125 | |||
| 126 | {{ define "comments" }} | ||
| 127 | <div class="comments"> | ||
| 128 | <h3>Comments</h3> | ||
| 129 | <div class="form"> | ||
| 130 | <div><input id="name" placeholder="Your name" maxlength="20"></div> | ||
| 131 | <div><textarea id="comment" placeholder="Your comment" maxlength="500"></textarea></div> | ||
| 132 | <div><button id="submit">Post a comment</button></div> | ||
| 133 | </div> | ||
| 134 | <ul></ul> | ||
| 135 | </div> | ||
| 136 | |||
| 137 | <script src="https://www.gstatic.com/firebasejs/7.2.1/firebase-app.js"></script> | ||
| 138 | <script src="https://www.gstatic.com/firebasejs/7.2.1/firebase-database.js"></script> | ||
| 139 | <script src="{{ .Rel "static/comments.js" }}?v={{ .ModTime.Format "20060102150405" }}" async></script> | ||
| 140 | {{ end }} | ||
