summaryrefslogtreecommitdiff
path: root/templates/root.mako
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2012-01-10 22:54:23 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2012-01-10 22:54:23 +0100
commita623647d714495439523c124e7efe517d6c15314 (patch)
treec2ed83240e12883944ba6c7f97736d9ef8db6c19 /templates/root.mako
parent8de68a6a0d027a86205cab0c078230e9391496d5 (diff)
downloadkosten-a623647d714495439523c124e7efe517d6c15314.tar.gz
kosten-a623647d714495439523c124e7efe517d6c15314.tar.bz2
kosten-a623647d714495439523c124e7efe517d6c15314.zip
Switch to mako blocks
Diffstat (limited to '')
-rw-r--r--templates/root.mako60
1 files changed, 23 insertions, 37 deletions
diff --git a/templates/root.mako b/templates/root.mako
index b05e7fd..19ac4ac 100644
--- a/templates/root.mako
+++ b/templates/root.mako
@@ -2,10 +2,15 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
- ${self.js()}
+ <%block name="js">
+ <script type="text/javascript" src=${"/static/js/jquery-1.4.2.js" | url}></script>
+ <script type="text/javascript" src=${"/static/js/lib.js" | url}></script>
+ </%block>
<link rel="shortcut icon" href=${"/static/images/currency.png" | url} type="image/icon">
- <title>${self.title()}</title>
- ${self.style()}
+ <title><%block name="title">Kostenverwaltung</%block></title>
+ <%block name="style">
+ <link href=${"/static/css/style.css" | url} rel="stylesheet" type="text/css" />
+ </%block>
</head>
<body>
@@ -18,7 +23,14 @@
<div id="header">
<div id="menu">
- ${self.menu()}
+ <%block name="menu">
+ <%namespace file="menu.mako" name="m" />
+ <ul>
+ % for uri, page in m.attr.menu:
+ <li><a href=${uri | url}>${page}</a></li>
+ % endfor
+ </ul>
+ </%block>
</div>
</div>
</div>
@@ -30,39 +42,13 @@
<div style="clear: both;"></div>
</div>
<div id="footer">
- <p id="legal">
- ${self.footer()}
- </p>
+ <%block name="footer">
+ <p id="legal">
+ powered by <a href="http://www.makotemplates.org">mako</a> &amp; <a href="http://www.webpy.org">web.py</a> |
+ © 2010-2011. All Rights Reserved. René Neumann |
+ with the help of <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.
+ </p>
+ </%block>
</div>
</body>
</html>
-
-## functions
-
-<%def name="title()">
- Kostenverwaltung
-</%def>
-
-<%def name="style()">
- <link href=${"/static/css/style.css" | url} rel="stylesheet" type="text/css" />
-</%def>
-
-<%def name="js()">
- <script type="text/javascript" src=${"/static/js/jquery-1.4.2.js" | url}></script>
- <script type="text/javascript" src=${"/static/js/lib.js" | url}></script>
-</%def>
-
-<%def name="footer()">
- powered by <a href="http://www.makotemplates.org">mako</a> &amp; <a href="http://www.webpy.org">web.py</a> |
- © 2010-2011. All Rights Reserved. René Neumann |
- with the help of <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.
-</%def>
-
-<%def name="menu()">
- <%namespace file="menu.mako" name="m" />
- <ul>
- % for uri, page in m.attr.menu:
- <li><a href=${uri | url}>${page}</a></li>
- % endfor
- </ul>
-</%def>