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:
1 parent
c99b000b1d
commit
1c1878cfca
3 files changed
+38
-4
No files matched your search
@@ -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">
|
||||
|
||||
Reference in new issue
Block a user