Pass full context and use .Commit in head and footer

This commit is contained in:
ekzyis 2025-11-28 22:42:36 +01:00
parent 7d701d68a5
commit 518c4c2d42
5 changed files with 10 additions and 10 deletions

View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en-us">
{{ template "head" .Commit }}
{{ template "head" . }}
<body>
{{ template "nav" }}
<div class="container my-auto">
@ -15,6 +15,6 @@
<div class="text-center">page not found</div>
</div>
</div>
{{ template "footer" .Commit }}
{{ template "footer" . }}
</body>
</html>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en-us">
{{ template "head" .Commit }}
{{ template "head" . }}
<body>
{{ template "nav" }}
<div class="container my-auto">
@ -10,6 +10,6 @@
{{ end }}
</main>
</div>
{{ template "footer" .Commit }}
{{ template "footer" . }}
</body>
</html>

View File

@ -1,11 +1,11 @@
<!DOCTYPE html>
<html lang="en-us">
{{ template "head" .Commit }}
{{ template "head" . }}
<body>
{{ template "nav" }}
<div class="container">
{{ template "post/single" .Post }}
</div>
{{ template "footer" .Commit }}
{{ template "footer" . }}
</body>
</html>

View File

@ -20,7 +20,7 @@
</div>
<div class="flex flex-col leading-relaxed pt-1">
<small>
running <a class="underline" href="https://git.ekzy.is/ekzyis/ekzyis/commit/{{ . }}" target="_blank" rel="noopener noreferrer me">{{ . }}</a>
running <a class="underline" href="https://git.ekzy.is/ekzyis/ekzyis/commit/{{- .Commit -}}" target="_blank" rel="noopener noreferrer me">{{- .Commit -}}</a>
</small>
<small>
analytics by <a class="underline" href="https://plausible.io/ekzy.is" target="_blank" rel="noopener noreferrer me">plausible.io</a>

View File

@ -6,8 +6,8 @@
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<script defer data-domain="ekzy.is" src="https://plausible.io/js/script.js"></script>
<!-- use ?v=<commit> for cache busting -->
<link rel="stylesheet" href="/css/tailwind.css?v={{- . -}}">
<link rel="stylesheet" href="/css/post.css?v={{- . -}}">
<link rel="stylesheet" href="/css/footer.css?v={{- . -}}">
<link rel="stylesheet" href="/css/tailwind.css?v={{- .Commit -}}">
<link rel="stylesheet" href="/css/post.css?v={{- .Commit -}}">
<link rel="stylesheet" href="/css/footer.css?v={{- .Commit -}}">
</head>
{{ end }}