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:
1 parent
7afb6a022a
commit
33dfebab9e
13 files changed
+771
-28
No files matched your search
@@ -1,5 +1,5 @@
|
||||
{{define "base"}}<!doctype html>
|
||||
<html lang="{{if .Lang}}{{.Lang}}{{else}}en{{end}}"{{if .Theme}} data-theme="{{.Theme}}"{{end}}{{if .Palette}} data-palette="{{.Palette}}"{{end}}>
|
||||
<html lang="{{if .Lang}}{{.Lang}}{{else}}en{{end}}"{{if .Theme}} data-theme="{{.Theme}}"{{end}}{{if .Palette}} data-palette="{{.Palette}}"{{end}} data-style="{{if .Style}}{{.Style}}{{else}}modern{{end}}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
{{.NavbarLeftExtra}}
|
||||
</div>
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
{{if .Username}}<span class="navbar-subtitle">{{.Username}}</span>{{end}}
|
||||
{{if .Username}}<span class="navbar-subtitle yw-user">{{.Username}}</span>{{end}}
|
||||
{{if .AppearancePath}}{{with .AppearanceMenu}}<details class="yw-appearance">
|
||||
<summary class="btn btn-outline-secondary btn-sm" title="{{.ThemeHeading}}: {{.Current.Label}}"><span aria-hidden="true">{{.Current.Symbol}}</span> {{.Current.Label}}</summary>
|
||||
<form method="post" action="{{$.BasePath}}{{$.AppearancePath}}" class="yw-appearance-menu m-0">
|
||||
@@ -18,6 +18,9 @@
|
||||
{{end}}<hr>
|
||||
<h6>{{.PaletteHeading}}</h6>
|
||||
{{range .Palettes}}<button type="submit" name="palette" value="{{.ID}}" aria-pressed="{{.Current}}">{{.Label}}</button>
|
||||
{{end}}<hr>
|
||||
<h6>{{.StyleHeading}}</h6>
|
||||
{{range .Styles}}<button type="submit" name="style" value="{{.ID}}" aria-pressed="{{.Current}}">{{.Label}}</button>
|
||||
{{end}}</form>
|
||||
</details>
|
||||
{{end}}{{end}}{{if .LogoutPath}}<form method="post" action="{{.BasePath}}{{.LogoutPath}}" class="d-inline m-0"><button type="submit" class="btn btn-outline-secondary btn-sm">Logout</button></form>{{end}}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{{define "sidebar"}}
|
||||
<div class="nav flex-column pt-2">
|
||||
{{range .NavItems}}<a class="nav-link{{if eq $.ActiveNav .ID}} active{{end}}" href="{{$.BasePath}}{{.Href}}">{{.Label}}</a>
|
||||
{{range .SidebarEntries}}{{if .GroupHead}}<div class="yw-nav-group">{{.GroupHead}}</div>
|
||||
{{end}}<a class="nav-link{{if .Active}} active{{end}}" href="{{$.BasePath}}{{.Href}}"{{if .Active}} aria-current="page"{{end}}>{{if .IconSVG}}<span class="yw-nav-icon" aria-hidden="true">{{.IconSVG}}</span>{{end}}{{.Label}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
Reference in new issue
Block a user