-
Notifications
You must be signed in to change notification settings - Fork 70
/
main.tmpl
53 lines (48 loc) · 1.55 KB
/
main.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#! stdtmpl
#proc genMain(c: var TForumData, content: string, mainPage = false): string =
# result = ""
<!doctype html>
<html lang="en">
<head>
<title>Nimrod Forum</title>
<link rel="stylesheet" href="${c.req.makeUri("css/normalize.css", absolute = false)}">
<link rel="stylesheet" href="${c.req.makeUri("css/style.css", absolute = false)}">
</head>
<body>
<div id="wrapper">
<div id="nimbtn">
<a href="http://nimrod-code.org/">Homepage</a>
</div>
<div id="header">
#let frontQuery = c.req.makeUri("/")
<span><a href="${frontQuery}">Nimrod's Forum</a></span>
#if c.loggedIn:
<a href="${frontQuery}logout" class="right">Logout</a>
<span id="welcome">$c.username</span>
${genGravatar(c.email, 26)}
#else:
<a href="${frontQuery}register" class="right">Register</a>
<a href="${frontQuery}login" class="right">Login</a>
#end if
</div>
<div id="topbar">
${c.genActionMenu}
</div>
<div id="content">
$content
<span style="color:red">$c.errorMsg</span>
</div>
<div id="topbar">
${c.genActionMenu}
</div>
#if mainPage:
${c.genListOnline}
#end if
</div>
<div id="footer">
<span>Written in <a href="http://nimrod-code.org/">Nimrod</a> using <a href="https://github.com/dom96/jester">Jester</a></span>
<span> | <a href="https://github.com/nimrod-code/nimforum">Fork on Github</a></span>
<span style="float:right;">Generated in ${int((epochTime()-c.startTime)*1000.0)}ms</span>
</div>
</body>
</html>