diff --git a/amanuensis/server/lexicon.py b/amanuensis/server/lexicon.py index 9b6d75d..cbbd358 100644 --- a/amanuensis/server/lexicon.py +++ b/amanuensis/server/lexicon.py @@ -14,9 +14,25 @@ def get_bp(): """Create a blueprint for lexicon pages""" bp = Blueprint('lexicon', __name__, url_prefix='/lexicon/') + @bp.route('/contents/', methods=['GET']) + @login_required + def contents(name): + return "Lexicon " + str(name) + + @bp.route('/rules/', methods=['GET']) + @login_required + def rules(name): + return "Lexicon " + str(name) + @bp.route('/session/', methods=['GET']) @login_required def session(name): + lex = lexicon.LexiconModel.by(name=name) + return render_template('lexicon/session.html', lexicon=lex) + + @bp.route('/statistics/', methods=['GET']) + @login_required + def stats(name): return "Lexicon " + str(name) return bp diff --git a/amanuensis/templates/lexicon/lexicon.html b/amanuensis/templates/lexicon/lexicon.html new file mode 100644 index 0000000..36103ec --- /dev/null +++ b/amanuensis/templates/lexicon/lexicon.html @@ -0,0 +1,17 @@ +{% extends "page_2col.html" %} +{% block header %}

{{ lexicon.title }}

{% endblock %} + +{% block sb_logo %}{% endblock %} +{% block sb_home %}Home{% endblock %} +{% block sb_contents %}Contents{% endblock %} +{% block sb_rules %}Rules{% endblock %} +{% block sb_session %}Session{% endblock %} +{% block sb_stats %}Stats{% endblock %} + +{% set template_sidebar_rows = [ + self.sb_logo(), + self.sb_home(), + self.sb_contents(), + self.sb_rules(), + self.sb_session(), + self.sb_stats()] %} diff --git a/amanuensis/templates/lexicon/session.html b/amanuensis/templates/lexicon/session.html new file mode 100644 index 0000000..93d4d4e --- /dev/null +++ b/amanuensis/templates/lexicon/session.html @@ -0,0 +1,11 @@ +{% extends "lexicon/lexicon.html" %} +{% block title %}Session | {{ lexicon.name }}{% endblock %} + +{% block main %} + +

Session

+ +{% set lexicons = current_user.lexicons_in() %} + +{% endblock %} +{% set template_content_blocks = [self.main()] %} \ No newline at end of file