luci-base: sys.uc: fix parsing conntrack list
[project/luci.git] / themes / luci-theme-material / luasrc / view / themes / material / header.htm
1 <%#
2 Material is a clean HTML5 theme for LuCI. It is based on luci-theme-bootstrap and MUI
3
4 luci-theme-material
5 Copyright 2015-2017 Lutty Yang <lutty@wcan.in>
6
7 Have a bug? Please create an issue here on GitHub!
8 https://github.com/LuttyYang/luci-theme-material/issues
9
10 luci-theme-bootstrap:
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>
14
15 MUI:
16 https://github.com/muicss/mui
17
18 Licensed to the public under the Apache License 2.0
19 -%>
20
21 <%
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"
27
28 local boardinfo = util.ubus("system", "board") or { }
29
30 local node = disp.context.dispatched
31 local path = table.concat(disp.context.path, "-")
32
33 http.prepare_content("text/html; charset=UTF-8")
34 -%>
35 <!DOCTYPE html>
36 <html lang="<%=luci.i18n.context.lang%>">
37 <head>
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%>">
51 <% end -%>
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">
56 <%= css %>
57 </style>
58 <% end -%>
59 </head>
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) %>">
61 <header>
62 <div class="fill">
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>
68 </div>
69 </div>
70 </header>
71 <div class="main">
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>
77 </div>
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 -%>
82 <%- end -%>
83
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>
90 <% end %>
91 </div>
92 <%- end -%>
93
94 <noscript>
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>
98 </div>
99 </noscript>
100
101 <div id="tabmenu" style="display:none"></div>