diff --git a/flask_website/__init__.py b/flask_website/__init__.py
index 5246a6ee..4fdb5aef 100644
--- a/flask_website/__init__.py
+++ b/flask_website/__init__.py
@@ -24,6 +24,8 @@ def remove_db_session(response):
db_session.remove()
return response
+app.add_url_rule('/docs/', endpoint='documentation.index', build_only=True)
+
from flask_website.views.general import general
from flask_website.views.mailinglist import mailinglist
from flask_website.views.snippets import snippets
@@ -38,3 +40,4 @@ from flask_website import utils
app.jinja_env.filters['datetimeformat'] = utils.format_datetime
app.jinja_env.filters['timedeltaformat'] = utils.format_timedelta
+app.jinja_env.filters['displayopenid'] = utils.display_openid
diff --git a/flask_website/static/style.css b/flask_website/static/style.css
index 6a492d8d..365f1b51 100644
--- a/flask_website/static/style.css
+++ b/flask_website/static/style.css
@@ -44,9 +44,13 @@ td input { border: none; padding: 0; }
input, textarea, select { border: 1px solid black; padding: 2px; background: white;
font-family: 'Georgia', serif; font-size: 17px; color: #004B6B; }
textarea { width: 99%; }
-input[type="submit"] { background: #DEEBF3; border-color: #004B6B; }
+input[type="submit"] { background: #DEEBF3; border-color: #004B6B;
+ cursor: pointer; }
+input[name="delete"]:hover { background: #A50000; color: white;
+ border-color: #860000; }
input.openid { background: url(openid.png) no-repeat 4px center;
padding-left: 26px; }
+.formlist dt { color: #004B6B; margin: 8px 0; }
/* snippets */
.snippet-author { margin: 0 0 20px 0; font-size: 0.9em; }
diff --git a/flask_website/templates/general/change_openid.html b/flask_website/templates/general/change_openid.html
new file mode 100644
index 00000000..bcdf1723
--- /dev/null
+++ b/flask_website/templates/general/change_openid.html
@@ -0,0 +1,31 @@
+{% extends "layout.html" %}
+{% block head %}
+ {{ super() }}
+
+{% endblock %}
+{% block title %}Change OpenID{% endblock %}
+{% block body %}
+
Change OpenID
+
+{% endblock %}
diff --git a/flask_website/templates/general/first_login.html b/flask_website/templates/general/first_login.html
index 69452e58..da7086dd 100644
--- a/flask_website/templates/general/first_login.html
+++ b/flask_website/templates/general/first_login.html
@@ -11,7 +11,8 @@
{% endblock %}
diff --git a/flask_website/templates/general/profile.html b/flask_website/templates/general/profile.html
new file mode 100644
index 00000000..38374124
--- /dev/null
+++ b/flask_website/templates/general/profile.html
@@ -0,0 +1,27 @@
+{% extends "layout.html" %}
+{% block head %}
+ {{ super() }}
+
+{% endblock %}
+{% block title %}Profile{% endblock %}
+{% block body %}
+
+{% endblock %}
diff --git a/flask_website/templates/layout.html b/flask_website/templates/layout.html
index 668470b9..9342725b 100644
--- a/flask_website/templates/layout.html
+++ b/flask_website/templates/layout.html
@@ -2,7 +2,7 @@
{% block head %}
{% block title %}Welcome{% endblock %} | Flask (A Python Microframework)
-
+
{% endblock %}
@@ -11,11 +11,11 @@
{{ self.title() }}
{% endblock %}
- overview //
- documentation //
- mailinglist //
- snippets //
- extensions
+ overview //
+ documentation //
+ mailinglist //
+ snippets //
+ extensions
{% for message in get_flashed_messages() %}
{{ message }}
{% endfor %}
@@ -23,8 +23,11 @@
Edit Comment
+
+
+{% endblock %}
diff --git a/flask_website/templates/snippets/index.html b/flask_website/templates/snippets/index.html
index a0658678..3237a84e 100644
--- a/flask_website/templates/snippets/index.html
+++ b/flask_website/templates/snippets/index.html
@@ -8,7 +8,9 @@
You're signed in as “{{ g.user.name
}} ”. You can sign out here after you're done if you want.
+ }}">sign out here after you're done if you want. If you want to
+ change your OpenID login or display name, head over to the
+ profile .
{% else %}
In order to add snippets to this page or to add comments, all you need
@@ -24,10 +26,6 @@
{{ category.name }} ({{ category.count }})
{% endfor %}
- {% if g.user.is_admin %}
-
- manage categories
- {% endif %}
{% if recent %}
Recently Added
@@ -37,4 +35,10 @@
{% endfor %}
{% endif %}
+ {% if g.user.is_admin %}
+ Admin Tools
+
+ {% endif %}
{% endblock %}
diff --git a/flask_website/templates/snippets/new.html b/flask_website/templates/snippets/new.html
index 4f929d36..d8d82f43 100644
--- a/flask_website/templates/snippets/new.html
+++ b/flask_website/templates/snippets/new.html
@@ -17,7 +17,7 @@
with #!python, #!html+jinja or any other
Pygments lexer name .
-
+
Title:
Category:
diff --git a/flask_website/templates/snippets/show.html b/flask_website/templates/snippets/show.html
index e75f2021..11357edb 100644
--- a/flask_website/templates/snippets/show.html
+++ b/flask_website/templates/snippets/show.html
@@ -9,7 +9,7 @@
By {{ snippet.author.name }}
filed in {{ snippet.category.name }}
{% if snippet.author == g.user or g.user.is_admin %}
- (edit )
+ (edit )
{% endif %}
{{ snippet.rendered_body }}
{% if snippet.comments or g.user %}
@@ -23,14 +23,17 @@
{{ comment.title or "Comment" }}
by {{ comment.author.name }}
on {{ comment.pub_date.strftime('%Y-%m-%d @ %H:%M') }}
+ {% if g.user.is_admin %}
+ (edit )
+ {% endif %}
{{ comment.rendered_text }}
{% endfor %}
- {% endif %}
+ {% endif %}
{% if g.user %}