110 Commits

Author SHA1 Message Date
Joshua Criss
2b010f97e5 luci-theme-openwrt: update -webkit-appearance
Compliment '-webkit-appearance'
with 'appearance', as it is
non-standard and has since
been succeeded by 'appearance',
accepted by all baseline browsers.

Future consideration to then
remove '-webkit-appearance'.

Signed-off-by: Joshua Criss <owlsy@outlook.com.au>
2026-04-04 16:23:19 +02:00
Joshua Criss
b9dff54410 luci-theme-openwrt: refining hide/show buttons
Match "show" button style to IP table,
change border colour to match font
colour; fade it slightly: no variable for
disabled opacity like
luci-theme-bootstrap, assuming 0.7.
Remove fade when hovered.
Change mouse icon from text cursor
to pointer, restore button text weight
and font similar to indicators,
add subtle border to compliment
both states of button.
Work with existing mobile styling
for 480px and below, make
bigger buttons and fix
heading alignment.

Signed-off-by: Joshua Criss <owlsy@outlook.com.au>
2026-04-02 16:12:56 +02:00
Joshua Criss
9db25861aa luci-theme-openwrt: refining indicators
Match rounded indicators to
same style as "hide" and "show"
buttons for design consistency.

Signed-off-by: Joshua Criss <owlsy@outlook.com.au>
2026-04-02 16:07:37 +02:00
Joshua Criss
fa2ce66ba1 luci-theme-openwrt: remove empty CSS
It is not advisable to have
empty rulesets in CSS.
Removing the empty ruleset.

Signed-off-by: Joshua Criss <owlsy@outlook.com.au>
2026-04-02 16:07:10 +02:00
Self-Hosting-Group
e81c0637e2 luci-theme: remove LuCI from title, material changes
- Remove `| LuCI` suffix from title tag
- Make material theme zoomable and remove legacy meta tags
- Unify viewport

Link: #8330
Signed-off-by: Self-Hosting-Group <selfhostinggroup-git+openwrt@shost.ing>
2026-03-02 19:14:01 +01:00
Paul Donald
ce358ad411 luci-theme: html title: swap hostname <-> page title
hostname first to differentiate units from at-a-glance
browser tab view.

follow-up to 18d14980dd

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-02-09 22:14:59 +01:00
Paul Donald
18d14980dd luci-theme: html title: swap hostname <-> page title
hostname first to differentiate units from at-a-glance
browser tab view.

Closes #8308

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-02-09 18:08:38 +01:00
Paul Donald
94da6ead86 luci-base: restore titles class
follow-up to 720c96ce5b

While ::before CSS styling has been deactivated, and
'content' removed, cbi-value-first-field is a bit
ambiguous. So, restore cbi-section-table-titles, and
replace the ::before tags in CSS.

Remove also the data-title for title rows. We already
insert titles for named headers and rows via HTML and
not via CSS after the mentioned commit.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-02-02 18:22:15 +01:00
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
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
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
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
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
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
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
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
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
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
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
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
0f5fd2e70a luci-theme-openwrt: add missing license information
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-03-19 13:37:14 +01:00
Fengyu Wu
98a6ba28de luci-themes: add luci-base to depends
Signed-off-by: Fengyu Wu <saldry@proton.me>
2024-03-02 17:57:01 +01:00
Jo-Philipp Wich
b0e56a39aa luci-theme-openwrt: add dropdown option hover styles
Subsequent commits will drop the JS based mouse following focus behavior,
so add appropriate replacement CSS hover styles.

Ref: #6903
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2024-02-19 00:04:16 +01:00
Florian Eckert
21b40652d9 luci-theme-: add postrm script
Remove uci theme config section on uninstall.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2023-01-09 13:07:42 +01:00
y04
5a3cc88a67 luci-theme-openwrt: optimized image filesize
Optimized PNG filesize from 152 to 80 bytes without any quality loss.

Signed-off-by: Alexander Semukhin <semukhin@mail.com>
2022-06-25 01:44:22 +02:00
Jo-Philipp Wich
1c3b32dc1b luci-theme-openwrt: add success style for alert messages
Fixes: #5427
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-10-12 22:40:25 +02:00
Paul Spooren
c8d9819c9a themes: warn if booted from initramfs
Some devices offer a full LuCI interface from their recovery interface.
As it's read-only it should only be used for installing sysupgrades and
therefore warn users that no settings are saved.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-10-05 15:33:15 -10:00
Ansuel Smith
be028dce56 luci-theme: fix css for flash advanced settings
Fix themes for broken display of advanced button in the sysupgrade modal.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-08-05 15:51:02 +02:00
Hauke Mehrtens
5cbd79d7e3 themes: Call striptags() on hostname to prevent XSS
This calls striptags() on the hostname to prevent any XSS over the
hostname. This should fix CVE-2021-33425 as far as I understood it.

If someone adds some Javascript into system.@system[0].hostname it would
have been directly added to the page, this prevents the problem.

This can only be exploited by someone being able to modify the uci
configuration, normally a user with such privileges could also just
modify the webpage.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-06-09 01:33:44 +02:00
Daniel Golle
4c64aedb3e luci-mod-failsafe: kill old failsafe mod
It's been unmaintained for ages and became useless.
Better just limit regular luci-mod-admin to only show basic
functionality in case `ubus call system board` indicates we are running
off initramfs.

Singed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-24 14:40:10 +00:00
Hannu Nyman
258e74c1c3 themes: remove deprecated reference to enabling SSH
Remove the reference to setting a password being linked to SSH capability.
(SSH has been initially enabled since year 2015.)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2020-08-16 22:19:37 +03:00
Jo-Philipp Wich
48269ade61 luci-theme-openwrt: rework menu rendering
Utilize the LuCI.ui.menu class to load, traverse and cache the menu tree
in the local session store.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-16 13:30:35 +02:00
Chen Minqiang
fc150636b9 luci-theme-*: set mediaurlbase if it is the first time to be installed
If we build multi-themes into firmware, each of them set itself
to be the default theme, what theme should it be?

To make it clear, we only set mediaurlbase if the theme is the
first time to be installed/built-in.

This resolve the issue that theme always change to somewhat default
after upgrading the firmware even with a config-keep-upgrade

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2020-04-03 21:44:28 +08:00
Jo-Philipp Wich
63057a08dc luci-theme-openwrt: work around cssmin bug breaking the minified CSS.
The cssmin utility incorrectly breaks up calc() expressions when
minifying rules. Avoid the problem by trimming uneeded spaces.

Fixes: #3801
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-31 15:27:13 +02:00
Jo-Philipp Wich
ccb7e4a4a7 themes: generalize indicator markup and styling
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-30 17:12:07 +02:00
Jo-Philipp Wich
5d7dc391d4 themes: ensure that data-page attribute is escaped
Fixes: #3757
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-15 17:48:40 +01:00
Jo-Philipp Wich
0130e2b08c themes: render menu even when not logged in
Ref: #3563
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-25 23:28:24 +01:00
Jo-Philipp Wich
185b84bc9d Merge pull request #3401 from MartB/modal-heightfixv2
luci-theme-*: remove modal max-height #3383 v2
2019-12-25 17:58:06 +01:00