Compare commits
3
Commits
3b8e1f7a1f
...
84624fec33
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84624fec33 | ||
|
|
36767c3d4d | ||
|
|
9af45979f1 |
+1
-1
@@ -137,7 +137,7 @@
|
||||
<p class="font-display text-3xl md:text-5xl text-paper leading-tight text-balance mb-10">
|
||||
{{ .Site.Params.description }}
|
||||
</p>
|
||||
<a href="/about/" class="btn btn-outline">Learn more {{ partial "icon.html" "arrow-right" }}</a>
|
||||
<a href="/about/" class="btn btn-outline">About the magazine {{ partial "icon.html" "arrow-right" }}</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -3,18 +3,16 @@
|
||||
*/ -}}
|
||||
<div class="flex items-center gap-4 py-6 border-t border-b border-zinc my-8">
|
||||
{{- $avatarRes := .Resources.GetMatch "avatar.*" -}}
|
||||
{{- $avatarSrc := "" -}}
|
||||
{{- with $avatarRes }}{{ $avatarSrc = .RelPermalink }}{{ else }}{{ with $.Params.avatar }}{{ $avatarSrc = . }}{{ end }}{{ end -}}
|
||||
{{- with $avatarSrc -}}
|
||||
{{- if $avatarRes -}}
|
||||
{{- $av := $avatarRes.Resize "96x webp" -}}
|
||||
<a href="{{ $.RelPermalink }}" class="flex-shrink-0">
|
||||
<img
|
||||
src="{{ . }}"
|
||||
alt="{{ $.Params.name | default $.Title }}"
|
||||
class="w-12 h-12 object-cover border border-zinc hover:border-heat transition-colors"
|
||||
loading="lazy"
|
||||
>
|
||||
<img src="{{ $av.RelPermalink }}" alt="{{ $.Params.name | default $.Title }}" class="w-12 h-12 object-cover border border-zinc hover:border-heat transition-colors" width="{{ $av.Width }}" height="{{ $av.Height }}" loading="lazy" decoding="async">
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- else -}}{{- with .Params.avatar -}}
|
||||
<a href="{{ $.RelPermalink }}" class="flex-shrink-0">
|
||||
<img src="{{ . }}" alt="{{ $.Params.name | default $.Title }}" class="w-12 h-12 object-cover border border-zinc hover:border-heat transition-colors" loading="lazy" decoding="async">
|
||||
</a>
|
||||
{{- end -}}{{- end -}}
|
||||
<div class="min-w-0">
|
||||
<a href="{{ .RelPermalink }}" class="label text-heat hover:text-frost transition-colors block mb-1">
|
||||
{{ .Params.name | default .Title }}
|
||||
|
||||
@@ -57,10 +57,12 @@
|
||||
<!-- JSON-LD structured data -->
|
||||
{{- partial "schema.html" . -}}
|
||||
|
||||
<!-- Fonts — Bebas Neue + Barlow + Share Tech Mono -->
|
||||
<!-- Fonts — Bebas Neue + Barlow + Share Tech Mono (non-render-blocking) -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Share+Tech+Mono&display=swap">
|
||||
<link rel="preload" as="style" href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Share+Tech+Mono&display=swap">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Share+Tech+Mono&display=swap" media="print" onload="this.media='all'">
|
||||
<noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Share+Tech+Mono&display=swap"></noscript>
|
||||
|
||||
<!-- CSS via Hugo Pipes + PostCSS + Tailwind v4 -->
|
||||
{{- $css := resources.Get "css/main.css" | css.PostCSS -}}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
{{- /*
|
||||
Renders a Hugo image resource as an optimised WebP <img> with responsive srcset.
|
||||
|
||||
Parameters:
|
||||
res — Hugo image resource (required)
|
||||
widths — slice of pixel widths to generate, e.g. (slice 600 1200)
|
||||
default: (slice 800 1600)
|
||||
sizes — value for the <img sizes> attribute
|
||||
default: "100vw"
|
||||
class — CSS classes applied to <img>
|
||||
alt — alt text (default "")
|
||||
loading — "lazy" or "eager" (default "lazy")
|
||||
*/ -}}
|
||||
{{- $res := .res -}}
|
||||
{{- $widths := .widths | default (slice 800 1600) -}}
|
||||
{{- $sizes := .sizes | default "100vw" -}}
|
||||
{{- $class := .class | default "" -}}
|
||||
{{- $alt := .alt | default "" -}}
|
||||
{{- $loading := .loading | default "lazy" -}}
|
||||
|
||||
{{- $entries := slice -}}
|
||||
{{- $primary := $res -}}
|
||||
{{- range $i, $w := $widths -}}
|
||||
{{- $img := $res.Resize (printf "%dx webp" $w) -}}
|
||||
{{- $entries = $entries | append (printf "%s %dw" $img.RelPermalink $w) -}}
|
||||
{{- if eq $i 0 -}}{{- $primary = $img -}}{{- end -}}
|
||||
{{- end -}}
|
||||
<img
|
||||
class="{{ $class }}"
|
||||
src="{{ $primary.RelPermalink }}"
|
||||
srcset="{{ delimit $entries ", " }}"
|
||||
sizes="{{ $sizes }}"
|
||||
alt="{{ $alt }}"
|
||||
width="{{ $primary.Width }}"
|
||||
height="{{ $primary.Height }}"
|
||||
loading="{{ $loading }}"
|
||||
decoding="async"
|
||||
>
|
||||
@@ -10,7 +10,7 @@
|
||||
:class="$store.nav.open || scrolled ? 'bg-ink/95 backdrop-blur-md shadow-[0_1px_0_var(--color-zinc)]' : ''"
|
||||
>
|
||||
<!-- Logotype -->
|
||||
<a href="/" class="logo-glitch flex items-center gap-3 hover:opacity-90 transition-opacity" aria-label="{{ .Site.Title }} Home">
|
||||
<a href="/" class="logo-glitch flex items-center gap-3 hover:opacity-90 transition-opacity" aria-label="{{ .Site.Params.logoText }} Home">
|
||||
{{- partial "logo.html" (dict "id" "nav" "class" "h-8 w-auto flex-shrink-0") -}}
|
||||
<span class="text-gradient font-display text-2xl md:text-3xl leading-none tracking-wide">
|
||||
{{- .Site.Params.logoText -}}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{{- if not $thumb -}}{{- $thumb = $post.Resources.GetMatch "01.png" -}}{{- end -}}
|
||||
<div class="card-media w-full h-full absolute inset-0">
|
||||
{{- if $thumb -}}
|
||||
<img class="w-full h-full object-cover" src="{{ $thumb.RelPermalink }}" alt="{{ $post.Title }}" loading="lazy" decoding="async">
|
||||
{{- partial "img.html" (dict "res" $thumb "widths" (slice 800 1200) "sizes" "(max-width: 768px) 100vw, 50vw" "class" "w-full h-full object-cover" "alt" $post.Title) -}}
|
||||
{{- else -}}{{- with $post.Params.banner -}}
|
||||
{{- partial "media.html" (dict "media" . "class" "w-full h-full object-cover") -}}
|
||||
{{- else -}}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{{- if not $thumb -}}{{- $thumb = $post.Resources.GetMatch "01.png" -}}{{- end -}}
|
||||
<div class="card-media aspect-editorial">
|
||||
{{- if $thumb -}}
|
||||
<img class="w-full h-full object-cover" src="{{ $thumb.RelPermalink }}" alt="{{ $post.Title }}" loading="lazy" decoding="async">
|
||||
{{- partial "img.html" (dict "res" $thumb "widths" (slice 600 1000) "sizes" "(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 25vw" "class" "w-full h-full object-cover" "alt" $post.Title) -}}
|
||||
{{- else -}}{{- with $post.Params.banner -}}
|
||||
{{- partial "media.html" (dict "media" . "class" "w-full h-full object-cover") -}}
|
||||
{{- else -}}
|
||||
@@ -40,16 +40,12 @@
|
||||
{{- $authorPage := site.GetPage (printf "authors/%s" .) -}}
|
||||
{{- with $authorPage -}}
|
||||
{{- $avRes := .Resources.GetMatch "avatar.*" -}}
|
||||
{{- $avSrc := "" -}}
|
||||
{{- with $avRes }}{{ $avSrc = .RelPermalink }}{{ else }}{{ with $.Params.avatar }}{{ $avSrc = . }}{{ end }}{{ end -}}
|
||||
{{- with $avSrc -}}
|
||||
<img
|
||||
src="{{ . }}"
|
||||
alt="{{ $authorPage.Params.name | default $authorPage.Title }}"
|
||||
class="w-5 h-5 object-cover border border-smoke flex-shrink-0"
|
||||
loading="lazy"
|
||||
>
|
||||
{{- end -}}
|
||||
{{- if $avRes -}}
|
||||
{{- $av := $avRes.Resize "64x webp" -}}
|
||||
<img src="{{ $av.RelPermalink }}" alt="{{ $authorPage.Params.name | default $authorPage.Title }}" class="w-5 h-5 object-cover border border-smoke flex-shrink-0" width="{{ $av.Width }}" height="{{ $av.Height }}" loading="lazy" decoding="async">
|
||||
{{- else -}}{{- with .Params.avatar -}}
|
||||
<img src="{{ . }}" alt="{{ $authorPage.Params.name | default $authorPage.Title }}" class="w-5 h-5 object-cover border border-smoke flex-shrink-0" loading="lazy" decoding="async">
|
||||
{{- end -}}{{- end -}}
|
||||
<span class="label text-fog">{{ .Params.name | default .Title }}</span>
|
||||
<span class="text-smoke" aria-hidden="true">/</span>
|
||||
{{- end -}}
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
{{- if not $bannerImg -}}{{- $bannerImg = .Resources.GetMatch "01.png" -}}{{- end -}}
|
||||
{{- if $bannerImg -}}
|
||||
<div class="w-full overflow-hidden mb-16 md:mb-24" style="max-height: 75vh">
|
||||
<img class="w-full object-cover" src="{{ $bannerImg.RelPermalink }}" alt="{{ .Title }}" loading="eager" decoding="async">
|
||||
{{- partial "img.html" (dict "res" $bannerImg "widths" (slice 1200 1800) "sizes" "100vw" "class" "w-full object-cover" "alt" .Title "loading" "eager") -}}
|
||||
</div>
|
||||
{{- else -}}{{- with .Params.banner -}}
|
||||
<div class="w-full overflow-hidden mb-16 md:mb-24" style="max-height: 75vh">
|
||||
@@ -116,7 +116,7 @@
|
||||
{{- if $video -}}
|
||||
<video class="w-full" src="{{ $video.RelPermalink }}" poster="{{ .RelPermalink }}" autoplay loop muted playsinline></video>
|
||||
{{- else -}}
|
||||
<img class="w-full" src="{{ .RelPermalink }}" alt="" loading="lazy" decoding="async">
|
||||
{{- partial "img.html" (dict "res" . "widths" (slice 800 1200) "sizes" "(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw" "class" "w-full") -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
</figure>
|
||||
|
||||
@@ -15,6 +15,7 @@ server {
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
add_header X-Robots-Tag "index, follow" always;
|
||||
|
||||
# Static assets with long cache
|
||||
location ~* \.(css|js|jpg|jpeg|png|gif|ico|svg|woff|woff2|ttf|eot|webp|mp3|mp4|webm|ogg)$ {
|
||||
|
||||
Reference in New Issue
Block a user