Commit Graph

746 Commits

Author SHA1 Message Date
Ramon Van Gorkom 720c96ce5b luci-base: make some tables better searchable
This changes the "name" in specific tables from being painted to
being rendered. This allows the use of "ctrl-f" in browsers to e.g.
search for firewall rule names.

Closes https://github.com/openwrt/luci/issues/7708
Signed-off-by: Ramon Van Gorkom <Ramon00c00@gmail.com>
Link: https://github.com/openwrt/luci/pull/8191
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-01-23 04:10:13 +01:00
Eric Fahlgren d074b87514 luci-theme-openwrt-2020: add missing selector
The .label.notice selector is defined in the bootstrap theme, and
used in luci-base, but is not present in the openwrt2020 theme.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
2026-01-21 23:15:32 +01:00
Paul Donald 9fe1334fd5 luci-theme: fix theme header title
dispatched.title is sometimes null, especially where menu JSON
does not declare a title for a page.

Also, while we're here, wrap these in i18n tags, since the
JSON titles are often translated (they're included in po matter).

Closes #8222

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-01-21 22:39:04 +01:00
Paul Donald 7f0c172ee1 luci-theme: alignment fixes
These help to align read-only items with their title elements.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-01-18 18:14:40 +01:00
Paul Donald 5a36477c95 luci-theme-openwrt: prevent minify errors
The CSS:

	padding: calc(0.125em - 1px) calc(0.5em - 1px);

produced:

	padding:calc(.125em

since minify treated it as a quad. Work around this and remove
it. The difference without it is minor.

Remove input colouring since the custom tags don't help and
the colouring makes input difficult to discern from placeholders.

Remove also -ms-backdrop definition which effectively overrides
the previous auto.

There was also an instance where 'solid red;' was truncated
to 'solid re' but I cannot reproduce this with minify.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-01-15 17:51:15 +01:00
Paul Donald 0d55a89cb2 luci-theme-openwrt: fix CSS error
browsers produce parse error and drop this declaration

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-01-03 17:52:27 +01:00
Paul Donald bf8fe5e6ea luci-theme-bootstrap: partial revert of monospace changes
follow-up to 3c3a5e2b1a

Retain original monospace properties since those are handled by the system
anyway.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-12-03 23:34:57 +01:00
Akihiro Nagai 3c3a5e2b1a luci-theme-bootstrap: fall back to system font stack with CSS custom properties
Replace hardcoded font-family declarations with CSS custom properties
(--font-sans, --font-serif, --font-mono) that fall back to system UI fonts.

Signed-off-by: Akihiro Nagai <bashing.tremors_0f@icloud.com>
2025-12-03 22:17:50 +01:00
Self-Hosting-Group d16ffa3113 luci-theme: add missing menu name to page <title>
Signed-off-by: Self-Hosting-Group <selfhostinggroup-git+openwrt@shost.ing>
2025-12-03 21:47:13 +01:00
Mikael Magnusson 9b5d60757e luci-theme-bootstrap: disable Dark Reader
Disable Dark Deader since the bootstap theme has built-in
dark and light modes, as well as a mode which auto-detects
the user's preference. Dark Reader also doesn't work well
with the bootstrap theme.

Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
2025-11-27 00:27:59 +01:00
Eamon Xiong 0096cef2b3 luci-theme-openwrt-2020: use arrow function
Replaced L.bind with an arrow function for simpler syntax and clearer `this` binding.

Signed-off-by: Eamon Xiong <eamonxiong@gmail.com>
2025-11-17 23:41:07 +08:00
Eamon Xiong 8df4e465a3 luci-theme-openwrt: use arrow function
Replaced L.bind with an arrow function for simpler syntax and clearer `this` binding.

Signed-off-by: Eamon Xiong <eamonxiong@gmail.com>
2025-11-17 23:41:07 +08:00
Eamon Xiong 53548203fd luci-theme-material: use arrow function
Replaced L.bind with an arrow function for simpler syntax and clearer `this` binding.

Signed-off-by: Eamon Xiong <eamonxiong@gmail.com>
2025-11-17 23:41:07 +08:00
Eamon Xiong 8a8e4d53a7 luci-theme-bootstrap: use ES6 syntax
Replaced L.bind with arrow functions, used Array.from for array conversion,
applied concise method syntax, and switched to block-scoped declarations.

Signed-off-by: Eamon Xiong <eamonxiong@gmail.com>
2025-11-17 23:40:51 +08:00
Paul Donald 6e263428bd luci-mod-status: partial revert of styling changes
follow-up to 788e47034b

Some of the CSS changes have knock-on effects and change behaviour in
other display areas, especially when the CSS is minified.

Simplified to change between label flavours on hide/show status.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-21 16:25:47 +02:00
Andy Chiang 91a94ce360 luci-theme-bootstrap: add width for localtime
set an appropriate width for #localtime

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2025-10-20 20:40:46 +02:00
Christian Marangi 788e47034b luci-mod-status: add support to show/hide index cards
Add support to show/hide index cards. A card's state is saved using the
browser localstorage and its state is restored on page reload/relogin.

Rework the pool function to check and skip loading of hidden cards.

Rework themes to address new button position.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
[ changed tabs in CSS ]
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-02 15:11:51 +02:00
Dávid Benko 65c1075b86 themes: scale down icons for network interfaces
Many LuCI icons doubled in size during migration to vector graphics
in commit ae5d91da90 (16px to 32px).

Sizing of their instances is mostly controlled by CSS, but there's
an exception - network interface boxes of "Interfaces" page in LuCI.
Current CSS doesn't specify any particular size requirements to follow,
so the icons just scale with the images served, thus effectively
doubling in width and height compared to state before the vectorization
commit. Such a big icons look odd and take up too much space, especially
for bridge interfaces with many ports.

Instead of reverting to the original 16×16px, this commit proposes
compromise of 24×24px as most of other icons within LuCI became a bit
bigger as well.

Signed-off-by: Dávid Benko <davidbenko@davidbenko.dev>
2025-09-29 17:25:45 +02:00
Paul Donald 755061bc9e themes: remove overflow-y property; it inhibits readonly view scrolling
Closes #7947

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-09-19 01:45:03 +02:00
Paul Donald 4d5ac5b3e9 themes: remove -moz selectors
Firefox newer than v88 complains with:

 Unknown pseudo-class or pseudo-element '-moz-focus-inner'.
 Ruleset ignored due to bad selector.

See: https://developer.mozilla.org/en-US/docs/Web/CSS/::-moz-focus-inner

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-07-30 14:49:54 +02:00
Marko Mäkelä 75a612ae63 luci-theme-bootstrap: global darkmode graphs
Instead of enumerating each SVG graph that the dark mode is applicable to,
apply --background-color-high to each SVG element that is a child of
<div style="…"> and --text-color-highest to each LINE inside such SVG.

This allows dark mode to work in all SVG widgets by default, in any
current or future LuCI component.

Signed-off-by: Marko Mäkelä <marko.makela@iki.fi>
2025-06-30 02:20:02 +02:00
Paul Donald ae5d91da90 treewide: vectorise iconography
Clear, crisp, resolution independent vector graphics replace the trusty
microscopic PNG. Some minor CSS changes were needed to constrain images
in some locations to make sure they don't consume too much space.

Iconography taken from Mate desktop theme with minor adjustments:

https://github.com/mate-desktop/mate-icon-theme/

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-12 18:55:53 +02:00
Paul Donald 46c27a05c5 luci-theme-*: layout improvements
follow-up to 1be1deb9ec

bootstrap now utilizes more screen width for main content

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-10 16:34:48 +02:00
Paul Donald 37262790c1 luci-theme-*: layout improvements
follow-up to 1be1deb9ec

bootstrap now utilizes more screen width for main content

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-10 14:57:10 +02:00
Paul Donald 1be1deb9ec luci-theme-*: layout improvements
bootstrap now utilizes more screen width for main content

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-08 22:59:41 +02:00
Paul Donald f1fefe958c luci-theme-*: layout improvements
material menu bar on the left is now 'above' main content

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-08 22:59:15 +02:00
Paul Donald 76fa3036a2 luci-theme-*: wrap span tags, fixes badge text
The nowrap can be a bit obnoxious when available layout space is
limited. Wrap.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-06-08 22:56:40 +02:00
Paul Donald e7ce4d2a1c luci-theme-openwrt: fix a few CSS errors
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-04-23 18:41:38 +02:00
Paul Donald 9180f2a762 luci-theme-*: ES6 refactor
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-04-23 14:21:40 +02:00
Paul Donald 9157254059 luci-theme: fix some dynamic layout issues
Implement a dynamic menu item width to allow item unwrapped and visible:
'min-width: max-content;' or 'max-width: max-content;'

Remove IE hacks and fix a console error for -webkit-scrollbar-thumb

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-04-23 14:03:57 +02:00
Jyn 97d6b5c5ee luci-theme-openwrt: zone-forwards wrap
Signed-off-by: Jyn <pvp4eek@gmail.com>
2025-04-14 15:19:35 +02:00
Jyn d23bbd896b luci-theme-openwrt-2020: zone-forwards wrap
Signed-off-by: Jyn <pvp4eek@gmail.com>
2025-04-14 15:19:35 +02:00
Jyn 50677f9de5 luci-theme-material: zone-forwards wrap
Signed-off-by: Jyn <pvp4eek@gmail.com>
2025-04-14 15:19:35 +02:00
Jyn 8f61f1616a luci-theme-bootstrap: zone-forwards wrap
Signed-off-by: Jyn <pvp4eek@gmail.com>
2025-04-14 15:19:35 +02:00
Florian Eckert 046a121087 treewide: set css tag flex-wrap to wrap buttons in modal view
In CSS, the flex-wrap property is used in a flex container to control
how flex items are laid out when there is not enough space in a single
line.

If a modal is displayed on small screens, the buttons are not wrapped. They
remain on one line. This breaks the layout and does not look good.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2025-03-06 11:21:32 -06:00
Florian Eckert 47d26bcb62 luci-theme-material: update cascade.css to use first-of-type instead of last/first-child
first-child:
Selects an element that is the first child of its parent. The element must
be the very first child of its parent, regardless of its type.

first-of-type:
Selects the first element of its type among its siblings. The element must
be the first of its type (e.g., <p>, <div>, etc.) within its parent, but it
does *not* have to be the first child.

Makes the CSS usage more robust if the layout changes and new html elements
are added.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2025-03-06 11:21:32 -06:00
Christian Korber 4c692b88df themes/luci-theme-material: change dropdown text to black
This commit enforces black text in dropdown[open] to highlight it
against white background.

Signed-off-by: Christian Korber <ck@dev.tdt.de>
2025-03-03 20:42:57 -06:00
Christian Korber 29df6ff70f luci-base: change Save Button textcolor to white
Upstream color is defined as #808080, so for better distinction the
color is changed to var(--white-color).

Signed-off-by: Christian Korber <ck@dev.tdt.de>
2025-03-03 20:42:57 -06:00
Paul Donald 779ca14125 css: remove unsupported properties
neither Safari nor Firefox recognize them, and they generate a parse
error.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2024-12-22 16:23:35 +00:00
Paul Donald 0459c378b7 themes: update package-manager style to match page name
opkg is no longer available as the generic name for package-manager

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2024-12-15 20:29:36 +01:00
Ramon Van Gorkom 80f18df48f luci-base: make items of UIDynamicList drag-sortable
Signed-off-by: Ramon Van Gorkom <Ramon00c00@gmail.com>
2024-11-27 21:43:16 +01:00
Mustafa Can Elmacı ae8bbb814f treewide: HTML Cleanup
* HTML Cleanup: Meta tags.
* Converted charset to shorthand.
* Removed meta tags with `Content-Script-Type` attribute. (Invalid in HTML5 spec.)

* HTML Cleanup: CSS tags.
* Removed `type` attribute with CSS files from link tags. (HTML5 spec recommends omitting it.)
* Removed `type` attribute from style tags. (Deprecated in HTML5 spec.)
https://html.spec.whatwg.org/#attr-link-type
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style

* HTML Cleanup: Convert from XHTML to HTML5
* Removed XML declaration.
* Removed XML namespace.
* Changed doctype to HTML5.

* HTML Cleanup: CDATA tags.
* CDATA sections should not be used within HTML they are considered as comments and not displayed.
https://developer.mozilla.org/en-US/docs/Web/API/CDATASection

* HTML Cleanup: Script tags.
* Removed `language` attribute from script tags. (No longer valid in HTML5)
* Removed `type` attribute with JavaScript MIME type from script tags. (HTML5 spec recommends omitting it.)
https://html.spec.whatwg.org/multipage/scripting.html#attr-script-type
https://mimesniff.spec.whatwg.org/#javascript-mime-type

Signed-off-by: Mustafa Can Elmacı <mustafacan@elmaci.net>
2024-11-22 22:39:46 +01:00
Griffen Edge c68d5c80bd luci-theme-bootstrap: cascade.css: Refactor unnecessary calc()
Replace all calc() doing maths on compatible numbers with their final values (to 2 decimal points).

Signed-off-by: Griffen Edge <griffen@griffenedge.com>
2024-10-10 02:28:12 +02:00
Ramon Van Gorkom 5a30e6c3af luci-theme-openwrt: change to HTML (like all other themes) instead of XML to fix incompatibility
luci-theme-openwrt: change to HTML (like all other themes) instead of XML to fix incompatibility

see also https://github.com/openwrt/luci/issues/7229

Signed-off-by: Ramon Van Gorkom <Ramon00c00@gmail.com>
2024-09-15 23:45:33 +02:00
Jo-Philipp Wich 79a7012dce luci-theme-openwrt: convert Lua templates to ucode
Convert the theme's Lua templates to ucode to avoid the implicit dependency
on the luci-lua-runtime package.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2024-07-30 00:08:31 +02:00
Florian Eckert 3162128e2f luci-theme-openwrt: add css class button-row
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-07-09 16:19:51 +02:00
Florian Eckert c1621c6d32 luci-theme-openwrt-2020: add css class button-row
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-07-09 16:19:51 +02:00
Florian Eckert 5119fa2f79 luci-theme-material: add css class button-row
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-07-09 16:19:51 +02:00
Florian Eckert 991549c238 luci-theme-bootstrap: add css class button-row
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-07-09 16:19:51 +02:00
James 3e967fd30d luci-theme-boostrap: dark realtime graphs
This fixes the graphs after extra divs were added.

Signed-off-by: James Lindstrom <jameslindstrom2@gmail.com>
* Customize commit message
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-05-02 09:42:29 +02:00