themes: add facility to include custom css
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 21 Nov 2012 18:36:40 +0000 (18:36 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 21 Nov 2012 18:36:40 +0000 (18:36 +0000)
themes/bootstrap/luasrc/view/themes/bootstrap/header.htm
themes/freifunk-bno/luasrc/view/themes/freifunk-bno/header.htm
themes/freifunk-generic/luasrc/view/themes/freifunk-generic/header.htm
themes/openwrt/luasrc/view/themes/openwrt.org/header.htm

index 1d23877..c79c152 100644 (file)
@@ -106,6 +106,10 @@ You may obtain a copy of the License at
   <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>
 
index 7313fff..be03d87 100644 (file)
@@ -41,6 +41,10 @@ require("luci.http").prepare_content("text/html")
 <head>
        <link rel="stylesheet" type="text/css" href="<%=media%>/cascade.css" />
        <% if node and node.css then %><link rel="stylesheet" type="text/css" href="<%=resource%>/<%=node.css%>" /><% end %>
+       <% if css then %><style title="text/css">
+       <%-= css %>
+       </style>
+       <% end -%>
        <link rel="shortcut icon" href="<%=media%>/images/favicon.ico" />
        <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
        <meta http-equiv="content-script-type" content="text/javascript" />
index c14d8be..a8c257e 100644 (file)
@@ -79,6 +79,10 @@ You may obtain a copy of the License at
 <!--[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 -%>
 <script type="text/javascript" src="<%=resource%>/xhr.js"></script>
 
 <title><%=striptags( hostname .. ( (node and node.title) and ' - ' .. translate(tostring(node.title)) or '')) %> - LuCI</title>
index 9f85959..5006723 100644 (file)
@@ -107,6 +107,10 @@ $Id$
 <!--[if IE 8]><link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/ie8.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 -%>
 <script type="text/javascript" src="<%=resource%>/xhr.js"></script>
 <title><%=striptags( hostname .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title>
 </head>