From fe5db5028511da9bfd7036b0430761563cef0c39 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 21 Oct 2008 00:49:01 +0000 Subject: [PATCH] * luci/themes: - create new package luci-theme-base - add new base package to package feed - make openwrt.org and openwrtlight themes depend on theme-base --- contrib/package/luci/Makefile | 16 ++++++++++++++++ themes/base/Makefile | 2 ++ .../htdocs/luci-static/resources}/Dropdowns.js | 0 .../htdocs/luci-static/resources}/VarType.js | 0 .../htdocs/luci-static/resources}/XHTML1.js | 0 .../luasrc/view/themes/openwrt.org/header.htm | 6 +++--- 6 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 themes/base/Makefile rename themes/{openwrt.org/htdocs/luci-static/openwrt.org => base/htdocs/luci-static/resources}/Dropdowns.js (100%) rename themes/{openwrt.org/htdocs/luci-static/openwrt.org => base/htdocs/luci-static/resources}/VarType.js (100%) rename themes/{openwrt.org/htdocs/luci-static/openwrt.org => base/htdocs/luci-static/resources}/XHTML1.js (100%) diff --git a/contrib/package/luci/Makefile b/contrib/package/luci/Makefile index da067fb4a..007c58d03 100644 --- a/contrib/package/luci/Makefile +++ b/contrib/package/luci/Makefile @@ -556,6 +556,16 @@ define Package/luci-sgi-webuci/install endef ### Themes ### +define Package/luci-theme-base + $(call Package/luci/thtemplate) + DEPENDS:=+luci-web + TITLE:=Common base for all themes +endef + +define Package/luci-theme-base/install + $(call Package/luci/install/template,$(1),themes/base) +endef + define Package/luci-theme-fledermaus $(call Package/luci/fftemplate) DEPENDS:=+luci-web @@ -591,6 +601,7 @@ endef define Package/luci-theme-openwrt $(call Package/luci/thtemplate) TITLE:=OpenWRT.org (default) + DEPENDS:=+luci-theme-base endef define Package/luci-theme-openwrt/install @@ -600,6 +611,7 @@ endef define Package/luci-theme-openwrtlight $(call Package/luci/thtemplate) TITLE:=OpenWRT.org - light variant without images + DEPENDS:=+luci-theme-base endef define Package/luci-theme-openwrtlight/install @@ -777,6 +789,9 @@ ifneq ($(CONFIG_PACKAGE_luci-sgi-webuci),) PKG_SELECTED_MODULES+=libs/sgi-webuci endif +ifneq ($(CONFIG_PACKAGE_luci-theme-base),) + PKG_SELECTED_MODULES+=themes/base +endif ifneq ($(CONFIG_PACKAGE_luci-theme-fledermaus),) PKG_SELECTED_MODULES+=themes/fledermaus endif @@ -862,6 +877,7 @@ $(eval $(call BuildPackage,luci-sgi-cgi)) $(eval $(call BuildPackage,luci-sgi-luci)) $(eval $(call BuildPackage,luci-sgi-webuci)) +$(eval $(call BuildPackage,luci-theme-base)) $(eval $(call BuildPackage,luci-theme-fledermaus)) $(eval $(call BuildPackage,luci-theme-freifunk)) $(eval $(call BuildPackage,luci-theme-freifunk-bno)) diff --git a/themes/base/Makefile b/themes/base/Makefile new file mode 100644 index 000000000..81a96f6a8 --- /dev/null +++ b/themes/base/Makefile @@ -0,0 +1,2 @@ +include ../../build/config.mk +include ../../build/module.mk \ No newline at end of file diff --git a/themes/openwrt.org/htdocs/luci-static/openwrt.org/Dropdowns.js b/themes/base/htdocs/luci-static/resources/Dropdowns.js similarity index 100% rename from themes/openwrt.org/htdocs/luci-static/openwrt.org/Dropdowns.js rename to themes/base/htdocs/luci-static/resources/Dropdowns.js diff --git a/themes/openwrt.org/htdocs/luci-static/openwrt.org/VarType.js b/themes/base/htdocs/luci-static/resources/VarType.js similarity index 100% rename from themes/openwrt.org/htdocs/luci-static/openwrt.org/VarType.js rename to themes/base/htdocs/luci-static/resources/VarType.js diff --git a/themes/openwrt.org/htdocs/luci-static/openwrt.org/XHTML1.js b/themes/base/htdocs/luci-static/resources/XHTML1.js similarity index 100% rename from themes/openwrt.org/htdocs/luci-static/openwrt.org/XHTML1.js rename to themes/base/htdocs/luci-static/resources/XHTML1.js diff --git a/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm b/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm index b2912b3a5..e658bfc67 100644 --- a/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm +++ b/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm @@ -46,9 +46,9 @@ require("luci.http").prepare_content("application/xhtml+xml") <% if node and node.css then %> <% end -%> - - - + + + <%=striptags( hostname .. ( (node and node.title) and ' - ' .. node.title or '')) %> - LuCI -- 2.11.0