Modern style as the new default; style axis, slate palette, nav groups and icons

A third appearance axis, PageHeader.Style (<html data-style>), with
StyleModern -- the default when Style is empty -- and StyleClassic, the
look up to v0.4.x. The modern style is one [data-style="modern"] block
at the end of style.css over the classic rules: navbar without a rule,
the sidebar as a floating rounded card with group headings, icons and
a pill for the active entry, rounder and quieter Bootstrap components.
In it inactive sidebar links use the text color; #0b82b8 now only
colors them in the classic style (owner decision 2026-11-28).

- appearance menu: "Style"/"Stil" section, cookie yw_style
- palette slate (dark slate and lavender)
- NavItem.Group (sidebar group headings) and NavItem.Icon (names from
  the new NavIcons set, shown only in the modern style)
- cmd/webui-demo: a sample page for comparing styles, palettes and modes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
terminarandClaude Opus 5.5 committed 2026-11-28 11:11:28 +01:00
1 parent 7afb6a022a
commit 33dfebab9e
13 files changed
+771 -28

No files matched your search

+6 -6
View File
@@ -47,7 +47,7 @@ func TestNewRendererAndPage(t *testing.T) {
`class="nav-link active"`,
"test-build",
"<title>Dashboard · example</title>",
`<html lang="en">`,
`<html lang="en" data-style="modern">`,
"<body>",
} {
if !strings.Contains(out, want) {
@@ -75,7 +75,7 @@ func TestPageHeaderOverrides(t *testing.T) {
out := buf.String()
for _, want := range []string{
`<html lang="de">`,
`<html lang="de" data-style="modern">`,
`<body x-data="{ open: true }">`,
`sidebar d-md-block" :class="{ hidden: !open }">`,
} {
@@ -96,10 +96,10 @@ func TestThemeAttribute(t *testing.T) {
theme string
want string
}{
{"unset resolves to the bare :root theme", "", `<html lang="en">`},
{"explicit dark", ThemeDark, `<html lang="en" data-theme="dark">`},
{"light", ThemeLight, `<html lang="en" data-theme="light">`},
{"system", ThemeSystem, `<html lang="en" data-theme="system">`},
{"unset resolves to the bare :root theme", "", `<html lang="en" data-style="modern">`},
{"explicit dark", ThemeDark, `<html lang="en" data-theme="dark" data-style="modern">`},
{"light", ThemeLight, `<html lang="en" data-theme="light" data-style="modern">`},
{"system", ThemeSystem, `<html lang="en" data-theme="system" data-style="modern">`},
}
for _, c := range cases {
t.Run(c.name, func(t *testing.T) {