✨ 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

@@ -1,15 +1,5 @@
{{ $mobileMenuStyle := .Site.Params.header.mobileMenuStyle | default "fullscreen" }}
<div class="relative flex items-center h-14 gap-4">
{{ if .Site.Params.enableSearch | default false }}
<button
id="search-button-mobile"
aria-label="Search"
class="flex items-center justify-center bf-icon-color-hover"
title="{{ i18n "search.open_button_title" }}">
{{ partial "icon.html" "search" }}
</button>
{{ end }}
{{ if .Site.Params.footer.showAppearanceSwitcher | default false }}
<button
id="appearance-switcher-mobile"
@@ -26,33 +16,59 @@
</button>
{{ end }}
{{ if .Site.Params.enableSearch | default false }}
<button
id="search-button-mobile"
aria-label="{{ i18n "search.open_button_title" }}"
class="flex items-center justify-center bf-icon-color-hover"
title="{{ i18n "search.open_button_title" }}">
{{ partial "icon.html" "search" }}
</button>
{{ end }}
{{ if or
.Site.Menus.main
.Site.Menus.subnavigation
.Site.Params.enableA11y
}}
<input type="checkbox" id="mobile-menu-toggle" autocomplete="off" class="hidden peer">
<label for="mobile-menu-toggle" class="flex items-center justify-center cursor-pointer bf-icon-color-hover">
<label
for="mobile-menu-toggle"
tabindex="0"
role="button"
aria-expanded="false"
aria-controls="mobile-menu-dialog"
aria-label="{{ i18n "nav.main_menu" }}"
class="flex items-center justify-center cursor-pointer bf-icon-color-hover">
{{ partial "icon.html" "bars" }}
</label>
<div
id="mobile-menu-dialog"
role="dialog"
aria-modal="true"
aria-label="{{ i18n "nav.main_menu" }}"
style="scrollbar-gutter: stable;"
class="z-50 invisible overflow-y-auto opacity-0 transition-[opacity,visibility] duration-300 peer-checked:visible peer-checked:opacity-100
{{ if eq $mobileMenuStyle "dropdown" }}
absolute end-0 top-[calc(100%+0.75rem)] w-[min(22rem,calc(100vw-1.5rem))] rounded-2xl border border-neutral-200/80 bg-neutral/95 p-5 shadow-2xl shadow-neutral-950/20 backdrop-blur-xl dark:border-neutral-700/80 dark:bg-neutral-800/95
absolute end-0 top-[calc(100%+0.75rem)] z-10 w-[min(22rem,calc(100vw-1.5rem))] rounded-2xl border border-neutral-200/80 bg-neutral/95 p-5 shadow-2xl shadow-neutral-900/20 dark:border-neutral-700/80 dark:bg-neutral-800/95
{{ else }}
fixed inset-0 px-6 py-20 bg-neutral-50/97 dark:bg-neutral-900/99
{{ end }}
{{ if site.Params.enableStyledScrollbar | default true }}bf-scrollbar{{ end }}">
<label
for="mobile-menu-toggle"
tabindex="0"
role="button"
aria-expanded="false"
aria-controls="mobile-menu-dialog"
class="{{ if eq $mobileMenuStyle "dropdown" }}absolute end-3 top-3 h-10 w-10 rounded-xl{{ else }}fixed end-8 top-5 z-50 h-12 w-12 rounded-full{{ end }} flex items-center justify-center cursor-pointer select-none bf-icon-color-hover border bf-border-color bf-border-color-hover bg-neutral-50 dark:bg-neutral-900">
<span class="sr-only">{{ i18n "nav.close_menu" }}</span>
{{ partial "icon.html" "xmark" }}
</label>
<nav class="{{ if eq $mobileMenuStyle "dropdown" }}mt-10 space-y-3{{ else }}mx-auto max-w-md space-y-6{{ end }}">
<nav
aria-label="{{ i18n "nav.mobile_menu" }}"
class="{{ if eq $mobileMenuStyle "dropdown" }}mt-10 space-y-3{{ else }}mx-auto max-w-md space-y-6{{ end }}">
{{ template "mobile-main-menu" . }}
{{ template "mobile-subnavigation" . }}
{{ template "mobile-footer-components" . }}
@@ -65,29 +81,35 @@
{{ range .Site.Menus.main }}
{{ $submenuId := printf "fullscreen-submenu-%s" (.Identifier | default .Name | anchorize) }}
<div class="px-2">
<a
href="{{ .URL }}"
{{ with or .Name .Pre }}aria-label="{{ . }}"{{ end }}
{{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}
target="_blank"
{{ end }}
class="flex items-center gap-4 group bf-icon-color-hover text-neutral-700 dark:text-neutral-200">
{{ if .Pre }}
<span class="flex items-center justify-center h-8 w-8 text-2xl">
{{ partial "icon.html" .Pre }}
<div class="flex items-center gap-4">
<a
href="{{ .URL }}"
{{ with or .Name .Pre }}aria-label="{{ . }}"{{ end }}
{{ if or (strings.HasPrefix .URL "http:" ) (strings.HasPrefix .URL "https:" ) }}
target="_blank"
{{ end }}
class="flex grow items-center gap-4 group bf-icon-color-hover text-neutral-700 dark:text-neutral-200">
{{ if .Pre }}
<span class="flex items-center justify-center h-8 w-8 text-2xl">
{{ partial "icon.html" .Pre }}
</span>
{{ end }}
<span title="{{ .Title }}" class="text-2xl font-bold tracking-tight">
{{ .Name | markdownify }}
</span>
{{ end }}
<span title="{{ .Title }}" class="text-2xl font-bold tracking-tight">
{{ .Name | markdownify }}
</span>
</a>
{{ if .HasChildren }}
<label
for="{{ $submenuId }}"
tabindex="0"
role="button"
aria-expanded="true"
aria-label="{{ i18n "nav.toggle_submenu" }}"
class="ms-auto flex items-center justify-center h-10 w-10 cursor-pointer rounded-lg bf-icon-color-hover border bf-border-color bf-border-color-hover">
{{ partial "icon.html" "chevron-down" }}
</label>
{{ end }}
</a>
</div>
{{ if .HasChildren }}
<input checked type="checkbox" id="{{ $submenuId }}" autocomplete="off" class="hidden peer/full">