aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2024-03-10 14:59:14 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2024-03-10 14:59:14 +0100
commit1100562e29f6476448b656dbddd4cf22505523f6 (patch)
tree442eec492199104bd49dfd74474ce89ade8fcac9 /templates
parenta40d80be378e46a6c490e1b99b0d8f4acd968503 (diff)
downloadmitjafelicijan.com-1100562e29f6476448b656dbddd4cf22505523f6.tar.gz
Move back to JBMAFP
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/.gitkeep0
-rwxr-xr-xtemplates/base.html165
-rwxr-xr-xtemplates/feed.xml23
-rwxr-xr-xtemplates/index.html35
-rwxr-xr-xtemplates/note.html14
-rw-r--r--templates/page.html13
-rwxr-xr-xtemplates/post.html14
-rw-r--r--templates/robots.txt2
-rw-r--r--templates/sitemap.xml12
9 files changed, 278 insertions, 0 deletions
diff --git a/templates/.gitkeep b/templates/.gitkeep
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/templates/.gitkeep
diff --git a/templates/base.html b/templates/base.html
new file mode 100755
index 0000000..b66174a
--- /dev/null
+++ b/templates/base.html
@@ -0,0 +1,165 @@
1<!doctype html>
2<html lang="{{ .Config.Language }}">
3 <head>
4 <meta charset="utf-8" />
5 <meta name="viewport" content="width=device-width,initial-scale=1" />
6 <title>{{ block "title" . }}{{ .Config.Title }}{{ end }}</title>
7 <meta name="description" content="{{ block "description" . }}{{ .Config.Description }}{{ end }}"/>
8 <link rel="alternate" type="application/rss+xml" href="{{ .Config.BaseURL }}/index.xml" />
9 <link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAA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8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel="icon" type="image/x-icon" />
10 <style>
11 :root {
12 --body-max-width: 860px;
13 --link-color: blue;
14 --code-background: #f8f8f8;
15 --inline-code-background: #f2f2f2;
16 }
17
18 *::selection {
19 background: var(--link-color);
20 color: #ffffff;
21 }
22
23 *::-moz-selection {
24 background: var(--link-color);
25 color: #ffffff;
26 }
27
28 *::-webkit-selection {
29 background: var(--link-color);
30 color: #ffffff;
31 }
32
33 body {
34 padding: 2rem;
35 max-width: var(--body-max-width);
36 background: white;
37 font-family: sans-serif;
38 line-height: 1.4rem;
39 font-size: 16px;
40 display: flex;
41 flex-direction: column;
42 gap: 1em;
43 }
44
45 header nav {
46 display: flex;
47 gap: 1em;
48 }
49
50 h1, h2, h3 {
51 line-height: initial;
52 }
53
54 h1 {
55 font-size: xx-large;
56 }
57
58 cap { text-transform: capitalize; }
59 ul li { padding: 0.2em 0; }
60
61 pre {
62 text-wrap: nowrap;
63 overflow-x: auto;
64 padding: 1em;
65 background: var(--code-background)!important;
66 }
67
68 code {
69 font-family: monospace;
70 font-size: 14px;
71 padding: 2px 5px;
72 background: var(--inline-code-background)!important;
73 }
74
75 pre code {
76 background: transparent;
77 padding: initial;
78 }
79
80 figure {
81 margin-inline-start: 0;
82 margin-inline-end: 0;
83 }
84
85 figcaption {
86 width: var(--body-max-width);
87 max-width: 100%;
88 text-align: center;
89 }
90
91 figcaption p {
92 margin: 0.3em 0 1.5em 0;
93 font-style: italic;
94 }
95
96 img, video, audio {
97 width: var(--body-max-width);
98 max-width: 100%;
99 }
100
101 article iframe { /* fixes embeds going to center */
102 margin: 0!important;
103 }
104
105 audio::-webkit-media-controls-enclosure {
106 border-radius: 0;
107 }
108
109 pre { margin-block-start: 2em; margin-block-end: 2em; }
110 table { max-width: 100%; border: 1px solid black; }
111 table td, table th { padding: 0.3em; }
112
113 .promobox {
114 margin-top: 1em;
115 text-decoration: none;
116 max-width: 650px;
117 display: inline-block;
118 background: blue;
119 color: white;
120 padding: 1em;
121 }
122 .promobox:hover { text-decoration: underline; }
123
124 @media only screen and (max-width: 600px) {
125 body {
126 padding: 0.5em;
127 word-wrap: break-word;
128 }
129
130 header nav {
131 gap: 0.7rem;
132 }
133
134 a {
135 word-wrap: break-word;
136 }
137 }
138 </style>
139 <script defer src="https://app.tinyanalytics.io/pixel/isfRNEahfHiS2Ttp"></script>
140 </head>
141 <body>
142 <header>
143 <nav>
144 <a href="/">Home</a>
145 <a href="https://github.com/mitjafelicijan" target="_blank">Code</a>
146 <a href="/assets/mitjafelicijan.pgp.pub.txt">PGP</a>
147 <a href="/assets/urls.txt">Newsboat</a>
148 <a href="/curriculum-vitae.html">CV</a>
149 <a href="/feed.xml">RSS</a>
150 </nav>
151 </header>
152 <main>{{ block "content" . }}{{ end }}</main>
153 <footer>
154 <hr>
155 <p><big><strong>Want to comment or have something to add?</strong></big></p>
156 <p>
157 You can write me an email
158 at <a href="mailto:mitja.felicijan@gmail.com">mitja.felicijan@gmail.com</a> or
159 catch up with me <a href="https://telegram.me/mitjafelicijan" target="_blank">on Telegram</a>.
160 </p>
161 <hr>
162 <p><small>This page's is also available as <a href="/feed.xml" target="_blank">RSS feed</a>.</small></p>
163 </footer>
164 </body>
165</html>
diff --git a/templates/feed.xml b/templates/feed.xml
new file mode 100755
index 0000000..97507e2
--- /dev/null
+++ b/templates/feed.xml
@@ -0,0 +1,23 @@
1<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
2 <channel>
3 <title>{{ .Config.Title }}'s posts</title>
4 <link>{{ .Config.BaseURL }}</link>
5 <description>{{ .Config.Description }}</description>
6 <language>{{ .Config.Language }}</language>
7
8 {{ range $idx, $page := .Pages }}
9 {{ if or (eq $page.Type "post") (eq $page.Type "note") }}
10 {{ if not .Draft }}
11 <item>
12 <title>{{ $page.Title }}</title>
13 <link>{{ $.Config.BaseURL }}{{ $page.RelPermalink }}</link>
14 <pubDate>{{ $page.Created.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</pubDate>
15 <guid>{{ $.Config.BaseURL }}{{ $page.RelPermalink }}</guid>
16 <description>{{ $page.Summary }}</description>
17 <content:encoded>{{ $page.Raw }}</content:encoded>
18 </item>
19 {{ end }}
20 {{ end }}
21 {{ end }}
22 </channel>
23</rss>
diff --git a/templates/index.html b/templates/index.html
new file mode 100755
index 0000000..da06fd7
--- /dev/null
+++ b/templates/index.html
@@ -0,0 +1,35 @@
1{{ template "base.html" . }}
2
3{{ define "content" }}
4<section>
5 <i>You do not learn by relaxing. You learn by violently assaulting your problem until it surrenders its mysteries to you.</i>
6</section>
7
8<a class="promobox" href="https://mitjafelicijan.github.io/binary-visualization/" target="_blank">
9 Examine graphical representations of binary files using diagrams that
10 illustrate connections between pairs of bytes (digraphs) and triplets
11 of bytes (trigraphs).
12</a>
13
14<section>
15 <h2>More long form, ramblings etc</h2>
16 <ul>
17 {{ range .Pages }}
18 {{ if and (eq .Type "post") (not .Draft) }}
19 <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
20 {{ end }}
21 {{ end }}
22 </ul>
23</section>
24
25<section>
26 <h2>Notes?! Maybe useful</h2>
27 <ul>
28 {{ range .Pages }}
29 {{ if and (eq .Type "note") (not .Draft) }}
30 <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
31 {{ end }}
32 {{ end }}
33 </ul>
34</section>
35{{ end }}
diff --git a/templates/note.html b/templates/note.html
new file mode 100755
index 0000000..5289a5e
--- /dev/null
+++ b/templates/note.html
@@ -0,0 +1,14 @@
1{{ template "base.html" . }}
2
3{{ define "title" }}{{ .Page.Title }}{{ end }}
4{{ define "description" }}{{ .Page.Summary }}{{ end }}
5
6{{ define "content" }}
7<div>
8 <h1>{{ .Page.Title }}</h1>
9 <p><cap>{{ .Page.Type }}</cap>, {{ .Page.Created.Format "Jan 2, 2006" }}, on <a href="{{ .Config.BaseURL }}">{{ .Config.Title }}'s blog</a></p>
10 <div>
11 {{ .Page.HTML }}
12 </div>
13</div>
14{{ end }}
diff --git a/templates/page.html b/templates/page.html
new file mode 100644
index 0000000..7ee5219
--- /dev/null
+++ b/templates/page.html
@@ -0,0 +1,13 @@
1{{ template "base.html" . }}
2
3{{ define "title" }}{{ .Page.Title }}{{ end }}
4{{ define "description" }}{{ .Page.Summary }}{{ end }}
5
6{{ define "content" }}
7<div>
8 <h1>{{ .Page.Title }}</h1>
9 <div>
10 {{ .Page.HTML }}
11 </div>
12</div>
13{{ end }}
diff --git a/templates/post.html b/templates/post.html
new file mode 100755
index 0000000..1ed852c
--- /dev/null
+++ b/templates/post.html
@@ -0,0 +1,14 @@
1{{ template "base.html" . }}
2
3{{ define "title" }}{{ .Page.Title }}{{ end }}
4{{ define "description" }}{{ .Page.Summary }}{{ end }}
5
6{{ define "content" }}
7<section>
8 <h1>{{ .Page.Title }}</h1>
9 <p><cap>{{ .Page.Type }}</cap>, {{ .Page.Created.Format "Jan 2, 2006" }}, on <a href="{{ .Config.BaseURL }}">{{ .Config.Title }}'s blog</a></p>
10 <div>
11 {{ .Page.HTML }}
12 </div>
13</section>
14{{ end }}
diff --git a/templates/robots.txt b/templates/robots.txt
new file mode 100644
index 0000000..c2a49f4
--- /dev/null
+++ b/templates/robots.txt
@@ -0,0 +1,2 @@
1User-agent: *
2Allow: /
diff --git a/templates/sitemap.xml b/templates/sitemap.xml
new file mode 100644
index 0000000..4d2617c
--- /dev/null
+++ b/templates/sitemap.xml
@@ -0,0 +1,12 @@
1<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
2 {{ range $idx, $page := .Pages }}
3 {{ if or (eq $page.Type "post") (eq $page.Type "note") }}
4 {{ if not .Draft }}
5 <url>
6 <loc>{{ $.Config.BaseURL }}{{ $page.RelPermalink }}</loc>
7 <lastmod>{{ $page.Created.Format "2006-01-02T15:04:05" }}+00:00</lastmod>
8 </url>
9 {{ end }}
10 {{ end }}
11 {{ end }}
12</urlset>