/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
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>${self.title()}</title>
- ${self.header()}
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <link rel="openid.server" href="${app_globals.openid_server}" />
- <link rel="openid.delegate" href="${app_globals.openid_delegate}" />
- <link rel="alternate" type="application/atom+xml" title="Atom" href="/index.xml" />
- <link rel="alternate" type="application/rss+xml" title="RSS" href="/articles.rss" />
- ${self.styles()}
- </head>
- <body>
- <div id="container">
- %if app_globals.logo:
- <div id="logo">
- <img src="${app_globals.logo}"/>
- </div>
- %endif
- <div id="header">
- <h1><span>${h.link_to(app_globals.blog_title, url('home'))}</span></h1>
- <h2>${app_globals.blog_description}</h2>
- </div>
- <div id="page">
- <div id="content">
- ${next.body()}
- </div>
- <div id="sidebar">
- <!-- sidebar components -->
- ${sidebar.sidebar()}
- </div>
- <br style="clear:both;" />
- </div>
- <div id="footer">
- <hr />
- <p>${h.link_to(app_globals.blog_title, url('home'))}</p>
- <span id="copyright">
- %if app_globals.copyright:
- Copyright © ${app_globals.copyright}
- %endif
- </span>
- <ul>
- <li>
- Powered by ${h.link_to('Pylons', 'http://pylonshq.com/')}
- + ${h.link_to('Minger', 'http://bitbucket.org/bwmcadams/mingerplus/')},
- styled with ${h.link_to('scribbish', 'http://quotedprintable.com/pages/scribbish')}
- </li>
- </ul>
-
- %if app_globals.disclaimer:
- <p id="disclaimer">${app_globals.disclaimer}</p>
- %endif
- </div>
- </div>
- ${self.javascript()}
- </body>
- </html>
- <%namespace name="search" file="/shared/search.mako"/>
- <%namespace name="sidebar" file="/shared/sidebar.mako"/>
- <%def name="title()">${app_globals.blog_title}</%def>
- <%def name="header()">
- ${app_globals.header}
- </%def>
- <%def name="styles()">
- <%
- #Only read from file in dev
- if not app_globals.use_minified_assets:
- f = open(config['pylons.paths']['root'] + '/public/stylesheets/CSSLIST','r')
- stylesheets = f.read()
- f.close()
- stylesheet_files = ['/stylesheets/%s.css' % f for f in stylesheets.split()]
- %>
- % if app_globals.use_minified_assets:
- ${h.stylesheet_link('/stylesheets/%s' % config['minger.minified_css'])}
- % else:
- ${ h.stylesheet_link(*stylesheet_files) }
- %endif
- </%def>
- <%def name="javascript()"></%def>