From bd4bf6ac9bafa8f1b80de37709eb64fb40c08c29 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 27 Oct 2022 10:26:06 +0200 Subject: luci-theme-material: fix location of template files Fixes: #6060 Fixes: e496014760 ("luci-theme-material: convert Lua templates to ucode") Signed-off-by: Jo-Philipp Wich --- .../ucode/template/themes/material/footer.ut | 32 ++++++++ .../ucode/template/themes/material/header.ut | 96 ++++++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 themes/luci-theme-material/ucode/template/themes/material/footer.ut create mode 100644 themes/luci-theme-material/ucode/template/themes/material/header.ut (limited to 'themes/luci-theme-material/ucode/template') diff --git a/themes/luci-theme-material/ucode/template/themes/material/footer.ut b/themes/luci-theme-material/ucode/template/themes/material/footer.ut new file mode 100644 index 0000000000..9249427a43 --- /dev/null +++ b/themes/luci-theme-material/ucode/template/themes/material/footer.ut @@ -0,0 +1,32 @@ +{# + Material is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI + + luci-theme-material + Copyright 2015 Lutty Yang + + Have a bug? Please create an issue here on GitHub! + https://github.com/LuttyYang/luci-theme-material/issues + + luci-theme-bootstrap: + Copyright 2008 Steven Barth + Copyright 2008 Jo-Philipp Wich + Copyright 2012 David Menting + + MUI: + https://github.com/muicss/mui + + Licensed to the public under the Apache License 2.0 +-#} + + + + + + + + + + diff --git a/themes/luci-theme-material/ucode/template/themes/material/header.ut b/themes/luci-theme-material/ucode/template/themes/material/header.ut new file mode 100644 index 0000000000..24b2c73517 --- /dev/null +++ b/themes/luci-theme-material/ucode/template/themes/material/header.ut @@ -0,0 +1,96 @@ +{# + Material is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI + + luci-theme-material + Copyright 2015-2017 Lutty Yang + + Have a bug? Please create an issue here on GitHub! + https://github.com/LuttyYang/luci-theme-material/issues + + luci-theme-bootstrap: + Copyright 2008 Steven Barth + Copyright 2008-2016 Jo-Philipp Wich + Copyright 2012 David Menting + + MUI: + https://github.com/muicss/mui + + Licensed to the public under the Apache License 2.0 +-#} + +{% + import { getuid, getspnam } from 'luci.core'; + + const boardinfo = ubus.call('system', 'board'); + const hostname = striptags(boardinfo?.hostname ?? '?'); + + http.prepare_content('text/html; charset=UTF-8'); +-%} + + + + + + + + + + + + + + + +{% if (node?.css): %} + +{% endif %} + + +{{ hostname }}{{ node?.title ? ` - ${striptags(node.title)}` : '' }} - LuCI +{% if (css): %} + +{% endif %} + + +
+
+
+ + + {{ hostname }} + +
+
+
+
+
{{ _('Collecting data...') }}
+ +
+ +
+
+
+ {% if (getuid() == 0 && getspnam('root')?.pwdp === ''): %} + + {% endif %} + + {% if (boardinfo?.rootfs_type == "initramfs"): %} +
+

{{ _('System running in recovery (initramfs) mode.') }}

+

{{ _('No changes to settings will be stored and are lost after rebooting. This mode should only be used to install a firmware upgrade') }}

+ {% if (dispatcher.lookup("admin/system/flash")): %} + + {% endif %} +
+ {% endif %} + + + + -- cgit v1.2.3