mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 09:24:36 +00:00
89 lines
2.5 KiB
Cheetah
89 lines
2.5 KiB
Cheetah
#! stdtmpl | standard
|
|
#proc generateHTMLPage(c: var TConfigData, currentTab, content, rss: string): string =
|
|
# result = ""
|
|
<!doctype html>
|
|
<html>
|
|
|
|
<head>
|
|
<title>$c.projectTitle</title>
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
<link rel="stylesheet" type="text/css" href="assets/style.css" />
|
|
#if len(rss) > 0:
|
|
<link href="$rss" title="Recent changes" type="application/atom+xml" rel="alternate">
|
|
#end fi
|
|
</head>
|
|
|
|
<body>
|
|
<div id="site">
|
|
<!-- site_head -->
|
|
<div id="site_head">
|
|
<div id="logo"></div>
|
|
</div>
|
|
|
|
<!-- site_neck -->
|
|
<div id="site_neck">
|
|
#for i in 0.. c.tabs.len-1:
|
|
# var name = c.tabs[i].key
|
|
# var t = c.tabs[i].val
|
|
#if currentTab == t:
|
|
<a class="active"
|
|
#else:
|
|
<a
|
|
#end if
|
|
href="${t}.html" title = "$c.projectName - $name">$name</a>
|
|
#end for
|
|
</div>
|
|
|
|
<!-- site_body -->
|
|
<div id="site_body">
|
|
|
|
<!-- sidebar_wrapper -->
|
|
<div id="sidebar_wrap">
|
|
<div id="sidebar">
|
|
<div id="sidebar_head"></div>
|
|
<h2>Latest News</h2>
|
|
# if len(c.ticker) > 0:
|
|
$c.ticker
|
|
# end if
|
|
|
|
# if len(c.links) > 0:
|
|
<h2>More Links</h2>
|
|
# for i in 0..c.links.len-1:
|
|
<a class="link" href="${c.links[i].val}" id="${c.links[i].id}">${c.links[i].key}</a>
|
|
# end for
|
|
# end if
|
|
</div>
|
|
</div>
|
|
<!-- page -->
|
|
<div id="page">
|
|
#if c.quotations.hasKey(currentTab):
|
|
<div class="quote-image"></div>
|
|
<p class="quote">
|
|
${c.quotations[currentTab].quote}
|
|
<br>
|
|
<b style="float: right">-- ${c.quotations[currentTab].author}</b>
|
|
</p>
|
|
<br/>
|
|
#end if
|
|
|
|
$content
|
|
</div>
|
|
</div>
|
|
<!-- site_foot -->
|
|
<div id="site_foot">
|
|
<div id="legal">Copyright © 2014 - Andreas Rumpf & Contributors - All rights reserved - <a href="http://reign-studios.com/philipwitte/">Design by Philip Witte</a></div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
|
|
|
ga('create', 'UA-48159761-1', 'nimrod-lang.org');
|
|
ga('send', 'pageview');
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|