LuCI Themes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

LuCI Themes

MAHDTech
On the PacketInspector forum, someone posted a beautiful LuCI theme

Does anyone remember what it was / have a site with a list of great themes?

Anyone want a different default in images....
Reply | Threaded
Open this post in threaded view
|

Re: LuCI Themes

Roadrunnere42
Hi
I remember tiring it out, thought it was from ITUS and would be in sp1 release, but never appeared. Have not idea where it came from.

roadrunnere42
Reply | Threaded
Open this post in threaded view
|

Re: LuCI Themes

MAHDTech
haha I found it

The "Material" theme

very nice indeed.

https://github.com/LuttyYang/luci-theme-material/releases
Reply | Threaded
Open this post in threaded view
|

Re: LuCI Themes

Roadrunnere42
Hi

How to you install the themes, it's been a long time.


roadrunnere42
Reply | Threaded
Open this post in threaded view
|

Re: LuCI Themes

user8446
Administrator
Just install it like a regular package... opkg install. No config necessary.
Running in bridge mode, 1.51 SP1 fw
Reply | Threaded
Open this post in threaded view
|

Re: LuCI Themes

Roadrunnere42
Hi

I tried the following to install the theme pack but after rebooting nothing changes

root@Shield:/# opkg install luci-theme-material_0.2.17-1_all.ipk
Installing luci-theme-material (0.2.17-1) to root...
Configuring luci-theme-material.
root@Shield:/#

any idea why

roadrunnere42
Reply | Threaded
Open this post in threaded view
|

Re: LuCI Themes

Gnomad
Same.  
Downloaded the tar to try and get an idea, and looks like it's copied the theme files to
/www/luci-static/material
/usr/lib/lua/luci/view/themes/material
but just not then switched to that theme.  There's also an "itusnetworks" theme in those folders.

This page indicates that luci should have a settings page to allow us to select the new theme once installed, but maybe ITUS have disabled it.  Anyone know how to change luci themes via the shell?

Guts of the theme makefile within the tar, might help:
THEME_NAME:=material
THEME_TITLE:=Material
...
define Package/luci-theme-$(THEME_NAME)/install
	$(INSTALL_DIR) $(1)/etc/uci-defaults
	echo "uci set luci.themes.$(THEME_TITLE)=/luci-static/$(THEME_NAME); uci commit luci" > $(1)/etc/uci-defaults/30-luci-theme-$(THEME_NAME)
	$(INSTALL_DIR) $(1)/www/luci-static/$(THEME_NAME)
	$(CP) -a ./files/htdocs/* $(1)/www/luci-static/$(THEME_NAME)/ 2>/dev/null || true
	$(INSTALL_DIR) $(1)/usr/lib/lua/luci/view/themes/$(THEME_NAME)
	$(CP) -a ./files/templates/* $(1)/usr/lib/lua/luci/view/themes/$(THEME_NAME)/ 2>/dev/null || true
endef
OpenWrt SNAPSHOT, r10391-3d8d528939
Reply | Threaded
Open this post in threaded view
|

Re: LuCI Themes

user8446
Administrator
Going off memory, you have to install an earlier version like 0.2.3 then update to the latest version.
Running in bridge mode, 1.51 SP1 fw
Reply | Threaded
Open this post in threaded view
|

Re: LuCI Themes

Gnomad
This post was updated on .
In reply to this post by Roadrunnere42
Figured it out.  Full set of shell commands:
cd /tmp
wget http://github.com/LuttyYang/luci-theme-material/releases/download/v0.2.17/luci-theme-material_0.2.17-1_all.ipk
opkg install luci-theme-material_0.2.17-1_all.ipk
uci set luci.main.mediaurlbase='/luci-static/material'
uci commit luci
The previous default mediaurlbase was '/luci-static/openwrt.org', but that theme isn't installed so I think it may have been falling back to the first available theme alphabetically (and 'itusnetworks' comes before 'material').



I've made some Shield file changes to get installed themes appearing in the UI - if you'd like a copy see this github pull request.
OpenWrt SNAPSHOT, r10391-3d8d528939
Reply | Threaded
Open this post in threaded view
|

Re: LuCI Themes

user8446
Administrator
Thanks for that!
Running in bridge mode, 1.51 SP1 fw
Reply | Threaded
Open this post in threaded view
|

Re: LuCI Themes

Roadrunnere42
In reply to this post by Gnomad
Hi Gnomad

Nice work on the theme switcher, one problem i did fine is that when you switch back to ITUSnetwork theme  the fonts are a different size than the orginal
I am luck to have 2 shields so 1 is in router mode and has the theme package and modified system.lua installed, my second shield is in bridge mode with only the modified system.lua installed





as you can see they are different sizes, both where taken from a screen shot so don’t no why they show up different sizes but look at the ITUSnetwork log is on a different line, top picture has the installed theme and modified system.lua. Apart from this, it works fine, as this is out of my league i dont know how to fix, but if it is fixed then i would say merge into master on Github

great work Gnomad

roadrunnere42
Reply | Threaded
Open this post in threaded view
|

Re: LuCI Themes

Gnomad
Thanks Roadrunner,
The file I changed could not have had any effect on font sizes - notice that even the logo image is smaller.  I suspect your browser magnification levels may have changed somehow, perhaps an accidental ctrl+scroll wheel could have done it?  

If all else fails, suggest pressing ctrl+F5 after the theme change, just to ensure the browser's cached CSS files are cleared.

Cheers, Gnomad
OpenWrt SNAPSHOT, r10391-3d8d528939