Add PageHeader.Lang, BodyAttrs, SidebarAttrs escape hatches

Lang: <html lang> override (defaults to "en") for a non-English UI.
BodyAttrs/SidebarAttrs: raw extra attributes spliced into <body> and
the sidebar's <nav> tag, typed template.HTMLAttr (not template.HTML --
the contextual autoescaper requires the attribute-list sentinel type
in this position or it silently drops the value). Needed by yakwui's
Alpine.js-driven collapsible mobile sidebar, which has no other way to
carry x-data state onto a common ancestor of the toggle button and the
sidebar nav.
This commit is contained in:
terminar committed 2026-09-01 09:40:26 +02:00
1 parent c99b000b1d
commit 1c1878cfca
3 files changed
+38 -4

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
{{define "base"}}<!doctype html>
<html lang="en">
<html lang="{{if .Lang}}{{.Lang}}{{else}}en{{end}}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">