]> Pileus Git - site/blob - theme/html.ct
244375ee84fe2bca585e4cbc7a33138dd1a16d14
[site] / theme / html.ct
1 <% #include "html.h" %>
2
3 <% void print_header(page_t *page) { %>
4 <% if (page->error) %><%% "Status: %s\n", page->error %>
5 Content-Type: text/html;charset=UTF-8
6
7 <% } %>
8
9 <% void print_link(char *path, char *name, int cur) { %>
10         <a href="<% href(path); %>"<% if (cur) { %> class="cur"<% } %>><%= name %></a>
11 <% } %>
12
13 <% void print_page(page_t *page, menu_t *menu) { %>
14 <?xml version="1.0" encoding="UTF-8"?>
15 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
16         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
17 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
18         <head>
19                 <title><% if (page->title) %><%% "%s - ", page->title %>pileus.org</title>
20                 <link href="<% href("theme/style.css"); %>" rel="stylesheet" type="text/css" />
21                 <meta http-equiv="X-UA-Compatible" content="IE=9" />
22                 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
23                 <% if (page->keys) { %>
24                 <meta name="keywords" content="<%= page->keys %>" />
25                 <% } %>
26                 <% if (page->desc) { %>
27                 <meta name="description" content="<%= page->desc %>" />
28                 <% } %>
29         </head>
30         <body>
31                 <div class="title">
32                         <a href="<% href(""); %>">pileus.org</a>
33                         <span><% if (page->title) %><%= page->title %></span>
34                 </div>
35                 <h1 class="nav">
36                         <% print_menu(menu, 0, 0); %>
37                         <span style="float:right;">
38                         <!--
39                         <a href="?">View</a>
40                         <a href="?src">Source</a>
41                         <a href="?hist">History</a>
42                         -->
43                         </span>
44                 </h1>
45                 <h2 class="nav">
46                         <% print_menu(menu, 1, -1); %>
47                 </h2>
48                 <div class="content">
49                         <% if (page->error) { %>
50                                 <h1><%= page->error %></h1>
51                                 <h2><%= page->html  %></h2>
52                         <% } else { %>
53                                 <%= page->html %>
54                         <% } %>
55                         <div class="bottom"></div>
56                 </div>
57                 <div class="footer">
58                         Copyright © 2013 pileus.org
59                 </div>
60         </body>
61 </html>
62 <% } %>