summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--templates/menu.jinja7
-rw-r--r--templates/menu.mako8
-rw-r--r--templates/root.jinja56
-rw-r--r--templates/root.mako56
4 files changed, 63 insertions, 64 deletions
diff --git a/templates/menu.jinja b/templates/menu.jinja
new file mode 100644
index 0000000..b96d542
--- /dev/null
+++ b/templates/menu.jinja
@@ -0,0 +1,7 @@
+{% set menu = [
+ ("index", "Kosten"),
+ ("addExp", "Neu"),] %}
+ {# ("/const", "Konstante Kosten"),
+ ("/categories", "Kategorien")
+ ]
+#}
diff --git a/templates/menu.mako b/templates/menu.mako
deleted file mode 100644
index 98e5904..0000000
--- a/templates/menu.mako
+++ /dev/null
@@ -1,8 +0,0 @@
-<%!
- menu = [
- ("/", "Kosten"),
- ("/add", "Neu"),
- ("/const", "Konstante Kosten"),
- ("/categories", "Kategorien")
- ]
-%>
diff --git a/templates/root.jinja b/templates/root.jinja
new file mode 100644
index 0000000..7debb6a
--- /dev/null
+++ b/templates/root.jinja
@@ -0,0 +1,56 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset=utf-8" >
+ {% if not g.is_mobile %}
+ {% block js %}
+ <script type="text/javascript" src="{{ "js/jquery-1.4.2.js" | static_url }}"></script>
+ <script type="text/javascript" src="{{ "js/lib.js" | static_url }}"></script>
+ {% endblock %}
+ {% endif %}
+ <link rel="shortcut icon" href="{{ "images/currency.png" | static_url }}" type="image/icon">
+ <title>{% block title -%}Kostenverwaltung{%- endblock %}</title>
+ {% block style %}
+ <link href="{{ "css/style.css" | static_url }}" rel="stylesheet" type="text/css">
+ {% endblock %}
+ </head>
+
+ <body>
+ <div id="wrapper">
+ <div id="logo">
+ <img src="{{ "images/currency.png" | static_url }}">
+ <h1><a href="{{ url_for("index") }}">Kosten</a></h1>
+ <h2>»   vom Nec</h2>
+ </div>
+
+ <div id="header">
+ <div id="menu">
+ {% block menu %}
+ {% import "menu.jinja" as m %}
+ <ul>
+ {% for uri, page in m.menu %}
+ <li><a href="{{ url_for(uri) }}">{{page}}</a></li>
+ {% endfor %}
+ </ul>
+ {% endblock %}
+ </div>
+ </div>
+ </div>
+
+ <div id="page">
+ <div class="content">
+ {% block content %}{% endblock %}
+ </div>
+ <div style="clear: both;"></div>
+ </div>
+ <div id="footer">
+ {% block footer %}
+ <p id="legal">
+ powered by <a href="http://flask.pocoo.org">Flask</a> |
+ © 2010-2013. All Rights Reserved. René Neumann |
+ with the help of <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.
+ </p>
+ {% endblock %}
+ </div>
+ </body>
+</html>
diff --git a/templates/root.mako b/templates/root.mako
deleted file mode 100644
index 19af96e..0000000
--- a/templates/root.mako
+++ /dev/null
@@ -1,56 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
- % if not w.ctx.is_mobile:
- <%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>
- % endif
- <link rel="shortcut icon" href=${"/static/images/currency.png" | url} type="image/icon">
- <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>
- <div id="wrapper">
- <div id="logo">
- <img src=${"/static/images/currency.png" | url} />
- <h1><a href=${"/" | url}>Kosten</a></h1>
- <h2>»   vom Nec</h2>
- </div>
-
- <div id="header">
- <div id="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>
-
- <div id="page">
- <div class="content">
- ${next.body()}
- </div>
- <div style="clear: both;"></div>
- </div>
- <div id="footer">
- <%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-2012. All Rights Reserved. René Neumann |
- with the help of <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.
- </p>
- </%block>
- </div>
- </body>
-</html>