Initial commit
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ .Site.LanguageCode }}" class="scroll-smooth">
|
||||
<head>
|
||||
{{- partial "head.html" . -}}
|
||||
</head>
|
||||
<body
|
||||
class="bg-void text-paper font-body min-h-screen flex flex-col antialiased"
|
||||
hx-boost="true"
|
||||
hx-select="#main-content"
|
||||
hx-target="#main-content"
|
||||
hx-swap="outerHTML"
|
||||
hx-push-url="true"
|
||||
>
|
||||
|
||||
<!-- HTMX transition progress bar -->
|
||||
<div id="progress-bar" aria-hidden="true"></div>
|
||||
|
||||
{{- partial "nav.html" . -}}
|
||||
|
||||
{{- block "page-background" . -}}{{- end -}}
|
||||
|
||||
<main id="main-content" class="flex-1" style="view-transition-name: main-content">
|
||||
{{- block "main" . }}{{- end }}
|
||||
</main>
|
||||
|
||||
{{- partial "footer.html" . -}}
|
||||
|
||||
<!-- HTMX (page transitions & progressive enhancement) -->
|
||||
<script src="https://unpkg.com/htmx.org@2.0.4/dist/htmx.min.js"></script>
|
||||
<!-- Alpine.js store initialisation (must run before alpine:init) -->
|
||||
<script>
|
||||
document.addEventListener('alpine:init', () => {
|
||||
Alpine.store('nav', { path: window.location.pathname, open: false })
|
||||
})
|
||||
</script>
|
||||
<!-- Alpine.js (reactive UI — nav, interactions) -->
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.14.8/dist/cdn.min.js"></script>
|
||||
<!-- Site JS -->
|
||||
{{- $js := resources.Get "js/main.js" -}}
|
||||
{{- if eq hugo.Environment "production" -}}
|
||||
{{- $js = $js | minify | fingerprint "sha256" -}}
|
||||
{{- end -}}
|
||||
<script src="{{ $js.RelPermalink }}"{{ if eq hugo.Environment "production" }} integrity="{{ $js.Data.Integrity }}"{{ end }} defer></script>
|
||||
|
||||
{{- block "scripts" . }}{{- end }}
|
||||
|
||||
{{- if and (eq hugo.Environment "production") .Site.Params.umamiId -}}
|
||||
<!-- Umami analytics — cookie-free, self-hosted -->
|
||||
<script defer src="{{ .Site.Params.umamiSrc }}" data-website-id="{{ .Site.Params.umamiId }}"></script>
|
||||
{{- end -}}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,34 @@
|
||||
{{- define "main" -}}
|
||||
|
||||
<!-- Page header -->
|
||||
<header class="gutter-x pt-36 pb-14 border-b border-zinc speed-lines">
|
||||
<div class="max-w-4xl">
|
||||
{{- with .Data.Singular -}}
|
||||
<span class="badge badge-pulse mb-5 inline-block">{{ . | title }}</span>
|
||||
{{- else -}}
|
||||
<span class="badge badge-pulse mb-5 inline-block">{{ .Kind | title }}</span>
|
||||
{{- end -}}
|
||||
<h1 class="font-display text-5xl md:text-7xl text-paper text-balance leading-none">{{ .Title }}</h1>
|
||||
{{- with .Description -}}
|
||||
<p class="text-chalk text-lg mt-5 max-w-xl leading-relaxed text-pretty font-body">{{ . }}</p>
|
||||
{{- end -}}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="gradient-line"></div>
|
||||
|
||||
<!-- Posts grid -->
|
||||
<section class="gutter-x py-16 md:py-24">
|
||||
{{- if .Paginator.Pages -}}
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-5">
|
||||
{{- range .Paginator.Pages -}}
|
||||
{{- partial "post-card.html" . -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- partial "pagination.html" . -}}
|
||||
{{- else -}}
|
||||
<p class="label text-fog text-center py-24">No posts yet.</p>
|
||||
{{- end -}}
|
||||
</section>
|
||||
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,18 @@
|
||||
{{- define "main" -}}
|
||||
|
||||
<!-- Page header -->
|
||||
<header class="gutter-x pt-36 pb-16 border-b border-mist">
|
||||
<div class="max-w-3xl">
|
||||
<h1 class="font-display text-5xl md:text-7xl text-paper text-balance mb-5">{{ .Title }}</h1>
|
||||
{{- with .Description -}}
|
||||
<p class="text-chalk text-xl leading-relaxed text-pretty">{{ . }}</p>
|
||||
{{- end -}}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Page content -->
|
||||
<article class="gutter-x py-16 md:py-24 max-w-3xl prose-editorial">
|
||||
{{ .Content }}
|
||||
</article>
|
||||
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,32 @@
|
||||
{{- define "main" -}}
|
||||
|
||||
<!-- Taxonomy header -->
|
||||
<header class="gutter-x pt-36 pb-14 border-b border-zinc speed-lines">
|
||||
<div class="max-w-4xl">
|
||||
<span class="badge badge-frost text-void mb-5 inline-block">Browse</span>
|
||||
<h1 class="font-display text-5xl md:text-7xl text-paper leading-none">{{ .Title }}</h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="gradient-line"></div>
|
||||
|
||||
<!-- Terms badge cloud -->
|
||||
<section class="gutter-x py-16 md:py-24">
|
||||
{{- if .Data.Terms -}}
|
||||
<div class="flex flex-wrap gap-4">
|
||||
{{- range .Data.Terms.Alphabetical -}}
|
||||
<a
|
||||
href="{{ .Page.RelPermalink }}"
|
||||
class="group card-comic flex items-baseline gap-3 bg-concrete px-5 py-4 hover:border-heat transition-all"
|
||||
>
|
||||
<span class="font-display text-2xl text-paper group-hover:text-heat transition-colors leading-none">{{ .Page.Title }}</span>
|
||||
<span class="badge badge-outline text-xs ml-1 group-hover:bg-heat group-hover:text-white group-hover:border-heat transition-all">{{ .Count }}</span>
|
||||
</a>
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- else -}}
|
||||
<p class="label text-fog text-center py-24">No entries yet.</p>
|
||||
{{- end -}}
|
||||
</section>
|
||||
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user