{{- define "main" }}
{{/* Draggable low-poly easter egg — sits behind the content, purely decorative. Empty (no canvas) on phones / reduced-motion / no-WebGL. */}}
404
{{- $isZh := eq site.Language.Lang "zh" }}

{{ if $isZh }}页面未找到{{ else }}Page Not Found{{ end }}

{{ if $isZh }}这个页面好像去冒险了,找不回来了。让我们重新出发。{{ else }}Looks like this page went exploring without a map. Let's get you back on track.{{ end }}

{{- $allPages := where site.RegularPages "Lang" site.Language.Lang }} {{- $recent := first 3 ($allPages.ByDate.Reverse) }} {{- if $recent }}

{{ if $isZh }}你可能感兴趣的文章:{{ else }}Recent posts you might like:{{ end }}

{{- end }}
{{/* ── 404 draggable low-poly easter egg ───────────────────────── three.js + OrbitControls + the float module, all fingerprinted and locally hosted (same pattern as knowledge-galaxy). The module self- gates: on phones / reduced-motion / no-WebGL it mounts nothing, so this costs only a tiny deferred import there. three/addons resolve via the importmap; the bare ./webgl-guard import is bundled in. */}} {{- $three := resources.Get "js/vendor/three.module.min.js" | resources.Fingerprint "sha384" -}} {{- $orbit := resources.Get "js/vendor/addons/controls/OrbitControls.js" | resources.Fingerprint "sha384" -}} {{- $nf := resources.Get "js/three/not-found-float.js" | js.Build (dict "format" "esm" "minify" hugo.IsProduction "externals" (slice "three" "three/addons/controls/OrbitControls.js")) -}} {{- if not site.Params.assets.disableFingerprinting -}} {{- $nf = $nf | fingerprint -}} {{- end -}} {{- end }}