diff options
| author | eltrac <hi@eltr.ac> | 2026-04-15 13:45:32 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-04-15 13:45:32 +0800 |
| commit | eb2689e610da498d0c235158c14495adb4b676ad (patch) | |
| tree | 0e799535648e6eb240008437782f68c1337fd2e1 | |
| parent | 63e45106035f4e395514b14f1edb8b0b68b231c4 (diff) | |
perf(a11y): hide theme switch when JS is disabled
| -rw-r--r-- | layouts/_partials/header/theme-switch.html | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/layouts/_partials/header/theme-switch.html b/layouts/_partials/header/theme-switch.html index dd2026a..6318e5d 100644 --- a/layouts/_partials/header/theme-switch.html +++ b/layouts/_partials/header/theme-switch.html @@ -7,3 +7,11 @@ <option value="{{ . }}">{{ T (printf "theme.%s" .) }}</option> {{ end }} </select> + +<noscript> + <style> + #theme-select { + display: none + } + </style> +</noscript> |
