]> git.datanom.net - flask-test.git/blobdiff - app/templates/base.html
First half
[flask-test.git] / app / templates / base.html
diff --git a/app/templates/base.html b/app/templates/base.html
new file mode 100644 (file)
index 0000000..5a4dcdc
--- /dev/null
@@ -0,0 +1,29 @@
+<html>
+  <head>
+    {% if title %}
+    <title>{{ title }} - Web Photo Portfolio</title>
+    {% else %}
+    <title>Welcome to Web Photo Portfolio</title>
+    {% endif %}
+  </head>
+  <body>
+    <div>WPP: <a href="/index">Home</a>
+    {% if g.user.is_authenticated %}
+    | <a href="{{ url_for('user', nickname=g.user.nickname) }}">Your Profile</a>
+    | <a href="{{ url_for('logout') }}">Logout</a>
+    {% endif %}
+    </div>
+    <hr />
+    {% with messages = get_flashed_messages() %}
+      {% if messages %}
+        <ul>
+        {% for message in messages %}
+            <li>{{ message }} </li>
+        {% endfor %}
+        </ul>
+      {% endif %}
+    {% endwith %}
+    {% block content %}{% endblock %}
+  </body>
+</html>
+
This page took 0.033111 seconds and 5 git commands to generate.