CBI語法
寫的挺好一博客
https://blog.csdn.net/u012041204/article/details/55520711
https://blog.csdn.net/u013131156/article/details/45824203
Widora更改成中文(OpenWrt chaos_calmer_15.05.1 配置與漢化(適用於mt7620芯片))
https://www.ruisfree.com/2016/07/24/openwrt-setlan/
LuCi定制
https://www.cnblogs.com/fwst/p/4060458.html
為LuCi自定義主題
https://www.cnblogs.com/jzyuchen/p/3855528.html
自定義Luci的主題主要要修改的有3個地方
1、靜態資源(樣式表,圖片,JS文件)
Luci將網頁的靜態資源都放在/www/luci-static下,默認可能有2個目錄,這個跟你安裝的主題多少有關系,以我的為例,我只安裝Openwrt模板,所以能看到有2個目錄openwrt.org和resources。
openwrt.org 這個目錄保存的是主題中用到的css文件和圖片,所以我們自定義主題的css和圖片都可以放在這里。
resources 這個目錄保存是的主題用到的公共的js文件。
這樣我們自定義的主題也可以按照這個目錄結構來保存我們的資源文件。我建了一個yuchen目錄放我的資源文件。當然,那些js具體是放在resources還是以自定義主題命名的目錄里,就隨便你啦。
2、頁面模板
Luci的頁面模板其實是由2個帶有Lua腳本的htm組合而成,分別是header.htm和footer.htm,將這2個文件生成的html代碼組合起來就是Luci中所有頁面的框架。這2個文件位於/usr/lib/lua/luci/view/themes中,我在這個目錄里建了以個yuchen目錄,並將自己修改的header.htm和footer.htm放在此處。在這里我只是打算說明一下Luci的目錄結構,具體的文件內容由於涉及到lua腳本,所以就不詳細的說如何修改這2個文件了,相信隨便有點前端開發經驗的都能搞定。
3、配置文件
前面2步完成以后,就要將自己定義的主題配置到luci的配置文件中,這個文件位於/etc/config/luci,文件結構如下:
config core 'main' option resourcebase '/luci-static/resources' option lang 'zh_cn' option mediaurlbase '/luci-static/bootstrap' config extern 'flash_keep' option uci '/etc/config/' option dropbear '/etc/dropbear/' option openvpn '/etc/openvpn/' option passwd '/etc/passwd' option opkg '/etc/opkg.conf' option firewall '/etc/firewall.user' option uploads '/lib/uci/upload/' config internal 'languages' option zh_cn '普通話 (Chinese)' config internal 'sauth' option sessionpath '/tmp/luci-sessions' option sessiontime '3600' config internal 'ccache' option enable '1' config internal 'themes' option Bootstrap '/luci-static/bootstrap' option amazeui '/luci-static/amazeui' option Material '/luci-static/material' option Freifunk_Generic '/luci-static/freifunk-generic'