summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorZach LeBar <zach@zachlebar.com>1980-02-09 06:22:47 +0000
committerZach LeBar <zach@zachlebar.com>1980-02-09 06:22:47 +0000
commit802bcdd64ae2232c633e5460be813766ddf829e0 (patch)
tree84d7dd4b4587b623469ec35e25f33a5c1fed5480 /app
parent67836736298dd1f86c64d17b3146e8d8ecfa9358 (diff)
downloadacf-core-802bcdd64ae2232c633e5460be813766ddf829e0.tar.bz2
acf-core-802bcdd64ae2232c633e5460be813766ddf829e0.tar.xz
Cleaned up index.html and template-html.lsp
Refined the HTML in both to remove extraneous elements, and adjust ids and classnames for more succinct code.
Diffstat (limited to 'app')
-rw-r--r--app/template-html.lsp229
1 files changed, 90 insertions, 139 deletions
diff --git a/app/template-html.lsp b/app/template-html.lsp
index 6e12ab7..bd4bb85 100644
--- a/app/template-html.lsp
+++ b/app/template-html.lsp
@@ -9,150 +9,101 @@ Content-Type: text/html
end
%>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-<%
-local hostname = ""
-if viewlibrary and viewlibrary.dispatch_component then
- local result = viewlibrary.dispatch_component("alpine-baselayout/hostname/read", nil, true)
- if result and result.value then
- hostname = result.value
- end
-end
-%>
-<title><%= html.html_escape(hostname .. " - " .. pageinfo.controller .. "->" .. pageinfo.action) %></title>
-<link rel="stylesheet" type="text/css" href="<%= html.html_escape(pageinfo.wwwprefix..pageinfo.staticdir) %>/reset.css">
-<link rel="stylesheet" type="text/css" href="<%= html.html_escape(pageinfo.wwwprefix..pageinfo.skin.."/"..posix.basename(pageinfo.skin)..".css") %>">
-<!--[if IE]>
-<link rel="stylesheet" type="text/css" href="<%= html.html_escape(pageinfo.wwwprefix..pageinfo.skin.."/"..posix.basename(pageinfo.skin).."-ie.css") %>">
-<![endif]-->
-<script type="text/javascript" src="<%= html.html_escape(pageinfo.wwwprefix) %>/js/jquery-latest.js"></script>
-<script type="text/javascript">
- $(function(){
- $(":input:not(:submit):enabled:not([readonly]):first").focus();
- });</script>
-</head>
-<body>
-
-<div id="page">
- <div id="header">
- <div class="leader">
- <a href="#Content" class="hide">[Skip to main content]</a>
- </div>
- <div id="logo">
- <div class="leader"></div>
- <h1>AlpineLinux</h1>
- <p><%= html.html_escape(hostname or "unknown hostname") %></p>
- <div class="tailer"></div>
- </div>
- <span class="mute">
- <p>
- <% local ctlr = pageinfo.script .. "/acf-util/logon/"
+<!DOCTYPE html>
+<!--[if IE 6]> <html class="ie6"> <![endif]-->
+<!--[if IE 7]> <html class="ie7"> <![endif]-->
+<!--[if IE 8]> <html class="ie8"> <![endif]-->
+<!--[if gt IE 8]><!--> <html> <!--<![endif]-->
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+
+ <%
+ local hostname = ""
+ if viewlibrary and viewlibrary.dispatch_component then
+ local result = viewlibrary.dispatch_component("alpine-baselayout/hostname/read", nil, true)
+ if result and result.value then
+ hostname = result.value
+ end
+ end
+ %>
+
+ <title><%= html.html_escape(hostname .. " - " .. pageinfo.controller .. " -> " .. pageinfo.action) %></title>
+
+ <link rel="stylesheet" type="text/css" href="<%= html.html_escape(pageinfo.wwwprefix..pageinfo.staticdir) %>/reset.css">
+ <link rel="stylesheet" type="text/css" href="<%= html.html_escape(pageinfo.wwwprefix..pageinfo.skin.."/"..posix.basename(pageinfo.skin)..".css") %>">
+
+ <script type="text/javascript" src="<%= html.html_escape(pageinfo.wwwprefix) %>/js/jquery-latest.js"></script>
+ <script type="text/javascript">
+ $(function(){
+ $(":input:not(:submit):enabled:not([readonly]):first").focus();
+ });
+ </script>
+ </head>
+ <body>
+
+ <div id="page">
+ <div id="header">
+ <h1>AlpineLinux</h1>
+ <p class="hostname"><%= html.html_escape(hostname or "unknown hostname") %></p>
- if session.userinfo and session.userinfo.userid then
- io.write ( string.format("\t\t\t\t\t\t<a href=\"%s\">Log out as '" .. html.html_escape(session.userinfo.userid) .. "'</a>\n", html.html_escape(ctlr) .. "logout" ) )
- else
- io.write ( string.format("\t\t\t\t\t\t<a href=\"%s\">Log in</a>\n", html.html_escape(ctlr) .. "logon" ) )
- end %>
- |
- <a href="<%= html.html_escape(pageinfo.wwwprefix) %>/">home</a> |
- <a href="http://www.alpinelinux.org">about</a>
- </p></span>
- <div class="tailer"></div>
- </div> <!-- header -->
-
- <div id="main">
- <div class="leader">
- </div>
-
- <div id="nav">
- <div class="leader">
- <h3 class="hide">[Main menu]</h3>
- </div>
-
- <%
- local class
- local tabs
- io.write ( "<ul>")
- for x,cat in ipairs(session.menu.cats) do
- io.write (string.format("\n\t\t\t\t<li>%s\n\t\t\t\t\t<ul>\n", html.html_escape(cat.name))) --start row
- for y,group in ipairs(cat.groups) do
- class=""
- if not tabs and group.controllers[pageinfo.prefix .. pageinfo.controller] then
- class="class='selected'"
- tabs = group.tabs
- end
- io.write (string.format("\t\t\t\t\t\t<li %s><a %s href=\"%s%s%s/%s\">%s</a></li>\n",
- class,class,html.html_escape(pageinfo.script),html.html_escape(group.tabs[1].prefix), html.html_escape(group.tabs[1].controller), html.html_escape(group.tabs[1].action), html.html_escape(group.name) ))
- end
- io.write ( "\t\t\t\t\t</ul>" )
- end
- io.write ( "\n\t\t\t\t</li>\n\t\t\t</ul>\n")
- %>
-
- <div class="tailer">
- </div>
- </div> <!-- nav -->
-
-
- <div id="postnav">
- <div class="leader">
- </div>
- <h2><%= html.html_escape(pageinfo.controller) %> : <%= html.html_escape(pageinfo.action) %></h2>
- <!-- FIXME: Next row is 'dead' data! Remove 'class=hide' when done! -->
- <p class='hide'>[ welcome ] > [ login ] > [ bgp ] > [ firewall ] > [ content filter ] > [ interfaces ]</p>
- <div class="tailer">
- </div>
- </div> <!-- postnav -->
-
- <a name="Content"></a>
-
- <div id="subnav">
- <div class="leader">
- <h3 class="hide">[Submenu]</h3>
- </div>
-
- <ul>
- <% local class="" %>
- <% for x,tab in pairs(tabs or {}) do
- if tab.prefix == pageinfo.prefix and tab.controller == pageinfo.controller and tab.action == pageinfo.action then
- class="class='selected'"
+ <%
+ local ctlr = pageinfo.script .. "/acf-util/logon/"
+
+ if session.userinfo and session.userinfo.userid then
+ io.write ( string.format("\t\t\t\t\t\t<a href=\"%s\">Log out as '" .. html.html_escape(session.userinfo.userid) .. "'</a>\n", html.html_escape(ctlr) .. "logout" ) )
else
- class=""
- end
- io.write (string.format('<li %s><a %s href="%s%s%s/%s">%s</a></li>\n',
- class,class,html.html_escape(pageinfo.script),html.html_escape(tab.prefix),html.html_escape(tab.controller),html.html_escape(tab.action),html.html_escape(tab.name) ))
- end
- %>
- </ul>
-
- <div class="tailer">
- </div>
- </div> <!-- subnav -->
-
-<div id="content">
- <div class="leader">
- </div>
+ io.write ( string.format("\t\t\t\t\t\t<a href=\"%s\">Log in</a>\n", html.html_escape(ctlr) .. "logon" ) )
+ end
+ %>
+ </div> <!-- header -->
+
+ <div id="main">
+ <ul id="nav">
+ <%
+ local class
+ local tabs
+ for x,cat in ipairs(session.menu.cats) do
+ io.write (string.format("\n\t\t\t\t<li>%s\n\t\t\t\t\t<ul>\n", html.html_escape(cat.name))) --start row
+ for y,group in ipairs(cat.groups) do
+ class=""
+ if not tabs and group.controllers[pageinfo.prefix .. pageinfo.controller] then
+ class="class='selected'"
+ tabs = group.tabs
+ end
+
+ io.write (string.format("\t\t\t\t\t\t<li %s><a %s href=\"%s%s%s/%s\">%s</a></li>\n", class,class,html.html_escape(pageinfo.script),html.html_escape(group.tabs[1].prefix), html.html_escape(group.tabs[1].controller), html.html_escape(group.tabs[1].action), html.html_escape(group.name) ))
+ end
+ io.write ( "\t\t\t\t\t</ul>" )
+ io.write ("\t\t\t\t</li>")
+ end
+ %>
+ </ul> <!-- nav -->
+
+ <ul id="subnav">
+ <% local class="" %>
+ <%
+ for x,tab in pairs(tabs or {}) do
+ if tab.prefix == pageinfo.prefix and tab.controller == pageinfo.controller and tab.action == pageinfo.action then
+ class="class='selected'"
+ else
+ class=""
+ end
+
+ io.write (string.format('<li %s><a %s href="%s%s%s/%s">%s</a></li>\n',class,class,html.html_escape(pageinfo.script),html.html_escape(tab.prefix),html.html_escape(tab.controller),html.html_escape(tab.action),html.html_escape(tab.name) ))
+ end
+ %>
+ </ul> <!-- subnav -->
- <% pageinfo.viewfunc(viewtable, viewlibrary, pageinfo, session) %>
+ <div id="content">
- <div class="tailer">
- </div>
-</div> <!-- content -->
+ <% pageinfo.viewfunc(viewtable, viewlibrary, pageinfo, session) %>
- </div> <!-- main -->
+ </div> <!-- content -->
- <div id="footer">
- <div class="leader">
- </div>
- <p>Page generated in <%= html.html_escape(os.clock()) %> seconds on <%= html.html_escape(os.date()) %>.</p>
- <div class="tailer">
- </div>
- </div> <!-- footer -->
-</div> <!-- page -->
+ </div> <!-- main -->
-</body>
+ <p id="footer">Page generated in <%= html.html_escape(os.clock()) %> seconds on <%= html.html_escape(os.date()) %>.</p>
+ </div> <!-- page -->
+ </body>
</html>