Merge pull request #278 from nmav/ocserv
[project/luci.git] / themes / bootstrap / luasrc / view / themes / bootstrap / header.htm
index 60c7a6e..12818cb 100644 (file)
@@ -79,7 +79,7 @@ You may obtain a copy of the License at
                                end
                 if level > 2 then
                %>
-                       <li class="tabmenu-item-<%=v%><%- if nnode._menu_selected or (node.leaf and v == leaf) then -%> active<% end %>">
+                       <li class="tabmenu-item-<%=v%><%- if nnode._menu_selected or (node.leaf and v == leaf) then %> active<% end %>">
                            <a href="<%=nodeurl(prefix, v, nnode.query)%>"><%=striptags(translate(nnode.title))%></a>
                        </li>
                <%      end
@@ -102,10 +102,16 @@ You may obtain a copy of the License at
   <meta charset="utf-8">
   <title><%=striptags( hostname .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title>
   <!--[if lt IE 9]><script src="<%=media%>/html5.js"></script><![endif]-->
+  <meta name="viewport" content="initial-scale=1.0">
   <link rel="stylesheet" href="<%=media%>/cascade.css">
+  <link rel="stylesheet" media="only screen and (max-device-width: 854px)" href="<%=media%>/mobile.css" type="text/css" />
   <link rel="shortcut icon" href="<%=media%>/favicon.ico">
   <% if node and node.css then %><link rel="stylesheet" href="<%=resource%>/<%=node.css%>">
   <% end -%>
+  <% if css then %><style title="text/css">
+  <%-= css %>
+  </style>
+  <% end -%>
   <script src="<%=resource%>/xhr.js"></script>
  </head>
 
@@ -148,7 +154,7 @@ You may obtain a copy of the License at
                 if #grandchildren > 0 then
        %>
         <li class="dropdown">
-            <a class="menu" href="<%=pcdata(href)%>"><%=pcdata(striptags(translate(nnode.title)))%></a>
+            <a class="menu" href="#"><%=pcdata(striptags(translate(nnode.title)))%></a>
             <%- submenu("/" .. category .. "/" .. r .. "/", nnode) %>
         </li>
        <%          else %>
@@ -189,8 +195,7 @@ You may obtain a copy of the License at
    </div>
   </header>
 
-
-<%- 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="container">
        <div class="alert-message warning">
                <h4><%:No password set!%></h4>