JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
don't overwrite .centerer vmargin
[wfpl-cms.git] / template.html
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4         <title>~$title html~~$cms_title html~</title>
5         <meta name="viewport" content="width=device-width, user-scalable=no" />
6         <!--[if lt IE 9]>
7                 ~$running_locally {~<script src="/javascript/html5.js"></script>~}~
8                 ~$running_locally unset {~<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>~}~
9         <![endif]-->
10         <link rel="stylesheet" href="css.css?m=~css.css mtime~" />
11         <!--~$meta_description nonempty {~--><meta name="description" content="~$meta_description attr~" /><!--~}~-->
12         <!--~$meta_keywords nonempty {~--><meta name="keywords" content="~$meta_keywords attr~" /><!--~}~-->
13         <!--~$head~-->
14 </head>
15
16 <body id="~$basename~_body" class="real_body_tag">
17         <div class="centerer ~$layout_centerer_class~">
18                 <header>
19                         header image here
20                 </header>
21                 <!--~$navbar_items once_if {~-->
22                         <nav class="nav">
23                                 <form action="#" method="get">
24                                         <label for="mobile_menu_check" id="mobile_menu_button">&#9776; Menu</label>
25                                         <input type="checkbox" name="mobile_menu_check" id="mobile_menu_check">
26                                         <div>
27                                                 <ul><!--~$navbar_items {~-->
28                                                         <li><a href="~filename~">~title html~</a></li><!--~}~-->
29                                                 </ul>
30                                         </div>
31                                 </form>
32                         </nav>
33                 <!--~}~-->
34
35                 <div class="main">
36                         <!--~$admin_links {~-->
37                                 <div id="admin_links">You are logged in as an administrator. &nbsp; <a href="admin_pages?~$edit_page_id {~edit_id=~$edit_page_id~~}~~$edit_page_id unset {~&amp;new=1&amp;new_filename=~$basename~~}~">Edit this page</a> &mdash; <a href="admin">Control panel</a> &mdash; <a href="logout">Log out</a></div>
38                         <!--~}~-->
39                         <!--~$messages once_if {~-->
40                                 <div id="wfpl_messages">
41                                         <!--~$messages {~-->
42                                                 <p>~message htmlbrtab~</p>
43                                                 <!--~ sep {~-->
44                                                         <hr>
45                                                 <!--~}~-->
46                                         <!--~}~-->
47                                 </div>
48                         <!--~}~-->
49
50                         <article>
51                                 ~$cms_body~
52
53                                 ~$body~
54                         </article>
55                 </div>
56
57                 <!--~$cms_sidebar {~-->
58                         <aside class="sidebar ~$layout_sidebar_class~">
59                                 <!--~$cms_sidebar~-->
60                         </aside>
61
62                         <div style="clear: both"></div>
63                 <!--~}~-->
64
65                 <footer>
66                         ~$cms_footer~
67                 </footer>
68         </div>
69         <!--~$render_timestamps {~-->
70                 <script>
71                         (function() {
72                                 var i02 = function (i) { return i > 9 ? i : '0' + i; };
73                                 var date_to_html = function (d, include_time) {
74                                         var hours = d.getHours()
75                                         var ret = '<span class="date_time">' +
76                                                 i02(d.getMonth() + 1) + '/' +
77                                                 i02(d.getDate()) + '/' +
78                                                 d.getFullYear();
79                                         if (include_time) {
80                                                 ret += ' ' + ((hours + 11) % 12 + 1) + ':' +
81                                                         i02(d.getMinutes()) +
82                                                         (hours < 12 ? 'am' : 'pm')
83                                         }
84                                         ret += '</span>';
85                                         return ret;
86                                 }
87                                 window.render_timestamps = function() {
88                                         var els = document.getElementsByClassName('unix_time');
89                                         var i, d, hours;
90                                         for (i in els) {
91                                                 d = new Date(1000 * parseInt(els[i].innerHTML));
92                                                 els[i].innerHTML = date_to_html(d, true);
93                                         }
94                                         els = document.getElementsByClassName('unix_date');
95                                         for (i in els) {
96                                                 d = new Date(1000 * parseInt(els[i].innerHTML));
97                                                 els[i].innerHTML = date_to_html(d, false);
98                                         }
99                                 }
100                         }).call();
101                         render_timestamps();
102                 </script>
103         <!--~}~-->
104 </body>
105 </html>