themes/freifunk-generic: Fix invalid html
[project/luci.git] / themes / freifunk-generic / luasrc / view / themes / freifunk-generic / header.htm
index 2c35219..e8b1c06 100644 (file)
@@ -74,14 +74,20 @@ You may obtain a copy of the License at
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta http-equiv="Content-Script-Type" content="text/javascript" />
 <link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/cascade.css" />
-<link rel="stylesheet" media="only screen and (max-device-width: 480px)" href="<%=media%>/mobile.css" type="text/css" />
+<link rel="stylesheet" media="only screen and (max-device-width: 854px)" href="<%=media%>/mobile.css" type="text/css" />
+<link rel="stylesheet" media="only screen and (max-width: 854px)" href="<%=media%>/smallscreen.css" type="text/css" />
 <link rel="stylesheet" media="handheld" href="<%=media%>/mobile.css" type="text/css" />
 <!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/ie7.css" /><![endif]-->
 <% if node and node.css then %><link rel="stylesheet" type="text/css" media="screen" href="<%=resource%>/<%=node.css%>" />
 <% end -%>
+<% if css then %><style title="text/css">
+<%= css %>
+</style>
+<% end -%>
+<meta name="viewport" content="initial-scale=1.0" />
 <script type="text/javascript" src="<%=resource%>/xhr.js"></script>
 
-<title><%=striptags( hostname .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title>
+<title><%=striptags( hostname .. ( (node and node.title) and ' - ' .. translate(tostring(node.title)) or '')) %> - LuCI</title>
 </head>
 
 <body class="lang_<%=luci.i18n.context.lang%>">
@@ -94,7 +100,7 @@ You may obtain a copy of the License at
 </div></div>
 <![endif]-->
 
-<%- if luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
+<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
        <div class="warning">
                <strong><%:No password set!%></strong><br />
                <%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%>
@@ -113,12 +119,11 @@ You may obtain a copy of the License at
                </div>
        <%else%>
                <div class="header_left">
-                       <a href="<%=hp%>"><img src="<%=logo%>" alt="Logo" /></a>
+                       <a href="<%=hp%>"><img src="<%=logo%>" id="mainlogo" alt="Logo" /></a>
                        <%if show_comm then%>
                                <a href="<%=hp%>"><%=community%></a>
                                <br/>
                        <%end%>
-               <div class = "spacer"></div>
                </div>
                <div class="header_right">
                        <%=luci.version.distversion%><br />
@@ -130,6 +135,8 @@ You may obtain a copy of the License at
                                <span id="xhr_poll_status_off" style="display:none"><%:off%></span>
                        </span>
                </div>
+               <div class="clear"></div>
+
        <%end%>
 </div>
 
@@ -181,13 +188,11 @@ You may obtain a copy of the License at
 </ul>
 
 <% if #categories > 1 then %>
-<div class="modemenu">
-       <ul>
+       <ul id="modemenu">
        <% for i, r in ipairs(categories) do %>
                <li><a<%=ifattr(request[1] == r, "class", "active")%> href="<%=controller%>/<%=r%>/"><%=striptags(translate(tree.nodes[r].title))%></a></li>
        <% end %>
        </ul>
-</div>
 <% end %>
 
 <%