M archetypes/blog.md => archetypes/blog.md +1 -1
@@ 1,6 1,6 @@
---
title: "{{ humanize .Name | title }}"
-date: {{ now.Format "2006-01-02 15:04:05 -0700" }}
+date: {{ now.Format "2006-01-02 15:04:05" }} +0100
draft: true
syntax: true
---
M archetypes/default.md => archetypes/default.md +1 -1
@@ 1,5 1,5 @@
---
-title: "{{ replace .Name "-" " " | title }}"
+title: "{{ humanize .Name | title }}"
draft: true
---
M content/blog/daily-driving-a-smartphone-without-screen/index.md => content/blog/daily-driving-a-smartphone-without-screen/index.md +2 -2
@@ 1,5 1,5 @@
---
-title: "Daily driving a smartphone without screen"
+title: "Daily Driving a Smartphone Without Screen"
date: 2023-03-03 17:35:22 +0100
draft: false
syntax: true
@@ 11,7 11,7 @@ nothing was touching it. Any reasonable person would simply get a new phone, but
I am not reasonable and also didn't have any spare cash back then. So here is a
short post about how I used my phone without a screen for around a month.
-{{< img "screen.webp" "the phone during boot" >}}
+{{< img "screen.webp" "the phone during boot" "" true >}}
# Making it Somewhat Usable
M content/blog/linux-users-review-of-ios/index.md => content/blog/linux-users-review-of-ios/index.md +1 -1
@@ 1,5 1,5 @@
---
-title: "Linux user's review of iOS"
+title: "Linux User's Review of iOS"
date: 2022-12-16 16:32:00 +0100
draft: false
syntax: false
M content/blog/using-vim-with-the-colemak-dh-layout/index.md => content/blog/using-vim-with-the-colemak-dh-layout/index.md +7 -7
@@ 1,5 1,5 @@
---
-title: "Using Vim with the colemak-dh layout"
+title: "Using Vim With the Colemak Mod-DH Layout"
date: 2023-04-15 18:56:00 +0200
draft: false
syntax: true
@@ 16,12 16,12 @@ hjkl, you can jump a word forward using w, backward with b and a lot more but
that's not what this post is about.
Despite this supposed greatness of vim, I used VSCode for several years before
-switching, because one thing was holding me back - colemak-dh, an alternative
-English layout, that tries to solve the inefficiencies of QWERTY. Sadly it is
-not as popular and most software, vim included, does not expect you to be using
-it.
+switching, because one thing was holding me back - Colemak MOD-DH, an
+alternative English layout, that tries to solve the inefficiencies of QWERTY.
+Sadly it is not as popular and most software, vim included, does not expect you
+to be using it.
-{{< img "colemak-dh-ansi.webp" "ANSI variant colemak-dh" >}}
+{{< img "colemak-dh-ansi.webp" "ANSI variant Colemak MOD-DH" >}}
Just imagine trying to move via hjkl while using the above layout, not ideal.
My initial solution was to just remap the most important keys and learn to live
@@ 60,7 60,7 @@ run every time vim started also didn't feel right, thus I settled on generating
the mappings with python and then writing them into a .vim file.
We define a dictionary containing all the keys, necessary to translate between
-colemak-dh and qwerty, plus a small helper function, so we can also translate
+Colemak MOD-DH and QWERTY, plus a small helper function, so we can also translate
uppercase characters.
```python
M layouts/404.html => layouts/404.html +18 -11
@@ 1,13 1,20 @@
-{{ partial "head.html" . }}
+<!DOCTYPE html>
+<html lang="en">
+ {{ partial "head.html" . }}
-<body>
- <main
- style="flex-direction: column; align-items: center; text-align: center"
- >
- <h1 style="font-size: xxx-large; margin: 0">404</h1>
- <h2>this page does not exist</h2>
- <a href="{{ .Site.BaseURL }}">take me home</a>
- </main>
+ <body>
+ <main
+ style="
+ flex-direction: column;
+ align-items: center;
+ text-align: center;
+ "
+ >
+ <h1 style="font-size: xxx-large; margin: 0">404</h1>
+ <h2>this page does not exist</h2>
+ <a href="{{ .Site.BaseURL }}">take me home</a>
+ </main>
- {{ partialCached "footer.html" . }}
-</body>
+ {{ partialCached "footer.html" . }}
+ </body>
+</html>
M => +2 -4
@@ 9,10 9,8 @@
<channel>
<title>{{ .Site.Title }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content on {{ .Site.Title }}</description>
{{ with .Site.LanguageCode }}
<language>{{.}}</language>
{{end}}
<description>Articles from {{ .Site.Title }}</description>
{{ with .Site.LanguageCode }}<language>{{.}}</language>{{end}}
<copyright>{{ .Site.Copyright }}</copyright>
<managingEditor>{{ .Site.Author.email }} ({{ .Site.Author.name }})</managingEditor>
<webMaster>{{ .Site.Author.email }} ({{ .Site.Author.name }})</webMaster>
M layouts/_default/single.html => layouts/_default/single.html +10 -24
@@ 1,24 1,10 @@
-{{ partial "head.html" . }}
-
-<body>
- <nav
- style="
- border-bottom: #8c8fa1 solid 2px;
- display: flex;
- flex-flow: row wrap;
- "
- >
- <a href="{{ .Site.BaseURL }}">index/</a>
- {{ .File.ContentBaseName }}
- </nav>
-
- <h1>{{ .Title }}</h1>
-
- <main>
- <article>
- {{ .Content -}}
- </article>
- </main>
-</body>
-
-{{ partialCached "footer.html" . }}
+<!DOCTYPE html>
+<html lang="en">
+ {{ partial "head.html" . }}
+
+ <body>
+ {{ partial "navbar-and-title.html" . }}
+ <main><article>{{ .Content }}</article></main>
+ {{ partialCached "footer.html" . }}
+ </body>
+</html>
M layouts/blog/single.html => layouts/blog/single.html +20 -26
@@ 1,38 1,32 @@
+<!DOCTYPE html>
+<html lang="en">
+
{{ partial "head.html" . }}
<body>
- <nav
- style="
- border-bottom: #8c8fa1 solid 2px;
- display: flex;
- flex-flow: row wrap;
- "
- >
- <a href="{{ .Site.BaseURL }}">index/</a>
- blog/{{ .File.ContentBaseName }}
- </nav>
-
- <h1>
- {{ .Title }}
- {{- with .Params.Date }}
- <span class="date">{{ .Format "January 2, 2006" }}</span>
- {{- end }}
- </h1>
-
- <main>
- <article>{{ .Content -}}</article>
- </main>
+ {{ partial "navbar-and-title.html" . }}
+ <main><article>{{ .Content }}</article></main>
<p>
- Have something to say about one of the posts or the site itself? Feel
- free to leave your thoughts in my
- <a href="https://lists.sr.ht/~reggie/inbox"
- >public inbox<sup>↗</sup></a
+ Have something to say? Feel free to leave your thoughts in my
+ <a href="https://lists.sr.ht/~reggie/inbox">
+ public inbox<sup>↗</sup></a
>
+ {{- with .Params.socials -}}
+ , comment on an associated social media post (
+ {{- range $v := first 1 . -}}
+ <a href="{{ $v.link }}">{{ $v.name }}</a>
+ {{- end }}
+ {{- range $v := after 1 . -}}
+ , <a href="{{ $v.link }}">{{ $v.name }}</a>
+ {{- end -}}
+ )
+ {{- end }}
or
- <a href="{{ .Site.BaseURL }}/contact.html">contact</a>
+ <a href="/contact.html">contact</a>
me personally.
</p>
{{ partialCached "footer.html" . }}
</body>
+</html>
M layouts/index.html => layouts/index.html +3 -0
@@ 1,3 1,5 @@
+<!DOCTYPE html>
+<html lang="en">
{{ partial "head.html" . }}
<body>
@@ 24,3 26,4 @@
{{ partialCached "footer.html" . }}
</body>
+</html>
M layouts/partials/head.html => layouts/partials/head.html +8 -11
@@ 1,6 1,4 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
+<head>
<title>{{ .Title }}</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
@@ 10,18 8,17 @@
<meta name="description" content="{{ .Description }}" />
{{- end }}
<link
- rel="alternate"
- type="application/rss+xml"
- title="{{ .Title }}"
- href="/index.xml"
+ rel="alternate"
+ type="application/rss+xml"
+ title="{{ .Title }}"
+ href="/index.xml"
/>
<link rel="stylesheet" href="/main.css" />
{{- if eq .Params.syntax true }}
<link rel="stylesheet" href="/syntax.css" />
- {{- end }}
+ {{- end }}
{{- if fileExists (printf "/static/%s.css" .Type) }}
<link rel="stylesheet" href="/{{ .Type }}.css" />
{{- end }}
- </head>
- {{- "" -}}
-</html>
+</head>
+{{- "" -}}
A layouts/partials/navbar-and-title.html => layouts/partials/navbar-and-title.html +16 -0
@@ 0,0 1,16 @@
+<nav
+ style="
+ border-bottom: #8c8fa1 solid 2px;
+ display: flex;
+ flex-flow: row wrap;
+ "
+>
+ <a href="/">index/</a>
+ {{- with .Section }}{{ . }}/{{ end }}{{ .File.ContentBaseName }}
+</nav>
+
+<h1>
+ {{ .Title }} {{- with .Params.Date }}
+ <span class="date">{{ .Format "January 2, 2006" }}</span>
+ {{- end }}
+</h1>
M layouts/shortcodes/img.html => layouts/shortcodes/img.html +7 -1
@@ 3,10 3,16 @@
{{- with .Page.Resources.GetMatch (.Get 0) -}}
<img
src="{{ .RelPermalink }}"
- alt={{ default ($.Get 1) ($.Get 2) }}
+ alt="{{ default ($.Get 1) ($.Get 2) }}"
+ {{- if eq ($.Get 3 ) true }}
+ loading="eager"
+ {{ else }}
loading="lazy"
+ {{- end }}
+ {{- if ne .MediaType.SubType "svg" }}
height="{{ .Height }}"
width="{{ .Width }}"
+ {{- end }}
/>{{ end }}
<figcaption>
{{ sub (.Page.Scratch.Get "figures") 1 }}. {{ .Get 1 | markdownify }}
M static/blog.css => static/blog.css +0 -8
@@ 21,11 21,3 @@ body > p {
max-width: 90ch;
text-align: center;
}
-
-.footnotes {
- border-top: #8c8fa1 solid 2px;
- font-size: smaller;
- list-style-type: none;
- padding-left: 0;
- padding-top: 1em;
-}
M static/main.css => static/main.css +7 -0
@@ 115,6 115,13 @@ article > :first-child {
.footnotes {
color: #5c5f77;
+ font-size: smaller;
+ list-style-type: none;
+ padding-left: 0;
+}
+
+.footnotes > hr {
+ border: #8c8fa1 solid 1px;
}
footer {