PageRenderTime 22ms CodeModel.GetById 15ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/minger_plus/templates/layout.mako

https://bitbucket.org/bwmcadams/mingerplus
Mako | 86 lines | 78 code | 8 blank | 0 comment | 7 complexity | 38e34c42b8791fac0d46597850644823 MD5 | raw file
 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 2<html xmlns="http://www.w3.org/1999/xhtml">
 3<head>
 4  <title>${self.title()}</title>
 5  ${self.header()}
 6  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
 7  <link rel="openid.server" href="${app_globals.openid_server}" />
 8  <link rel="openid.delegate" href="${app_globals.openid_delegate}" />
 9  <link rel="alternate" type="application/atom+xml" title="Atom" href="/index.xml" />
10  <link rel="alternate" type="application/rss+xml" title="RSS" href="/articles.rss" />  
11  ${self.styles()}
12</head>
13
14<body>
15<div id="container">
16  %if app_globals.logo:
17  <div id="logo">
18    <img src="${app_globals.logo}"/>
19  </div>
20  %endif
21  <div id="header">
22    <h1><span>${h.link_to(app_globals.blog_title, url('home'))}</span></h1>
23    <h2>${app_globals.blog_description}</h2>
24  </div>
25
26  <div id="page">
27    <div id="content">
28        ${next.body()}
29    </div>
30
31    <div id="sidebar">
32      <!-- sidebar components -->
33      ${sidebar.sidebar()}
34    </div>
35    <br style="clear:both;" />
36  </div>
37
38  <div id="footer">
39    <hr />
40    <p>${h.link_to(app_globals.blog_title, url('home'))}</p>
41    <span id="copyright">
42	%if app_globals.copyright:
43	Copyright &copy; ${app_globals.copyright}
44	%endif
45
46   </span>
47    <ul>
48      <li>
49       Powered by ${h.link_to('Pylons', 'http://pylonshq.com/')}
50       + ${h.link_to('Minger', 'http://bitbucket.org/bwmcadams/mingerplus/')}, 
51       styled with ${h.link_to('scribbish', 'http://quotedprintable.com/pages/scribbish')}
52      </li>
53    </ul>
54    
55	%if app_globals.disclaimer:
56		<p id="disclaimer">${app_globals.disclaimer}</p>
57	%endif
58
59  </div>
60</div>
61${self.javascript()}
62</body>
63</html>
64<%namespace name="search" file="/shared/search.mako"/>
65<%namespace name="sidebar" file="/shared/sidebar.mako"/>
66<%def name="title()">${app_globals.blog_title}</%def>
67<%def name="header()">
68${app_globals.header}
69</%def>
70<%def name="styles()">
71<%
72#Only read from file in dev
73if not app_globals.use_minified_assets:
74    f = open(config['pylons.paths']['root'] + '/public/stylesheets/CSSLIST','r')
75    stylesheets = f.read()
76    f.close()
77    stylesheet_files = ['/stylesheets/%s.css' % f for f in stylesheets.split()]
78%>
79
80% if app_globals.use_minified_assets:
81    ${h.stylesheet_link('/stylesheets/%s' % config['minger.minified_css'])}
82% else:
83    ${ h.stylesheet_link(*stylesheet_files) }
84%endif
85</%def>
86<%def name="javascript()"></%def>