Skip to content

luci-theme-footstrap: simplify uci-defaults, add the OpenWrt 2020 colourway - #8959

Merged
hnyman merged 2 commits into
openwrt:masterfrom
VizzleTF:footstrap-followups
Aug 21, 2026
Merged

luci-theme-footstrap: simplify uci-defaults, add the OpenWrt 2020 colourway#8959
hnyman merged 2 commits into
openwrt:masterfrom
VizzleTF:footstrap-followups

Conversation

@VizzleTF

Copy link
Copy Markdown
Contributor

Two follow-ups after the merge of #8903, kept in one PR as two separate commits.

1. luci-theme-footstrap: simplify uci-defaults@hnyman asked for this in review: start from the assumption that a user of the official package started at the version in this tree. The script is 36 lines instead of 162. Gone: eight legacy theme names, four legacy media paths, the old top-bar layout carried into luci.main.footstrap_layout, two downloaded wallpapers, a pre-0.12.1 fonts/ directory, a fallback to bootstrap when the active theme was missing its files, /etc/config/footstrap creation that the shipped conffile already covers, and a marker file that told a fresh install from an upgrade. postrm loses the same list and the marker.

What is left is the registration, the three symlinks that expose the admin uploads out of /etc, and the fresh-vs-upgrade rule the other themes here use — mediaurlbase is written only in the run that first added luci.themes.Footstrap.

Behaviour was compared with the old script on 25.12/apk and 24.10/opkg: a fresh install with a theme already chosen registers and does not switch; an upgrade changes nothing; a fresh install with no mediaurlbase activates the theme; a second run in the same install is a no-op; postrm upgrade changes nothing and postrm remove hands the UI back to bootstrap.

2. luci-theme-footstrap: add the OpenWrt 2020 colourway as a palette — the shape @jow- suggested in the same discussion for keeping that look if luci-theme-openwrt-2020 is retired: its CI cyan #00B5E2 on the navy #002B49 as a palette here, opt-in through Appearance and changing nothing for anyone who does not pick it.

Dark mode is 2020s own scheme, navy canvas and the cyan nearly untouched. Light keeps the hue and darkens it, because #00B5E2 is 2.09:1 on white and every level of the theme exported colour tier has to clear WCAG AA as text on all three surfaces. Measured across 56 palette x mode x tint combinations, 4352 checks, all clear; axe-core reports no serious or critical violations on the widget gallery in either mode.

The script registered the theme and then cleaned up after every version of
it that ever shipped: eight legacy theme names, four legacy media paths,
the old top-bar layout carried into luci.main.footstrap_layout, two
downloaded wallpapers, a pre-0.12.1 fonts/ directory, a fallback to
bootstrap when the active theme's files were missing, /etc/config/footstrap
creation that the shipped conffile already covers, and a marker file to
tell a fresh install from an upgrade. All of it served installs that
predate the version merged into this tree.

OpenWrt expects a sysupgrade rather than a package upgrade, so file
leftovers go with the image, and the cleanup worth doing is config. What is
left is the registration, the three symlinks that expose the admin's
uploads out of /etc, and the same fresh-vs-upgrade rule the other themes
here use: mediaurlbase is written only in the run that first added
luci.themes.Footstrap.

postrm loses the same eight-name list, the layout key and the marker
directory.

Behaviour was compared with the old script on 25.12/apk and 24.10/opkg: a
fresh install with a theme already chosen registers and does not switch, an
upgrade changes nothing, a fresh install with no mediaurlbase activates the
theme, a second run in the same install is a no-op, postrm "upgrade"
changes nothing and postrm "remove" hands the UI back to bootstrap.

Signed-off-by: Ivan Kvashonkin <vizzlef@gmail.com>
luci-theme-openwrt-2020 is one colour scheme and no dark mode: the CI cyan
#00B5E2 on the navy #002B49, white content, and #5CB85C / #CC8800 /
#CC1111 for the semantic three. This adds that identity to footstrap as a
palette, which is the form suggested in the discussion on openwrt#8903 for
keeping the look if the theme itself is retired.

The pair splits the work along the reason it exists. Dark IS 2020's own
scheme — the navy is the canvas and the cyan is nearly untouched. Light
keeps the hue and darkens it, because #00B5E2 measures 2.09:1 on white,
and every level of this theme's exported colour tier has to pass WCAG AA
as text on all three surfaces: apps read those names as color: about as
often as background:. The semantic three move for the same reason — on
white 2020's green is 2.28:1 and its amber 3.42:1 — while its red at
5.25:1 is kept where it was.

The palette is registered in the four places the theme requires: the
palette axis in fs-prefs.js, the server-default whitelist and the
pre-paint switch in partials/head.ut, and the label in fs-appearance.js.
It is opt-in through Appearance; nothing changes for anyone who does not
pick it.

Contrast was measured across the whole matrix rather than by eye: 56
palette x mode x tint combinations, 4352 checks, every level clear of AA
on background, panel and panel2, and every ink clear on the fill it sits
on. axe-core reports no serious or critical violations on the widget
gallery in either mode.

Signed-off-by: Ivan Kvashonkin <vizzlef@gmail.com>
@hnyman
hnyman merged commit 46ee356 into openwrt:master Aug 21, 2026
8 checks passed
@VizzleTF
VizzleTF deleted the footstrap-followups branch August 21, 2026 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants