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