/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. <body>
  14. <div id="container">
  15. %if app_globals.logo:
  16. <div id="logo">
  17. <img src="${app_globals.logo}"/>
  18. </div>
  19. %endif
  20. <div id="header">
  21. <h1><span>${h.link_to(app_globals.blog_title, url('home'))}</span></h1>
  22. <h2>${app_globals.blog_description}</h2>
  23. </div>
  24. <div id="page">
  25. <div id="content">
  26. ${next.body()}
  27. </div>
  28. <div id="sidebar">
  29. <!-- sidebar components -->
  30. ${sidebar.sidebar()}
  31. </div>
  32. <br style="clear:both;" />
  33. </div>
  34. <div id="footer">
  35. <hr />
  36. <p>${h.link_to(app_globals.blog_title, url('home'))}</p>
  37. <span id="copyright">
  38. %if app_globals.copyright:
  39. Copyright &copy; ${app_globals.copyright}
  40. %endif
  41. </span>
  42. <ul>
  43. <li>
  44. Powered by ${h.link_to('Pylons', 'http://pylonshq.com/')}
  45. + ${h.link_to('Minger', 'http://bitbucket.org/bwmcadams/mingerplus/')},
  46. styled with ${h.link_to('scribbish', 'http://quotedprintable.com/pages/scribbish')}
  47. </li>
  48. </ul>
  49. %if app_globals.disclaimer:
  50. <p id="disclaimer">${app_globals.disclaimer}</p>
  51. %endif
  52. </div>
  53. </div>
  54. ${self.javascript()}
  55. </body>
  56. </html>
  57. <%namespace name="search" file="/shared/search.mako"/>
  58. <%namespace name="sidebar" file="/shared/sidebar.mako"/>
  59. <%def name="title()">${app_globals.blog_title}</%def>
  60. <%def name="header()">
  61. ${app_globals.header}
  62. </%def>
  63. <%def name="styles()">
  64. <%
  65. #Only read from file in dev
  66. if not app_globals.use_minified_assets:
  67. f = open(config['pylons.paths']['root'] + '/public/stylesheets/CSSLIST','r')
  68. stylesheets = f.read()
  69. f.close()
  70. stylesheet_files = ['/stylesheets/%s.css' % f for f in stylesheets.split()]
  71. %>
  72. % if app_globals.use_minified_assets:
  73. ${h.stylesheet_link('/stylesheets/%s' % config['minger.minified_css'])}
  74. % else:
  75. ${ h.stylesheet_link(*stylesheet_files) }
  76. %endif
  77. </%def>
  78. <%def name="javascript()"></%def>