diff --git a/amanuensis/resources/page.css b/amanuensis/resources/page.css index b65cf06..8cfeced 100644 --- a/amanuensis/resources/page.css +++ b/amanuensis/resources/page.css @@ -16,9 +16,15 @@ div#header { background-color: #ffffff; box-shadow: 2px 2px 10px #888888; border-radius: 5px; + overflow: auto; } div#header p, div#header h2 { margin: 5px; + float: left; +} +div#login-status { + float: right; + text-align: right; } div#sidebar { width: 200px; diff --git a/amanuensis/server/auth.py b/amanuensis/server/auth.py index f719642..780abf4 100644 --- a/amanuensis/server/auth.py +++ b/amanuensis/server/auth.py @@ -40,6 +40,6 @@ def get_bp(login_manager): @login_required def logout(): logout_user() - return redirect(url_for('auth.login')) + return redirect(url_for('home.home')) return bp diff --git a/amanuensis/server/home.py b/amanuensis/server/home.py index 326dba1..c2b76e0 100644 --- a/amanuensis/server/home.py +++ b/amanuensis/server/home.py @@ -30,7 +30,6 @@ def get_bp(): bp = Blueprint('home', __name__, url_prefix='/home') @bp.route('/', methods=['GET']) - @login_required def home(): return render_template('home/home.html') diff --git a/amanuensis/templates/auth/login.html b/amanuensis/templates/auth/login.html index 621177c..f238af8 100644 --- a/amanuensis/templates/auth/login.html +++ b/amanuensis/templates/auth/login.html @@ -1,6 +1,7 @@ {% extends "page_1col.html" %} {% block title %}Login | Amanuensis{% endblock %} {% block header %}

Amanuensis - Login

{% endblock %} +{% block login_status_attr %}style="display:none"{% endblock %} {% block main %}
{{ form.hidden_tag() }} diff --git a/amanuensis/templates/home/home.html b/amanuensis/templates/home/home.html index 4ab4083..3318b10 100644 --- a/amanuensis/templates/home/home.html +++ b/amanuensis/templates/home/home.html @@ -1,22 +1,16 @@ -{% extends "page_2col.html" %} +{% extends "page_1col.html" %} {% block title %}Home | Amanuensis{% endblock %} -{% block header %}

Amanuensis - Dashboard

{% endblock %} - -{% block sb_topline %}{{ current_user.displayname }}{% endblock %} -{% block sb_logout %}Log out{% endblock %} -{% set template_sidebar_rows = [self.sb_topline(), self.sb_logout()] %} - -{% if current_user.is_admin %} - {% block sb_admin %}Admin{% endblock %} - {% set template_sidebar_rows = template_sidebar_rows + [self.sb_admin()] %} -{% endif %} +{% block header %}

Amanuensis - Home

{% endblock %} {% block main %} +

Welcome to Amanuensis!

+

+ Amanuensis is a hub for playing Lexicon, the encyclopedia RPG. Log in to access your Lexicon games. If you do not have an account, contact the administrator. +

-

Open games

- +{% if current_user.is_authenticated %} {% set lexicons = current_user.lexicons_in() %} -

Your games

+

Your games

{% if lexicons %} {% for lexicon in lexicons %} @@ -34,5 +28,13 @@ {% else %}

You haven't joined a game yet.

{% endif %} +{% endif %} {% endblock %} -{% set template_content_blocks = [self.main()] %} \ No newline at end of file +{% set template_content_blocks = [self.main()] %} + +{% if current_user.is_admin %} +{% block admin_dash %} +Admin dashboard +{% endblock %} +{% set template_content_blocks = [self.admin_dash()] + template_content_blocks %} +{% endif %} \ No newline at end of file diff --git a/amanuensis/templates/page.html b/amanuensis/templates/page.html index 3d32543..e577a9a 100644 --- a/amanuensis/templates/page.html +++ b/amanuensis/templates/page.html @@ -8,7 +8,17 @@
- + {% block sidebar %}{% endblock %}
{% if not template_content_blocks %}{% set template_content_blocks = [] %}{% endif %}