This commit is contained in:
2026-05-25 22:53:28 +02:00
parent 77ff06348a
commit e1fe3e1bc5
96 changed files with 18132 additions and 590 deletions

24
homepage/layouts/404.html Normal file
View File

@@ -0,0 +1,24 @@
{{ define "main" }}
<h1>404 - Page Not Found</h1>
<p>The page you're looking for doesn't exist or has been moved.</p>
<nav aria-label="404 navigation">
<ul>
<li><a href="{{ "/" | relURL }}">← Return to homepage</a></li>
{{ with site.Home }}
{{ with .GetPage "posts" }}
{{ if . }}
<li><a href="{{ .RelPermalink }}">Browse posts</a></li>
{{ end }}
{{ end }}
{{ end }}
{{ with site.Home }}
{{ with .GetPage "about" }}
{{ if . }}
<li><a href="{{ .RelPermalink }}">About page</a></li>
{{ end }}
{{ end }}
{{ end }}
</ul>
</nav>
{{ end }}

View File

@@ -0,0 +1,7 @@
{{ $class := "" }}
{{ if findRE "^(?:\\d+\\.)+\\s+" .Text 1 }}
{{ $class = "manual-number" }}
{{ end }}
<h{{ .Level }} id="{{ .Anchor | safeURL }}"{{ with $class }} class="{{ . }}"{{ end }}>
{{ .Text | safeHTML }}
</h{{ .Level }}>

View File

@@ -0,0 +1,20 @@
{{- $alt := .Text -}} {{- $src := .Destination -}} {{- $title := .Title -}}
<figure>
<img
src="{{ $src }}"
alt="{{ $alt }}"
loading="lazy"
{{
with
$title
}}
title="{{ . }}"
{{
end
}}
/>
{{- with $alt }}
<figcaption>{{ . }}</figcaption>
{{ end -}}
</figure>

View File

@@ -0,0 +1,30 @@
{{ define "main" }}
<h1>Archive</h1>
<div class="archive">
{{- $.Scratch.Add "year" "" -}}
{{- $.Scratch.Add "month" "" -}}
{{- range where site.Pages "Section" "posts" -}}
{{- if and (not .Draft) .Date -}}
{{- $year := .Date.Format "2006" -}}
{{- $month := .Date.Format "January" -}}
{{- if ne $year ($.Scratch.Get "year") -}}
{{- $.Scratch.Set "year" $year -}}
{{- $.Scratch.Set "month" "" -}}
<h2 class="archive-year">{{ $year }}</h2>
{{- end -}}
{{- if ne $month ($.Scratch.Get "month") -}}
{{- $.Scratch.Set "month" $month -}}
<h3 class="archive-month">{{ $month }}</h3>
{{- end -}}
<article class="archive-item">
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "02" }}</time>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</article>
{{- end -}}
{{- end -}}
</div>
{{ end }}

View File

@@ -0,0 +1,15 @@
<!doctype html>
<html
lang="{{ site.Language.Locale }}"
dir="{{ or site.Language.Direction `ltr` }}"
>
<head>
{{ partial "head.html" . }}
</head>
<body>
<a href="#main-content" class="skip-link">Skip to content</a>
<header role="banner">{{ partial "header.html" . }}</header>
<main id="main-content" role="main">{{ block "main" . }}{{ end }}</main>
<footer role="contentinfo">{{ partial "footer.html" . }}</footer>
</body>
</html>

View File

@@ -0,0 +1,14 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
<div class="time-list">
<ul>
{{ range .Pages }}
<li>
<span>{{- partial "date" .Date -}}</span>
<div><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></div>
</li>
{{ end }}
</ul>
</div>
{{ end }}

View File

@@ -0,0 +1,51 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
{{/* Table of Contents */}}
{{ $hasToC := .Params.toc | default true }}
{{ $headers := findRE "<h[2-6]" .Content }}
{{ if and $hasToC (ge (len $headers) 1) }}
<details class="toc" open>
<summary class="toc-title">Table of contents</summary>
<nav class="toc-content">
{{ .TableOfContents }}
</nav>
</details>
{{ end }}
<!-- Content -->
{{ .Content }}
<div class="time">
{{ partial "date.html" .Date }}
{{ $showReadingTime := .Params.showreadingtime | default site.Params.showreadingtime | default true }}
{{ if and $showReadingTime .ReadingTime }}
<span class="reading-time"> · {{ .ReadingTime }} min read</span>
{{ end }}
{{ $showLastMod := .Params.showlastmod | default site.Params.showlastmod | default false }}
{{ if and $showLastMod .Lastmod }}
{{ if ne .LastMod.Format "2006-01-02" .Date.Format "2006-01-02" }}
<span class="lastmod"> · Last updated: {{ .LastMod.Format "2006-01-02" }}</span>
{{ end }}
{{ end }}
</div>
<!-- Comments block -->
{{ if and .Content (default true (default .Site.Params.comments
.Params.comments))
}}
<div class="comments">{{- partial "comments" . -}}</div>
{{ end }}
{{ if not .IsHome }}
<div class="terminal-nav">
<div class="back-nav">
{{ with .Parent }}
<a href="{{ .RelPermalink }}" class="back-link">../</a>
{{ else }}
<a href="{{ "/" | relURL }}" class="back-link">../</a>
{{ end }}
</div>
</div>
{{ end }}
{{ end }}

View File

@@ -0,0 +1,2 @@
<!-- This partial can be replaced to support other commenting engines -->
{{ template "_internal/disqus.html" . }}

View File

@@ -0,0 +1 @@
<time datetime="{{ . | time.Format "2006-01-02" }}">{{ . | time.Format "2006-01-02" }}&nbsp;</time>

View File

@@ -0,0 +1,4 @@
<p role="contentinfo">
&copy; Copyright {{ now.Year }} &middot;
Thomas
</p>

View File

@@ -0,0 +1,59 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="preconnect" href="https://cdn.jsdelivr.net">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
<title>
{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title
site.Title }}{{ end }}
</title>
{{ with .Description | default .Site.Params.description }}<meta
name="description"
content="{{ . }}"
/>{{ end }} {{/* Canonical URL */}}
<link rel="canonical" href="{{ .Permalink }}" />
{{/* Open Graph */}}
<meta property="og:title" content="{{ .Title }}" />
{{ with .Description | default .Site.Params.description }}<meta
property="og:description"
content="{{ . }}"
/>{{ end }}
<meta
property="og:type"
content="{{ if .IsPage }}article{{ else }}website{{ end }}"
/>
<meta property="og:url" content="{{ .Permalink }}" />
{{ with .Site.Params.ogImage }}<meta
property="og:image"
content="{{ . | absURL }}"
/>{{ end }} {{/* Twitter Card */}}
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="{{ .Title }}" />
{{ with .Description | default .Site.Params.description }}<meta
name="twitter:description"
content="{{ . }}"
/>{{ end }} {{ with .Site.Params.twitterHandle }}<meta
name="twitter:site"
content="@{{ . }}"
/>{{ end }} {{ with .Site.Params.ogImage }}<meta
name="twitter:image"
content="{{ . | absURL }}"
/>{{ end }} {{/* RSS Feed */}} {{ with .OutputFormats.Get "rss" -}} {{ printf
`<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type
.Permalink site.Title | safeHTML }} {{ end }} {{/* JSON-LD Structured Data for
Articles */}} {{ if .IsPage }}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "{{ .Title }}",
"url": "{{ .Permalink }}",
"datePublished": "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}",
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}"
{{- with $.Description | default $.Site.Params.description }},
"description": "{{ . }}"
{{- end }}
}
</script>
{{ end }} {{ partialCached "head/favicon.html" . }} {{ partialCached
"head/css.html" . }}

View File

@@ -0,0 +1,19 @@
{{- with resources.Get "css/main.css" }}
{{- if hugo.IsDevelopment }}
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{- else }}
{{- with . | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{- end }}
{{- end }}
{{- end }}
{{- with resources.Get "css/custom.css" }}
{{- if hugo.IsDevelopment }}
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{- else }}
{{- with . | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,17 @@
<link rel="apple-touch-icon" sizes="57x57" href="{{ "favicon_io/apple-icon-57x57.png" | relURL }}">
<link rel="apple-touch-icon" sizes="60x60" href="{{ "favicon_io/apple-icon-60x60.png" | relURL }}">
<link rel="apple-touch-icon" sizes="72x72" href="{{ "favicon_io/apple-icon-72x72.png" | relURL }}">
<link rel="apple-touch-icon" sizes="76x76" href="{{ "favicon_io/apple-icon-76x76.png" | relURL }}">
<link rel="apple-touch-icon" sizes="114x114" href="{{ "favicon_io/apple-icon-114x114.png" | relURL }}">
<link rel="apple-touch-icon" sizes="120x120" href="{{ "favicon_io/apple-icon-120x120.png" | relURL }}">
<link rel="apple-touch-icon" sizes="144x144" href="{{ "favicon_io/apple-icon-144x144.png" | relURL }}">
<link rel="apple-touch-icon" sizes="152x152" href="{{ "favicon_io/apple-icon-152x152.png" | relURL }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ "favicon_io/apple-icon-180x180.png" | relURL }}">
<link rel="icon" type="image/png" sizes="192x192" href="{{ "favicon_io/android-icon-192x192.png" | relURL }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon_io/favicon-32x32.png" | relURL }}">
<link rel="icon" type="image/png" sizes="96x96" href="{{ "favicon_io/favicon-96x96.png" | relURL }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon_io/favicon-16x16.png" | relURL }}">
<link rel="manifest" href="{{ "favicon_io/manifest.json" | relURL }}">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="{{ "favicon_io/ms-icon-144x144.png" | relURL }}">
<meta name="theme-color" content="#ffffff">

View File

@@ -0,0 +1,19 @@
<nav class="path-nav" aria-label="Breadcrumb">
<ol>
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
</ol>
</nav>
{{ define "breadcrumbnav" }}
{{ if .p1.Parent }}
{{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) }}
{{ else if not .p1.IsHome }}
{{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
{{ end }}
<li{{ if eq .p1 .p2 }} class="current"{{ end }}>
{{ if .p1.IsHome }}/{{ end }}
<a href="{{ .p1.RelPermalink }}">{{ if .p1.IsHome }}{{ .p1.Site.Title }}{{ else }}{{ .p1.Title }}{{ end }}</a>
{{ if ne .p1 .p2 }}/{{ end }}
</li>
{{ end }}

View File

@@ -0,0 +1,51 @@
{{- /*
Renders a menu for the given menu ID.
@context {page} page The current page.
@context {string} menuID The menu ID.
@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }}
*/}}
{{- $page := .page }}
{{- $menuID := .menuID }}
{{- with index site.Menus $menuID }}
<nav aria-label="Main navigation">
<ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul>
</nav>
{{- end }}
{{- define "_partials/inline/menu/walk.html" }}
{{- $page := .page }}
{{- range .menuEntries }}
{{- $attrs := dict "href" .URL }}
{{- if $page.IsMenuCurrent .Menu . }}
{{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }}
{{- else if $page.HasMenuCurrent .Menu .}}
{{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }}
{{- end }}
{{- $name := .Name }}
{{- with .Identifier }}
{{- with T . }}
{{- $name = . }}
{{- end }}
{{- end }}
<li>
<a
{{- range $k, $v := $attrs }}
{{- with $v }}
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
{{- end }}
{{- end -}}
>{{ $name }}</a>
{{- with .Children }}
<ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul>
{{- end }}
</li>
{{- end }}
{{- end }}

View File

@@ -0,0 +1,22 @@
{{- /*
For a given taxonomy, renders a list of terms assigned to the page.
@context {page} page The current page.
@context {string} taxonomy The taxonomy.
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
*/}}
{{- $page := .page }}
{{- $taxonomy := .taxonomy }}
{{- with $page.GetTerms $taxonomy }}
{{- $label := (index . 0).Parent.LinkTitle }}
<div class="terms-list">
<ul>
{{- range . }}
<li><a href="{{ .RelPermalink }}">#{{ .LinkTitle }}</a></li>
{{- end }}
</ul>
</div>
{{- end }}

View File

@@ -0,0 +1,6 @@
{{ define "main" }}
{{ .Content }}
<div class="terminal-nav">
{{ partial "menu.html" (dict "menuID" "main" "page" .) }}
</div>
{{ end }}

View File

@@ -0,0 +1,4 @@
User-agent: *
Allow: /
Sitemap: {{ "sitemap.xml" | absURL }}

View File

@@ -0,0 +1,2 @@
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
<div class="mermaid" align="{{ if .Get "align" }}{{ .Get "align" }}{{ else }}center{{ end }}">{{ safeHTML .Inner }}</div>