✨ v3 theme: glass UI, landing layout, a11y, perf, print styles

Floating glass header with ⌘K search, landing homepage layout with
hero image and GitHub-stars CTA, background canvas with dissolving
heroes, burufugu colour scheme, movie-quote 404, taxonomy pills,
keyboard/ARIA accessibility across menus, search and tabs, idle-
loaded third-party scripts, and dedicated print styles.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Nuno CoraçãoandClaude Fable 5 authored and Nuno C. committed 2026-08-17 20:19:02 +01:00
1 parent 5b0cd34d5b
commit 09f0573749
47 files changed
+1098 -375

No files matched your search

+48 -11
View File
@@ -39,18 +39,55 @@
{{- partial "search.html" . -}}
{{ end }}
</div>
{{/* Rendered after the main block so page heroes that paint their own
fixed background can suppress the site-wide canvas for their page.
The layer is fixed, so its position in the DOM has no visual effect. */}}
{{ if and (site.Params.backgroundCanvas | default false) (not (.Store.Get "suppressBackgroundCanvas")) }}
{{ $default := site.Store.Get "defaultBackgroundImage" }}
{{ $canvasURL := $default.url }}
{{ if not $canvasURL }}
{{ with $default.obj }}{{ $canvasURL = .RelPermalink }}{{ end }}
{{ end }}
{{ with $canvasURL }}
<div id="background-canvas" aria-hidden="true" class="pointer-events-none fixed inset-0 -z-20">
<img
src="{{ . }}"
role="presentation"
loading="eager"
decoding="async"
class="nozoom h-full w-full object-cover" />
<div class="absolute inset-0 bg-neutral/75 dark:bg-neutral-800/60"></div>
</div>
{{ end }}
{{ end }}
</body>
{{ if site.Params.buymeacoffee.globalWidget | default false }}
<script
data-name="BMC-Widget"
data-cfasync="false"
src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js"
data-id="{{ site.Params.buymeacoffee.identifier }}"
data-description="Support me on Buy me a coffee!"
{{ with site.Params.buymeacoffee.globalWidgetMessage }}data-message="{{ . }}"{{ end }}
{{ with site.Params.buymeacoffee.globalWidgetColor | default `#FFDD00` }}data-color="{{ . }}"{{ end }}
{{ with site.Params.buymeacoffee.globalWidgetPosition }}data-position="{{ . }}"{{ end }}
data-x_margin="18"
data-y_margin="18"></script>
{{/* Inject the third-party widget after the page is idle so it never
competes with rendering-critical resources. */}}
<script>
(function () {
var load = function () {
var s = document.createElement("script");
s.src = "https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js";
s.setAttribute("data-name", "BMC-Widget");
s.setAttribute("data-cfasync", "false");
s.setAttribute("data-id", {{ site.Params.buymeacoffee.identifier }});
s.setAttribute("data-description", "Support me on Buy me a coffee!");
{{ with site.Params.buymeacoffee.globalWidgetMessage }}s.setAttribute("data-message", {{ . }});{{ end }}
s.setAttribute("data-color", {{ site.Params.buymeacoffee.globalWidgetColor | default `#FFDD00` }});
{{ with site.Params.buymeacoffee.globalWidgetPosition }}s.setAttribute("data-position", {{ . }});{{ end }}
s.setAttribute("data-x_margin", "18");
s.setAttribute("data-y_margin", "18");
document.body.appendChild(s);
};
if ("requestIdleCallback" in window) {
requestIdleCallback(load, { timeout: 4000 });
} else {
window.addEventListener("load", function () {
setTimeout(load, 1500);
});
}
})();
</script>
{{ end }}
</html>