summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-11-25 23:37:01 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-11-25 23:37:01 +0100
commit6d427f67e40f46b82e29c3e866c0f8bbdfa6a578 (patch)
treebb740b3597b52c88bb5092f57bfbbbc758fbba13 /templates
parent7e758acb08f19782c120498caabc3da3be0fa2a4 (diff)
downloadweb-6d427f67e40f46b82e29c3e866c0f8bbdfa6a578.tar.gz
web-6d427f67e40f46b82e29c3e866c0f8bbdfa6a578.tar.bz2
web-6d427f67e40f46b82e29c3e866c0f8bbdfa6a578.zip
Reworked menu system
Diffstat (limited to 'templates')
-rw-r--r--templates/menu.lst3
-rw-r--r--templates/menu.mako7
-rw-r--r--templates/root.mako15
3 files changed, 15 insertions, 10 deletions
diff --git a/templates/menu.lst b/templates/menu.lst
deleted file mode 100644
index 4560d9b..0000000
--- a/templates/menu.lst
+++ /dev/null
@@ -1,3 +0,0 @@
-index
-download
-development
diff --git a/templates/menu.mako b/templates/menu.mako
new file mode 100644
index 0000000..4d6fff4
--- /dev/null
+++ b/templates/menu.mako
@@ -0,0 +1,7 @@
+<%!
+ menu = [
+ ("/index", "Portato"),
+ ("/download", "Download"),
+ ("/development", "Development")
+ ]
+%>
diff --git a/templates/root.mako b/templates/root.mako
index 669cd21..e625d88 100644
--- a/templates/root.mako
+++ b/templates/root.mako
@@ -2,7 +2,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
- <link rel="shortcut icon" href=${"/favicon.ico" | w.url} type="image/icon">
+ <link rel="shortcut icon" href=${"/favicon.ico" | url} type="image/icon">
<title>${self.title()}</title>
${self.style()}
</head>
@@ -10,8 +10,8 @@
<body>
<div id="wrapper">
<div id="logo">
- <img src=${"/static/images/portato.png" | w.url} />
- <h1><a href="./">Portato</a></h1>
+ <img src=${"/static/images/portato.png" | url} />
+ <h1><a href=${"/" | url}>Portato</a></h1>
<h2>»   A Portage GUI</h2>
</div>
@@ -43,19 +43,20 @@
</%def>
<%def name="style()">
- <link href=${"/static/css/style.css" | w.url} rel="stylesheet" type="text/css" />
+ <link href=${"/static/css/style.css" | url} rel="stylesheet" type="text/css" />
</%def>
<%def name="footer()">
- powered by <a href="http://www.webpy.org">web.py</a> & <a href="http://www.makotemplates.org">mako</a> |
+ powered by <a href="http://www.webpy.org">web.py</a> &amp; <a href="http://www.makotemplates.org">mako</a> |
© 2009. 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 page, uri in menulist:
- <li class="current_page_item"><a href="${page}">${local.get_namespace(uri).menu_name()}</a></li>
+ % for uri, page in m.attr.menu:
+ <li class="current_page_item"><a href=${uri | url}>${page}</a></li>
% endfor
</ul>
</%def>