2 Material is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI
5 Copyright
2015-
2017 Lutty Yang
<lutty@wcan.in
>
7 Have a bug? Please create an issue here on GitHub!
8 https://github.com/LuttyYang/luci-theme-material/issues
11 Copyright
2008 Steven Barth
<steven@midlink.org
>
12 Copyright
2008-
2016 Jo-Philipp Wich
<jow@openwrt.org
>
13 Copyright
2012 David Menting
<david@nut-bolt.nl
>
16 https://github.com/muicss/mui
18 Licensed to the public under the Apache License
2.0
22 local sys = require
"luci.sys"
23 local util = require
"luci.util"
24 local http = require
"luci.http"
25 local disp = require
"luci.dispatcher"
26 local ver = require
"luci.version"
28 local boardinfo = util.ubus(
"system",
"board") or { }
30 local node = disp.context.dispatched
31 local path = table.concat(disp.context.path,
"-")
33 http.prepare_content(
"text/html; charset=UTF-8")
36 <html lang=
"<%=luci.i18n.context.lang%>">
38 <meta charset=
"utf-8">
39 <meta content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name=
"viewport"/>
40 <meta name=
"apple-mobile-web-app-capable" content=
"yes">
41 <meta name=
"mobile-web-app-capable" content=
"yes">
42 <meta name=
"theme-color" content=
"#09c">
43 <meta name=
"msapplication-tap-highlight" content=
"no">
44 <meta name=
"msapplication-TileColor" content=
"#09c">
45 <meta name=
"application-name" content=
"<%=striptags( (boardinfo.hostname or "?
") ) %> - LuCI">
46 <meta name=
"apple-mobile-web-app-title" content=
"<%=striptags( (boardinfo.hostname or "?
") ) %> - LuCI">
47 <link rel=
"stylesheet" href=
"<%=media%>/cascade.css">
48 <link rel=
"shortcut icon" href=
"<%=media%>/favicon.ico">
49 <% if node and node.css then %
>
50 <link rel=
"stylesheet" href=
"<%=resource%>/<%=node.css%>">
52 <script src=
"<%=url('admin/translations', luci.i18n.context.lang)%><%# ?v=PKG_VERSION %>"></script>
53 <script src=
"<%=resource%>/cbi.js"></script>
54 <title><%=striptags( (boardinfo.hostname or
"?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %
> - LuCI
</title>
55 <% if css then %
><style title=
"text/css">
60 <body class=
"lang_<%=luci.i18n.context.lang%> <% if luci.dispatcher.context.authsession then %>logged-in<% end %> <% if not (path == "") then %>node-<%= path %><% else %>node-main-login<% end %>" data-page=
"<%= pcdata(path) %>">
63 <div class=
"container">
64 <span class=
"showSide"></span>
65 <a id=
"logo" href=
"<% if luci.dispatcher.context.authsession then %><%=url('admin/status/overview')%><% else %>#<% end %>"><img src=
"<%=media%>/brand.png" alt=
"OpenWrt"></a>
66 <a class=
"brand" href=
"#"><%=striptags(boardinfo.hostname or
"?")%
></a>
67 <span class=
"status" id=
"indicators"></span>
72 <div style=
"" class=
"loading"><span><div class=
"loading-img"></div><%:Collecting data...%
></span></div>
73 <div class=
"main-left" id=
"mainmenu" style=
"display:none"></div>
74 <div class=
"main-right">
75 <div class=
"modemenu-buttons" style=
"display:none">
76 <ul id=
"modemenu"></ul>
78 <div class=
"darkMask"></div>
79 <div id=
"maincontent">
80 <div class=
"container">
81 <%- if luci.sys.process.info(
"uid") ==
0 and luci.sys.user.getuser(
"root") and not luci.sys.user.getpasswd(
"root") and path ~=
"admin-system-admin-password" then -%
>
84 <%- if boardinfo.rootfs_type ==
"initramfs" then -%
>
85 <div class=
"alert-message warning">
86 <h4><%:System running in recovery (initramfs) mode.%
></h4>
87 <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>
88 <% if disp.lookup(
"admin/system/flash") then %
>
89 <div class=
"right"><a class=
"btn" href=
"<%=url("admin/system/flash
")%>"><%:Go to firmware upgrade...%
></a></div>
95 <div class=
"alert-message warning">
96 <h4><%:JavaScript required!%
></h4>
97 <p><%:You must enable JavaScript in your browser or LuCI will not work properly.%
></p>
101 <div id=
"tabmenu" style=
"display:none"></div>