JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
hover admin links top/right
[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                 <!--~$admin_links {~-->
19                         <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>
20                 <!--~}~-->
21
22                 <header id="site_header">
23                         <!--~$cms_header~-->
24                 </header>
25                 <!--~$navbar_items once_if {~-->
26                         <nav class="nav">
27                                 <form action="#" method="get">
28                                         <label for="mobile_menu_check" id="mobile_menu_button">&#9776; Menu</label>
29                                         <input type="checkbox" name="mobile_menu_check" id="mobile_menu_check">
30                                         <div>
31                                                 <ul><!--~$navbar_items {~-->
32                                                         <li><a href="~filename~">~title html~</a></li><!--~}~-->
33                                                 </ul>
34                                         </div>
35                                 </form>
36                         </nav>
37                 <!--~}~-->
38
39                 <div class="main">
40                         <!--~$messages once_if {~-->
41                                 <div id="wfpl_messages">
42                                         <!--~$messages {~-->
43                                                 <p>~message htmlbrtab~</p>
44                                                 <!--~ sep {~-->
45                                                         <hr>
46                                                 <!--~}~-->
47                                         <!--~}~-->
48                                 </div>
49                         <!--~}~-->
50
51                         <article>
52                                 ~$cms_body~
53
54                                 ~$body~
55                         </article>
56                 </div>
57
58                 <!--~$cms_sidebar {~-->
59                         <aside class="sidebar ~$layout_sidebar_class~">
60                                 <!--~$cms_sidebar~-->
61                         </aside>
62
63                         <div style="clear: both"></div>
64                 <!--~}~-->
65
66                 <footer>
67                         ~$cms_footer~
68                 </footer>
69         </div>
70         <!--~$render_timestamps {~-->
71                 <script>
72                         (function() {
73                                 var i02 = function (i) { return i > 9 ? i : '0' + i; };
74                                 var date_to_html = function (d, include_time) {
75                                         var hours = d.getHours()
76                                         var ret = '<span class="date_time">' +
77                                                 i02(d.getMonth() + 1) + '/' +
78                                                 i02(d.getDate()) + '/' +
79                                                 d.getFullYear();
80                                         if (include_time) {
81                                                 ret += ' ' + ((hours + 11) % 12 + 1) + ':' +
82                                                         i02(d.getMinutes()) +
83                                                         (hours < 12 ? 'am' : 'pm')
84                                         }
85                                         ret += '</span>';
86                                         return ret;
87                                 }
88                                 window.render_timestamps = function() {
89                                         var els = document.getElementsByClassName('unix_time');
90                                         var i, d, hours;
91                                         for (i in els) {
92                                                 d = new Date(1000 * parseInt(els[i].innerHTML));
93                                                 els[i].innerHTML = date_to_html(d, true);
94                                         }
95                                         els = document.getElementsByClassName('unix_date');
96                                         for (i in els) {
97                                                 d = new Date(1000 * parseInt(els[i].innerHTML));
98                                                 els[i].innerHTML = date_to_html(d, false);
99                                         }
100                                 }
101                         }).call();
102                         render_timestamps();
103                 </script>
104         <!--~}~-->
105 </body>
106 </html>