JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
first stab at paypal_ipn framework
[wfpl-cms.git] / template.html
index 081144e..c7793d8 100644 (file)
@@ -1,38 +1,45 @@
 <!DOCTYPE html>
 <html lang="en">
 <head>
-       <meta charset="utf-8" />
        <title>~$title html~~$cms_title html~</title>
-       <!--~meta_description nonempty {~--><meta name="description" content="~meta_description attr~" /><!--~}~-->
-       <!--~meta_description nonempty {~--><meta name="keywords" content="~meta_keywords attr~" /><!--~}~-->
+       <meta name="viewport" content="width=device-width, user-scalable=no" />
        <!--[if lt IE 9]>
                ~$running_locally {~<script src="/javascript/html5.js"></script>~}~
                ~$running_locally unset {~<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>~}~
        <![endif]-->
-       <script>less = {env:'development'};</script>
-       <link rel="stylesheet/less" href="style_01.less" />
-       <!--~$running_locally {~--><script src="/javascript/less/less.min.js"></script><!--~}~-->
-       <!--~$running_locally unset {~--><script src="http://lesscss.googlecode.com/files/less-1.0.41.min.js"></script><!--~}~-->
+       <link rel="stylesheet" href="css.css?m=~css.css mtime~" />
+       <!--~$meta_description nonempty {~--><meta name="description" content="~$meta_description attr~" /><!--~}~-->
+       <!--~$meta_keywords nonempty {~--><meta name="keywords" content="~$meta_keywords attr~" /><!--~}~-->
        <!--~$head~-->
 </head>
 
-<body>
+<body id="~$basename~_body" class="real_body_tag">
        <div id="centerer">
                <header>
                        header image here
                </header>
-               <nav><!--~$navbar_items {~-->
-                       <h3><a href="~filename~">~title html~</a></h3><!--~}~-->
-               </nav>
+               <!--~$navbar_items once_if {~-->
+                       <nav id="site-nav">
+                               <form action="#" method="get">
+                                       <label for="mobile_menu_check" id="mobile_menu_button">&#9776; Menu</label>
+                                       <input type="checkbox" name="mobile_menu_check" id="mobile_menu_check">
+                                       <div>
+                                               <ul><!--~$navbar_items {~-->
+                                                       <li><a href="~filename~">~title html~</a></li><!--~}~-->
+                                               </ul>
+                                       </div>
+                               </form>
+                       </nav>
+               <!--~}~-->
 
                <div id="main-body">
                        <!--~$admin_links {~-->
-                               <div id="admin_links">You are logged in as an administrator. &nbsp; <a href="admin_pages?~id {~edit_id=~id~~}~~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>
+                               <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>
                        <!--~}~-->
                        <!--~$messages once_if {~-->
                                <div id="wfpl_messages">
                                        <!--~$messages {~-->
-                                               <p>~message html~</p>
+                                               <p>~message htmlbrtab~</p>
                                                <!--~ sep {~-->
                                                        <hr>
                                                <!--~}~-->
                        footer text here
                </footer>
        </div>
+       <!--~$render_timestamps {~-->
+               <script>
+                       (function() {
+                               var i02 = function (i) { return i > 9 ? i : '0' + i; };
+                               var date_to_html = function (d, include_time) {
+                                       var hours = d.getHours()
+                                       var ret = '<span class="date_time">' +
+                                               i02(d.getMonth() + 1) + '/' +
+                                               i02(d.getDate()) + '/' +
+                                               d.getFullYear();
+                                       if (include_time) {
+                                               ret += ' ' + ((hours + 11) % 12 + 1) + ':' +
+                                                       i02(d.getMinutes()) +
+                                                       (hours < 12 ? 'am' : 'pm')
+                                       }
+                                       ret += '</span>';
+                                       return ret;
+                               }
+                               window.render_timestamps = function() {
+                                       var els = document.getElementsByClassName('unix_time');
+                                       var i, d, hours;
+                                       for (i in els) {
+                                               d = new Date(1000 * parseInt(els[i].innerHTML));
+                                               els[i].innerHTML = date_to_html(d, true);
+                                       }
+                                       els = document.getElementsByClassName('unix_date');
+                                       for (i in els) {
+                                               d = new Date(1000 * parseInt(els[i].innerHTML));
+                                               els[i].innerHTML = date_to_html(d, false);
+                                       }
+                               }
+                       }).call();
+                       render_timestamps();
+               </script>
+       <!--~}~-->
 </body>
 </html>