htdocs/index.lua
author Timm S. Mueller <tmueller@neoscientists.org>
Sun, 29 Apr 2007 14:29:44 +0200
changeset 184 d6dab49fa14a
parent 159 823df4e45339
child 198 87a4de7c7457
permissions -rw-r--r--
Internal links are now always treated lowercase
     1 <%
     2 
     3 --
     4 --	loona.lua - Exemplary site template
     5 --	Written by Timm S. Mueller <tmueller at neoscientists.org>
     6 --	See copyright notice in COPYRIGHT
     7 --
     8 
     9 local os = require "os"
    10 loona:setheader("Content-Type: text/html; charset=utf-8\n\n")
    11 
    12 %>
    13 
    14 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    15 	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    16 <html xmlns="http://www.w3.org/1999/xhtml" lang="<%=loona.lang%>">
    17 <head>
    18 	<link rel="stylesheet" type="text/css" href='/loona.css' />
    19 	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
    20 	<title>
    21 		Loona CMS : <%=loona:encodeform(loona:title())%>
    22 	</title>
    23 </head>
    24 <body>
    25 	<div id="container">
    26 		<div id="logo">
    27 			<a href="<%=loona:href("home")%>"><img
    28 				src="/images/loona.png" alt="LOona logo" /></a>
    29 		</div>
    30 		<div id="menu">
    31 			<h3>menu</h3>
    32 			<!-- This gives a recursive menu in nested unordered lists -->
    33 			<%loona:menu()%>
    34 		</div>
    35 		<div id="top">
    36 			<h3>top body</h3>
    37 			<div class="body">
    38 				<!-- A secondary body section named "top" -->
    39 				<%loona:body("top")%>
    40 			</div>
    41 		</div>
    42 		<div id="main">
    43 			<h3>main body</h3>
    44 			<div class="body">
    45 				<!-- No useful site can exist without a "main" body -->
    46 				<%loona:body("main")%>
    47 			</div>
    48 		</div>
    49 		<div id="side">
    50 			<h3>side body</h3>
    51 			<div class="body">
    52 				<!-- A secondary body section named "side" -->
    53 				<%loona:body("side")%>
    54 			</div>
    55 		</div>
    56 		<%if loona.authuser then%>
    57 			<div id="debug">
    58 				Page took <%=os.clock()%>s to generate<br />
    59 				<a href="http://validator.w3.org/check?uri=referer"><img
    60 					src="http://www.w3.org/Icons/valid-xhtml10"
    61 					alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
    62 			</div>
    63 		<%end%>
    64 	</div>
    65 </body>
    66 </html>