templates/layout.tmpl
changeset 44 d09cc8b3709c
parent 28 b68145b5ce24
parent 43 fc11c4e86a82
child 45 e94ab812c0c8
equal deleted inserted replaced
28:b68145b5ce24 44:d09cc8b3709c
     1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
       
     2 
       
     3 <%def name="render_menu(open_page, page, items, ancestry)">
       
     4 <ul>
       
     5 % for pi in items :
       
     6     <li>
       
     7         <a href="${site_page_url}/${pi.url}"${' class="selected-page"' if pi == open_page else ''}>${pi.title} ${'&raquo;' if pi.children and pi.parent else ''}</a>
       
     8     % if pi in ancestry and pi.children and pi.parent :
       
     9         ${render_menu(page, pi, pi.children, ancestry)}
       
    10     % endif
       
    11     </li>
       
    12 % endfor
       
    13 </ul>
       
    14 </%def>
       
    15 
       
    16 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
       
    17     <head>
       
    18         <title>qmsk.net ${' :: ' + h.breadcrumb(menu.ancestry, links=False) if menu.ancestry else ''}</title>
       
    19         <link rel="Stylesheet" type="text/css" href="${site_root_url}/static/style.css" />
       
    20     </head>
       
    21     <body>
       
    22             <div id="header">
       
    23                 <a href="${site_page_url}/">QMSK.NET</a>
       
    24             </div>
       
    25             
       
    26             <div id="container">
       
    27                 <div id="nav">
       
    28                     ${render_menu(menu.page, menu.page, menu.items, menu.ancestry)}
       
    29                 </div>
       
    30 
       
    31                 <div id="content">
       
    32                     <div id="breadcrumb">
       
    33                         <!-- ${h.breadcrumb(menu.ancestry)} -->
       
    34                     </div>
       
    35                     ${page.content}
       
    36                 </div>
       
    37                 
       
    38             </div>
       
    39 
       
    40             <div id="footer">
       
    41                 <div id="footer-right">
       
    42                     Page Modified ${page.modified} <br/>
       
    43                     Current time ${h.now()}
       
    44                 </div>
       
    45                
       
    46                 <div id="footer-left">
       
    47                     &copy; 2009 Tero Marttila
       
    48                 </div>
       
    49                 
       
    50                 <div id="footer-center">
       
    51                     Validated <a href="http://validator.w3.org/check?uri=www.qmsk.net">XHTML 1.0 Strict</a> &amp; <a href="http://jigsaw.w3.org/css-validator/validator?uri=www.qmsk.net">CSS 2.1</a>
       
    52                 </div>
       
    53             </div>
       
    54     </body>
       
    55 </html>
       
    56