summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-01-28 13:09:54 +0100
committerPetr Vobornik <pvoborni@redhat.com>2014-02-11 18:02:39 +0100
commitc292992e711cae987fe07e4d75e07ba9fcdf70ab (patch)
tree00c596fa1704bea39d13dac8cf4ec307d8637fb3
parent4100005ab7e12c2d1d4c5777181ecd90011a2779 (diff)
downloadipsilon-c292992e711cae987fe07e4d75e07ba9fcdf70ab.tar.gz
ipsilon-c292992e711cae987fe07e4d75e07ba9fcdf70ab.tar.xz
ipsilon-c292992e711cae987fe07e4d75e07ba9fcdf70ab.zip
Root pages
Signed-off-by: Petr Vobornik <pvoborni@redhat.com>
-rwxr-xr-xipsilon/root.py2
-rw-r--r--templates/index.html71
-rw-r--r--templates/logout.html36
3 files changed, 43 insertions, 66 deletions
diff --git a/ipsilon/root.py b/ipsilon/root.py
index 279cbd4..034a7b3 100755
--- a/ipsilon/root.py
+++ b/ipsilon/root.py
@@ -42,4 +42,4 @@ class Root(Page):
self.admin = Admin(self._site)
def root(self):
- return self._template('index.html', title='Root')
+ return self._template('index.html', title='Ipsilon')
diff --git a/templates/index.html b/templates/index.html
index 1e21948..7d368cb 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,41 +1,30 @@
-<!doctype html>
-<html lang="en">
-<head>
- <meta charset="UTF-8"></meta>
- <title>{{ title }}</title>
- <link href="{{ basepath }}/ui/ipsilon.css" type="text/css" rel="stylesheet"></link>
- <link href="{{ basepath }}/ui/favicon.ico" type="image/ico" rel="icon"></link>
-</head>
-<body>
- <div id="container">
- <div id="logo">
- <p><a href="{{ basepath }}">Ipsilon</a></p>
- </div>
- <div id="admin">
- {% if user.is_admin %}
- <a href="{{ basepath }}/admin">admin</a>
- {% endif %}
- </div>
- <div id="welcome">
- {% if user.name %}
- <p>Welcome {{ user.fullname }}</p>
- {% endif %}
- </div>
- <div id="content">
- {% if not user.name %}
- <p>Please <a href="{{ basepath }}/login">Log In</a>
- {% elif user.sites %}
- <p>Registered application shortcuts:</p>
- {% for site in user.sites %}
- <p><a href="{{ site.link }}">{{ site.name }}</a></p>
- {% endfor %}
- {% endif %}
- </div>
- <div id="logout">
- {% if user.name %}
- <p><a href="{{ basepath }}/logout">Log Out</a></p>
- {% endif %}
- </div>
- </div>
-</body>
-</html>
+{% extends "master.html" %}
+{% block main %}
+<div class="col-sm-12">
+ <div id="welcome">
+ {% if user.name %}
+ <p>Welcome {{ user.fullname }}!</p>
+ {% endif %}
+ </div>
+ <div id="content">
+ {% if not user.name %}
+ <p>Please <a href="{{ basepath }}/login">Log In</a>
+ {% elif user.sites %}
+ <p>Registered application shortcuts:</p>
+ {% for site in user.sites %}
+ <p><a href="{{ site.link }}">{{ site.name }}</a></p>
+ {% endfor %}
+ {% endif %}
+ </div>
+ <div id="authenticated">
+ {% if user.name %}
+ <p>
+ {% if user.is_admin %}
+ <a href="{{ basepath }}/admin" id="admin">Administration</a> |
+ {% endif %}
+ <a href="{{ basepath }}/logout" id="logout">Log Out</a>
+ </p>
+ {% endif %}
+ </div>
+</div>
+{% endblock %} \ No newline at end of file
diff --git a/templates/logout.html b/templates/logout.html
index f6f61ac..016c9ab 100644
--- a/templates/logout.html
+++ b/templates/logout.html
@@ -1,24 +1,12 @@
-<!doctype html>
-<html lang="en">
-<head>
- <meta charset="UTF-8"></meta>
- <title>{{ title }}</title>
- <link href="{{ basepath }}/ui/ipsilon.css" type="text/css" rel="stylesheet"></link>
- <link href="{{ basepath }}/ui/favicon.ico" type="image/ico" rel="icon"></link>
-</head>
-<body>
- <div id="container">
- <div id="logo">
- <p><a href="{{ basepath }}">Ipsilon</a></p>
- </div>
- <div id="logout">
- {% if user.name %}
- <p>Something prevented a successful logout</p>
- <p>You are still logged in as {{ user.fullname }}</p>
- {% else %}
- <p>Successfully logged out.</p>
- <p>Return to <a href="{{ basepath }}">Home</a> page</p>
- {% endif %}
- </div>
-</body>
-</html>
+{% extends "master.html" %}
+{% block main %}
+<div id="logout" class="col-sm-12">
+{% if user.name %}
+ <p>Something prevented a successful logout</p>
+ <p>You are still logged in as {{ user.fullname }}</p>
+{% else %}
+ <p>Successfully logged out.</p>
+ <p>Return to <a href="{{ basepath }}/">Home</a> page</p>
+{% endif %}
+</div>
+{% endblock %} \ No newline at end of file