feat: updates

This commit is contained in:
2025-08-17 22:09:53 +02:00
parent 998e955ec8
commit 8c0dc905d9
18 changed files with 869 additions and 776 deletions

View File

@@ -4,15 +4,37 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} · {{ .Site.Title }}{{ end }}</title>
<link rel="stylesheet" href="/css/theme.css">
<link id="chroma-latte" rel="stylesheet" href="/css/latte-chroma-style.css">
<link id="chroma-mocha" rel="stylesheet" href="/css/mocha-chroma-style.css" disabled>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Rubik:wght@300..900&display=swap" rel="stylesheet">
<script>
window.tailwind = { config: { darkMode: 'class', theme: { extend: { fontFamily: { sans: ['Rubik','ui-sans-serif','system-ui','-apple-system','Segoe UI','Roboto','Helvetica Neue','Arial','Noto Sans'] } } } } };
(function() {
var root = document.documentElement;
try {
var stored = localStorage.getItem('theme');
var prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
var initial = stored || (prefersDark ? 'mocha' : 'latte');
root.setAttribute('data-theme', initial);
if (initial === 'mocha') root.classList.add('dark'); else root.classList.remove('dark');
} catch (e) {
root.setAttribute('data-theme', 'mocha');
root.classList.add('dark');
}
})();
</script>
<link rel="stylesheet" href="/css/app.css">
<script defer src="/theme.js"></script>
</head>
<body>
<body class="{{ if .IsHome }}is-home {{ end }}font-sans">
{{ partial "header.html" . }}
<main>
<main class="container main-container max-w-prose mx-auto px-4 py-8 md:py-12">
{{ block "main" . }}{{ end }}
</main>
<footer class="site-footer">
<div class="container max-w-prose mx-auto px-4 py-4 text-sm text-ctp-subtext0">
<small>© {{ now.Year }} {{ .Site.Title }} | Powered by <a class="underline" href="https://gohugo.io">Hugo</a></small>
</div>
</footer>
</body>
</html>

View File

@@ -1,18 +1,16 @@
{{ define "main" }}
<section>
<h1>{{ .Title }}</h1>
{{ range .Pages.ByDate.Reverse }}
<article class="post-card">
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
<div class="post-meta">
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
{{ with .Params.tags }}
· {{ range . }}<span class="tag">#{{ . }}</span>{{ end }}
{{ end }}
</div>
{{ with .Summary }}<p>{{ . }}</p>{{ end }}
</article>
{{ end }}
<h1 class="sr-only">{{ .Title }}</h1>
<ul class="grid grid-cols-1 gap-4">
{{ range .Pages.ByDate.Reverse }}
<li class="border border-ctp-surface1 rounded-xl bg-ctp-base/70 px-4 py-3">
<a class="flex items-baseline justify-between gap-4 no-underline text-inherit" href="{{ .RelPermalink }}">
<span class="font-semibold">{{ .Title }}</span>
<time class="text-sm text-ctp-subtext0" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>
</a>
</li>
{{ end }}
</ul>
</section>
{{ end }}

View File

@@ -1,15 +1,23 @@
{{ define "main" }}
<article class="with-sidenotes">
<header>
<h1>{{ .Title }}</h1>
<article class="post">
<header class="post-header">
<h1 class="post-title">{{ .Title }}</h1>
<div class="post-meta">
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>
{{ with .Params.tags }}
· {{ range . }}<span class="tag">#{{ . }}</span>{{ end }}
{{ end }}
</div>
</header>
<div class="content">{{ .Content }}</div>
<nav class="post-nav">
{{ with .PrevInSection }}
<a class="post-nav__prev" href="{{ .RelPermalink }}">← {{ .Title }}</a>
{{ end }}
{{ with .NextInSection }}
<a class="post-nav__next" href="{{ .RelPermalink }}">{{ .Title }} →</a>
{{ end }}
</nav>
</article>
{{ end }}