From a2d1ca7af0e72c451b31c7a35e13df9583de048e Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sat, 6 Dec 2008 14:31:30 +0000 Subject: OpenWrt.org Oxygen theme, first steps --- .../view/themes/openwrt.org-oxygen/dashboard.htm | 46 ++++++ .../view/themes/openwrt.org-oxygen/footer.htm | 21 +++ .../view/themes/openwrt.org-oxygen/header.htm | 166 +++++++++++++++++++++ .../view/themes/openwrt.org-oxygen/indexer.htm | 17 +++ 4 files changed, 250 insertions(+) create mode 100644 themes/openwrt.org-oxygen/luasrc/view/themes/openwrt.org-oxygen/dashboard.htm create mode 100644 themes/openwrt.org-oxygen/luasrc/view/themes/openwrt.org-oxygen/footer.htm create mode 100644 themes/openwrt.org-oxygen/luasrc/view/themes/openwrt.org-oxygen/header.htm create mode 100644 themes/openwrt.org-oxygen/luasrc/view/themes/openwrt.org-oxygen/indexer.htm (limited to 'themes/openwrt.org-oxygen/luasrc/view') diff --git a/themes/openwrt.org-oxygen/luasrc/view/themes/openwrt.org-oxygen/dashboard.htm b/themes/openwrt.org-oxygen/luasrc/view/themes/openwrt.org-oxygen/dashboard.htm new file mode 100644 index 0000000000..1e05575809 --- /dev/null +++ b/themes/openwrt.org-oxygen/luasrc/view/themes/openwrt.org-oxygen/dashboard.htm @@ -0,0 +1,46 @@ +<%# +LuCI - Lua Configuration Interface +Copyright 2008 Steven Barth +Copyright 2008 Jo-Philipp Wich + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ + +-%> +<% + local node = luci.dispatcher.context.requested + if node.nodes then +%> +
+<%- + for k, v in luci.util.spairs(node.nodes, function (a,b) + return (node.nodes[a].order or 100) < (node.nodes[b].order or 100) + end) do + if v.title and #v.title > 0 and not v.ignoreindex and (v.index or v.target) then + local csscl = "dashicon di_%s" % (v.style or k) + local iconl = v.icon + local pref = luci.util.clone(luci.dispatcher.context.request) + pref[#pref+1] = k + local target = luci.dispatcher.build_url(unpack(pref)) +%> + +<% + end + end +-%> +
+
+<% +end +%> \ No newline at end of file diff --git a/themes/openwrt.org-oxygen/luasrc/view/themes/openwrt.org-oxygen/footer.htm b/themes/openwrt.org-oxygen/luasrc/view/themes/openwrt.org-oxygen/footer.htm new file mode 100644 index 0000000000..f8ea5ad577 --- /dev/null +++ b/themes/openwrt.org-oxygen/luasrc/view/themes/openwrt.org-oxygen/footer.htm @@ -0,0 +1,21 @@ +<%# +LuCI - Lua Configuration Interface +Copyright 2008 Steven Barth +Copyright 2008 Jo-Philipp Wich + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ + +-%> +
+ + +

Powered by <%= luci.__appname__ .. " " .. luci.__version__%>

+ + + diff --git a/themes/openwrt.org-oxygen/luasrc/view/themes/openwrt.org-oxygen/header.htm b/themes/openwrt.org-oxygen/luasrc/view/themes/openwrt.org-oxygen/header.htm new file mode 100644 index 0000000000..a2c48b9f46 --- /dev/null +++ b/themes/openwrt.org-oxygen/luasrc/view/themes/openwrt.org-oxygen/header.htm @@ -0,0 +1,166 @@ +<%# +LuCI - Lua Configuration Interface +Copyright 2008 Steven Barth +Copyright 2008 Jo-Philipp Wich + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ + +-%> +<% +require("luci.sys") +local load1, load5, load15 = luci.sys.loadavg() +local request = require("luci.dispatcher").context.path +local category = request[1] +local tree = luci.dispatcher.node() +local cattree = category and luci.dispatcher.node(category) +local node = luci.dispatcher.context.dispatched +local disp = node +local hostname = luci.sys.hostname() + +local c = tree +for i,r in ipairs(request) do + if c.nodes and c.nodes[r] then + c = c.nodes[r] + c._menu_selected = true + end +end + +require("luci.i18n").loadc("default") +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 + + + + + + + + +
+<% if disp and disp.subindex then %><%+themes/openwrt.org-oxygen/dashboard%><% end %> diff --git a/themes/openwrt.org-oxygen/luasrc/view/themes/openwrt.org-oxygen/indexer.htm b/themes/openwrt.org-oxygen/luasrc/view/themes/openwrt.org-oxygen/indexer.htm new file mode 100644 index 0000000000..8ba29e0f54 --- /dev/null +++ b/themes/openwrt.org-oxygen/luasrc/view/themes/openwrt.org-oxygen/indexer.htm @@ -0,0 +1,17 @@ +<%# +LuCI - Lua Configuration Interface +Copyright 2008 Steven Barth +Copyright 2008 Jo-Philipp Wich + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ + +-%> +<%+header%> +<%+themes/openwrt.org-oxygen/dashboard%> +<%+footer%> -- cgit v1.2.3