64 lines
2 KiB
Cheetah
64 lines
2 KiB
Cheetah
#! stdtmpl
|
|
#proc genMain(c: var TForumData, content: string): string =
|
|
# result = ""
|
|
# var stats: TForumStats
|
|
# if c.isThreadsList: stats = c.getStats(false)
|
|
# else:
|
|
# stats = c.getStats(true)
|
|
# end if
|
|
<!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)}">
|
|
<meta charset="UTF-8">
|
|
</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>
|
|
#let profileUrl = c.req.makeUri("profile/", false) &
|
|
# XMLencode(c.username)
|
|
<span id="welcome"><a href="${profileUrl}">$c.username</a></span>
|
|
<a href="$profileUrl">${genGravatar(c.email, 26)}</a>
|
|
#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>
|
|
#if c.req.pathInfo.normalizeUri notin noPageNums:
|
|
${c.genPagenumNav(stats)}
|
|
#end if
|
|
<div id="topbar">
|
|
${c.genActionMenu}
|
|
</div>
|
|
|
|
#if c.isThreadsList:
|
|
${c.genListOnline(stats)}
|
|
#end if
|
|
<div id="footerPush"></div>
|
|
</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>
|