diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-11-13 23:59:39 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-11-16 13:06:04 +0100 |
commit | 8055acc9be89f0bed31b6692ad08e6196611d478 (patch) | |
tree | 30bcb444fa0562bf757e9a9a16cc720512c05c50 /themes/luci-theme-bootstrap/luasrc/view | |
parent | 50af81193c3ae78b23a4573f3fb69136462a883b (diff) |
luci-theme-bootstrap: overhaul styles
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'themes/luci-theme-bootstrap/luasrc/view')
3 files changed, 42 insertions, 25 deletions
diff --git a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/footer.htm b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/footer.htm index 7b84772180..48d9b98b92 100644 --- a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/footer.htm +++ b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/footer.htm @@ -1,20 +1,21 @@ <%# - Copyright 2008 Steven Barth <steven@midlink.org> - Copyright 2008 Jo-Philipp Wich <jow@openwrt.org> - Copyright 2012 David Menting <david@nut-bolt.nl> - Licensed to the public under the Apache License 2.0. + Copyright 2008 Steven Barth <steven@midlink.org> + Copyright 2008 Jo-Philipp Wich <jow@openwrt.org> + Copyright 2012 David Menting <david@nut-bolt.nl> + Licensed to the public under the Apache License 2.0. -%> -<% local ver = require "luci.version" %> - - <footer> - <span> - <a href="https://github.com/openwrt/luci">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a> / <%= ver.distversion %> - </span> - <ul class="breadcrumb pull-right" id="modemenu" style="display:none"></ul> - </footer> - </div> - <script type="text/javascript">L.require('menu-bootstrap')</script> - </body> + <% if not blank_page then %> + <% local ver = require "luci.version" %> + </div> + <footer> + <span> + <a href="https://github.com/openwrt/luci">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a> / <%= ver.distversion %> + </span> + <ul class="breadcrumb pull-right" id="modemenu" style="display:none"></ul> + </footer> + <script type="text/javascript">L.require('menu-bootstrap')</script> + <% end %> + </body> </html> diff --git a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm index a3f28fd709..0a93165f57 100644 --- a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm +++ b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm @@ -56,6 +56,7 @@ </head> <body class="lang_<%=luci.i18n.context.lang%> <% if node then %><%= striptags( node.title ) %><%- end %>" data-page="<%= pcdata(table.concat(disp.context.requestpath, "-")) %>"> + <% if not blank_page then %> <header> <a class="brand" href="/"><%=striptags(boardinfo.hostname or "?")%></a> <ul class="nav" id="topmenu" style="display:none"></ul> @@ -73,16 +74,6 @@ </div> <%- end -%> - <%- if boardinfo.rootfs_type == "initramfs" then -%> - <div class="alert-message warning"> - <h4><%:System running in recovery (initramfs) mode.%></h4> - <p><%:No changes to settings will be stored and are lost after rebooting. This mode should only be used to install a firmware upgrade%></p> - <% if disp.lookup("admin/system/flash") then %> - <div class="right"><a class="btn" href="<%=url("admin/system/flash")%>"><%:Go to firmware upgrade...%></a></div> - <% end %> - </div> - <%- end -%> - <noscript> <div class="alert-message warning"> <h4><%:JavaScript required!%></h4> @@ -91,3 +82,4 @@ </noscript> <div id="tabmenu" style="display:none"></div> + <% end %> diff --git a/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/sysauth.htm b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/sysauth.htm new file mode 100644 index 0000000000..2427199bf5 --- /dev/null +++ b/themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/sysauth.htm @@ -0,0 +1,24 @@ +<%# + Copyright 2021 Jo-Philipp Wich <jo@mein.io> + Licensed to the public under the Apache License 2.0. +-%> + +<% + -- tell bootstrap's templates to not render header and footer + blank_page = true +%> + +<%+header%> + +<div id="view"> + <div class="spinning"><%:Loading view…%></div> + <script type="text/javascript"> + L.env.default_login_user = <%=luci.http.write_json(duser) %>; + + L.require('ui').then(function(ui) { + ui.instantiateView('bootstrap.sysauth'); + }); + </script> +</div> + +<%+footer%> |