feat: add Prettier with go-template and toml plugins, format all files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-08 13:18:05 +02:00
parent b78bc26322
commit 436223913e
36 changed files with 1765 additions and 1178 deletions
+52 -47
View File
@@ -1,54 +1,59 @@
{{- define "main" -}}
<!-- Header -->
<header class="gutter-x pt-36 pb-14 border-b border-zinc speed-lines">
<span class="badge badge-frost text-void mb-5 inline-block">Contributors</span>
<h1 class="font-display text-5xl md:text-7xl text-paper leading-none">Authors</h1>
</header>
<!-- Header -->
<header class="gutter-x pt-36 pb-14 border-b border-zinc speed-lines">
<span class="badge badge-frost text-void mb-5 inline-block">Contributors</span>
<h1 class="font-display text-5xl md:text-7xl text-paper leading-none">Authors</h1>
</header>
<div class="gradient-line"></div>
<div class="gradient-line"></div>
<!-- Authors grid -->
<section class="gutter-x py-16 md:py-24">
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
{{- range .Pages -}}
<a href="{{ .RelPermalink }}" class="group card-comic flex flex-col items-start gap-5 p-6 bg-concrete">
<!-- Avatar — bundle avatar.* first, fall back to .Params.avatar -->
{{- $avatarRes := .Resources.GetMatch "avatar.*" -}}
{{- $avatarSrc := "" -}}
{{- with $avatarRes }}
{{ $avatarSrc = .RelPermalink }}
{{ else }}
{{ with $.Params.avatar }}{{ $avatarSrc = . }}{{ end }}
{{ end -}}
{{- if $avatarSrc -}}
<div class="w-20 h-20 overflow-hidden border border-zinc group-hover:border-heat transition-colors">
<img
src="{{ $avatarSrc }}"
alt="{{ .Params.name | default .Title }}"
class="w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"
loading="lazy"
/>
</div>
{{- else -}}
<div class="w-20 h-20 bg-zinc border border-zinc flex items-center justify-center">
<span class="font-display text-2xl text-fog">{{ substr (.Params.name | default .Title) 0 1 }}</span>
</div>
{{- end -}}
<!-- Authors grid -->
<section class="gutter-x py-16 md:py-24">
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
{{- range .Pages -}}
<a href="{{ .RelPermalink }}" class="group card-comic flex flex-col items-start gap-5 p-6 bg-concrete">
<!-- Avatar — bundle avatar.* first, fall back to .Params.avatar -->
{{- $avatarRes := .Resources.GetMatch "avatar.*" -}}
{{- $avatarSrc := "" -}}
{{- with $avatarRes }}{{ $avatarSrc = .RelPermalink }}{{ else }}{{ with $.Params.avatar }}{{ $avatarSrc = . }}{{ end }}{{ end -}}
{{- if $avatarSrc -}}
<div class="w-20 h-20 overflow-hidden border border-zinc group-hover:border-heat transition-colors">
<img
src="{{ $avatarSrc }}"
alt="{{ .Params.name | default .Title }}"
class="w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"
loading="lazy"
>
</div>
{{- else -}}
<div class="w-20 h-20 bg-zinc border border-zinc flex items-center justify-center">
<span class="font-display text-2xl text-fog">{{ substr (.Params.name | default .Title) 0 1 }}</span>
</div>
<!-- Info -->
<div class="flex-1">
<h2 class="font-display text-xl text-paper group-hover:text-heat transition-colors mb-2 leading-none">
{{ .Params.name | default .Title }}
</h2>
{{- with .Params.bio -}}
<p class="text-fog text-sm leading-relaxed line-clamp-3 mt-2 font-body">{{ . }}</p>
{{- end -}}
</div>
<span
class="badge badge-outline group-hover:bg-heat group-hover:text-white group-hover:border-heat transition-all mt-auto"
>
View works
{{ partial "icon.html" "arrow-right" }}
</span>
</a>
{{- end -}}
<!-- Info -->
<div class="flex-1">
<h2 class="font-display text-xl text-paper group-hover:text-heat transition-colors mb-2 leading-none">
{{ .Params.name | default .Title }}
</h2>
{{- with .Params.bio -}}
<p class="text-fog text-sm leading-relaxed line-clamp-3 mt-2 font-body">{{ . }}</p>
{{- end -}}
</div>
<span class="badge badge-outline group-hover:bg-heat group-hover:text-white group-hover:border-heat transition-all mt-auto">
View works {{ partial "icon.html" "arrow-right" }}
</span>
</a>
{{- end -}}
</div>
</section>
</div>
</section>
{{- end -}}
+91 -83
View File
@@ -1,97 +1,105 @@
{{- define "main" -}}
{{- $slug := .File.Dir | strings.TrimSuffix "/" | path.Base -}}
{{- $posts := where .Site.RegularPages "Params.author" $slug -}}
{{- $slug := .File.Dir | strings.TrimSuffix "/" | path.Base -}}
{{- $posts := where .Site.RegularPages "Params.author" $slug -}}
<!-- ── PROFILE HEADER ────────────────────────────────────────── -->
<header class="gutter-x pt-36 pb-20 border-b border-zinc speed-lines">
<div class="max-w-5xl mx-auto">
<div class="flex flex-col md:flex-row gap-10 md:gap-16 items-start">
<!-- Avatar — page bundle avatar.* takes precedence, falls back to .Params.avatar -->
{{- $avatarRes := .Resources.GetMatch "avatar.*" -}}
{{- $avatarSrc := "" -}}
{{- with $avatarRes }}{{ $avatarSrc = .RelPermalink }}{{ else }}{{ with $.Params.avatar }}{{ $avatarSrc = . }}{{ end }}{{ end -}}
{{- if $avatarSrc -}}
<div class="flex-shrink-0 w-36 h-36 md:w-48 md:h-48 overflow-hidden border-2 border-heat neon-heat">
<img
src="{{ $avatarSrc }}"
alt="{{ .Params.name | default .Title }}"
class="w-full h-full object-cover"
loading="lazy"
>
</div>
{{- else -}}
<div class="flex-shrink-0 w-36 h-36 md:w-48 md:h-48 bg-concrete border-2 border-zinc flex items-center justify-center">
<span class="font-display text-5xl text-smoke">{{ substr (.Params.name | default .Title) 0 1 }}</span>
</div>
{{- end -}}
<!-- Info -->
<div class="flex-1 min-w-0">
<span class="badge badge-gradient mb-5 inline-block">Artist</span>
<h1 class="font-display text-4xl md:text-6xl text-paper text-balance mb-4 leading-none">
{{ .Params.name | default .Title }}
</h1>
{{- with .Params.bio -}}
<p class="text-chalk text-lg max-w-2xl leading-relaxed text-pretty mb-8 font-body font-light">{{ . }}</p>
<!-- ── PROFILE HEADER ────────────────────────────────────────── -->
<header class="gutter-x pt-36 pb-20 border-b border-zinc speed-lines">
<div class="max-w-5xl mx-auto">
<div class="flex flex-col md:flex-row gap-10 md:gap-16 items-start">
<!-- Avatar — page bundle avatar.* takes precedence, falls back to .Params.avatar -->
{{- $avatarRes := .Resources.GetMatch "avatar.*" -}}
{{- $avatarSrc := "" -}}
{{- with $avatarRes }}
{{ $avatarSrc = .RelPermalink }}
{{ else }}
{{ with $.Params.avatar }}{{ $avatarSrc = . }}{{ end }}
{{ end -}}
{{- if $avatarSrc -}}
<div class="flex-shrink-0 w-36 h-36 md:w-48 md:h-48 overflow-hidden border-2 border-heat neon-heat">
<img
src="{{ $avatarSrc }}"
alt="{{ .Params.name | default .Title }}"
class="w-full h-full object-cover"
loading="lazy"
/>
</div>
{{- else -}}
<div
class="flex-shrink-0 w-36 h-36 md:w-48 md:h-48 bg-concrete border-2 border-zinc flex items-center justify-center"
>
<span class="font-display text-5xl text-smoke">{{ substr (.Params.name | default .Title) 0 1 }}</span>
</div>
{{- end -}}
<!-- Social links — values may be full URLs or bare slugs -->
{{- with .Params.social -}}
{{- $bases := dict "instagram" "https://instagram.com/" "x" "https://x.com/" "twitter" "https://x.com/" "github" "https://github.com/" "behance" "https://www.behance.net/" "artstation" "https://www.artstation.com/" -}}
<div class="flex flex-wrap gap-3">
{{- range $platform, $handle := . -}}
{{- $href := cond (hasPrefix $handle "http") $handle (printf "%s%s" (index $bases $platform | default "#") $handle) -}}
<a
href="{{ $href }}"
target="_blank"
rel="noopener noreferrer"
class="badge badge-outline"
>{{ $platform | upper }} {{ partial "icon.html" "arrow-external" }}</a>
<!-- Info -->
<div class="flex-1 min-w-0">
<span class="badge badge-gradient mb-5 inline-block">Artist</span>
<h1 class="font-display text-4xl md:text-6xl text-paper text-balance mb-4 leading-none">
{{ .Params.name | default .Title }}
</h1>
{{- with .Params.bio -}}
<p class="text-chalk text-lg max-w-2xl leading-relaxed text-pretty mb-8 font-body font-light">{{ . }}</p>
{{- end -}}
<!-- Social links — values may be full URLs or bare slugs -->
{{- with .Params.social -}}
{{- $bases := dict "instagram" "https://instagram.com/" "x" "https://x.com/" "twitter" "https://x.com/" "github" "https://github.com/" "behance" "https://www.behance.net/" "artstation" "https://www.artstation.com/" -}}
<div class="flex flex-wrap gap-3">
{{- range $platform, $handle := . -}}
{{- $href := cond (hasPrefix $handle "http") $handle (printf "%s%s" (index $bases $platform | default "#") $handle) -}}
<a href="{{ $href }}" target="_blank" rel="noopener noreferrer" class="badge badge-outline"
>{{ $platform | upper }} {{ partial "icon.html" "arrow-external" }}</a
>
{{- end -}}
</div>
{{- end -}}
<!-- Post count -->
{{- if $posts -}}
<p class="label text-fog mt-6">
{{ len $posts }} {{ if eq (len $posts) 1 }}editorial{{ else }}editorials{{ end }}
</p>
{{- end -}}
</div>
{{- end -}}
<!-- Post count -->
{{- if $posts -}}
<p class="label text-fog mt-6">{{ len $posts }} {{ if eq (len $posts) 1 }}editorial{{ else }}editorials{{ end }}</p>
{{- end -}}
</div>
</div>
</div>
</header>
</header>
<div class="gradient-line"></div>
<div class="gradient-line"></div>
<!-- ── AUTHOR BIO (Markdown body) ────────────────────────────── -->
{{- with .Content -}}
<div class="gutter-x py-12 border-b border-zinc">
<div class="max-w-5xl mx-auto prose-editorial">{{ . }}</div>
</div>
{{- end -}}
<!-- ── AUTHOR BIO (Markdown body) ────────────────────────────── -->
{{- with .Content -}}
<div class="gutter-x py-12 border-b border-zinc">
<div class="max-w-5xl mx-auto prose-editorial">{{ . }}</div>
</div>
{{- end -}}
<!-- ── AUTHOR'S POSTS ─────────────────────────────────────────── -->
{{- if $posts -}}
<section class="gutter-x py-16 md:py-24">
<div class="max-w-5xl mx-auto">
<div class="flex items-center gap-5 mb-10">
<h2 class="font-display text-3xl md:text-5xl text-paper leading-none">
Works by <span class="text-gradient">{{ .Params.name | default .Title }}</span>
</h2>
<div class="flex-1 gradient-line ml-2"></div>
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-5">
{{- range first 4 ($posts.ByDate.Reverse) -}}
{{- partial "post-card.html" . -}}
{{- end -}}
</div>
</div>
</section>
{{- else -}}
<div class="gutter-x py-24 text-center">
<p class="label text-fog">No editorials published yet.</p>
</div>
{{- end -}}
<!-- ── AUTHOR'S POSTS ─────────────────────────────────────────── -->
{{- if $posts -}}
<section class="gutter-x py-16 md:py-24">
<div class="max-w-5xl mx-auto">
<div class="flex items-center gap-5 mb-10">
<h2 class="font-display text-3xl md:text-5xl text-paper leading-none">
Works by <span class="text-gradient">{{ .Params.name | default .Title }}</span>
</h2>
<div class="flex-1 gradient-line ml-2"></div>
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-5">
{{- range first 4 ($posts.ByDate.Reverse) -}}
{{- partial "post-card.html" . -}}
{{- end -}}
</div>
</div>
</section>
{{- else -}}
<div class="gutter-x py-24 text-center">
<p class="label text-fog">No editorials published yet.</p>
</div>
{{- end -}}
{{- end -}}