From 8732d998cffb645174b34cb271cbf36412415020 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Fri, 24 Apr 2020 13:50:03 -0700 Subject: [PATCH] Rename templates outside of lexicon/ --- amanuensis/server/auth/auth.login.jinja | 2 +- amanuensis/server/home.py | 6 +++--- amanuensis/templates/home/{admin.html => admin.jinja} | 4 ++-- amanuensis/templates/home/{create.html => create.jinja} | 4 ++-- amanuensis/templates/home/{home.html => home.jinja} | 4 ++-- amanuensis/templates/lexicon/lexicon.html | 2 +- amanuensis/templates/{macros.html => macros.jinja} | 0 amanuensis/templates/{page.html => page.jinja} | 0 amanuensis/templates/{page_1col.html => page_1col.jinja} | 2 +- amanuensis/templates/{page_2col.html => page_2col.jinja} | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) rename amanuensis/templates/home/{admin.html => admin.jinja} (88%) rename amanuensis/templates/home/{create.html => create.jinja} (93%) rename amanuensis/templates/home/{home.html => home.jinja} (93%) rename amanuensis/templates/{macros.html => macros.jinja} (100%) rename amanuensis/templates/{page.html => page.jinja} (100%) rename amanuensis/templates/{page_1col.html => page_1col.jinja} (75%) rename amanuensis/templates/{page_2col.html => page_2col.jinja} (93%) diff --git a/amanuensis/server/auth/auth.login.jinja b/amanuensis/server/auth/auth.login.jinja index f238af8..f6b6ae2 100644 --- a/amanuensis/server/auth/auth.login.jinja +++ b/amanuensis/server/auth/auth.login.jinja @@ -1,4 +1,4 @@ -{% extends "page_1col.html" %} +{% extends "page_1col.jinja" %} {% block title %}Login | Amanuensis{% endblock %} {% block header %}

Amanuensis - Login

{% endblock %} {% block login_status_attr %}style="display:none"{% endblock %} diff --git a/amanuensis/server/home.py b/amanuensis/server/home.py index a9aa5a0..6d3a0cf 100644 --- a/amanuensis/server/home.py +++ b/amanuensis/server/home.py @@ -24,7 +24,7 @@ def home(): elif lexicon.cfg.join.public: public_lexicons.append(lexicon) return render_template( - 'home/home.html', + 'home/home.jinja', user_lexicons=user_lexicons, public_lexicons=public_lexicons) @@ -36,7 +36,7 @@ def admin(): root: RootConfigDirectoryContext = current_app.config['root'] users = list(load_all_users(root)) lexicons = list(load_all_lexicons(root)) - return render_template('home/admin.html', users=users, lexicons=lexicons) + return render_template('home/admin.jinja', users=users, lexicons=lexicons) @bp_home.route("/admin/create/", methods=['GET', 'POST']) @@ -55,4 +55,4 @@ def admin_create(): cfg.prompt = prompt return redirect(url_for('lexicon.session', name=lexicon_name)) - return render_template('home/create.html', form=form) + return render_template('home/create.jinja', form=form) diff --git a/amanuensis/templates/home/admin.html b/amanuensis/templates/home/admin.jinja similarity index 88% rename from amanuensis/templates/home/admin.html rename to amanuensis/templates/home/admin.jinja index dbf8eda..2b8ecff 100644 --- a/amanuensis/templates/home/admin.html +++ b/amanuensis/templates/home/admin.jinja @@ -1,5 +1,5 @@ -{% extends "page_2col.html" %} -{% import 'macros.html' as macros with context %} +{% extends "page_2col.jinja" %} +{% import 'macros.jinja' as macros with context %} {% block title %}Admin | Amanuensis{% endblock %} {% block header %}

Amanuensis - Admin Dashboard

{% endblock %} diff --git a/amanuensis/templates/home/create.html b/amanuensis/templates/home/create.jinja similarity index 93% rename from amanuensis/templates/home/create.html rename to amanuensis/templates/home/create.jinja index 19884ae..ec504d3 100644 --- a/amanuensis/templates/home/create.html +++ b/amanuensis/templates/home/create.jinja @@ -1,5 +1,5 @@ -{% extends "page_2col.html" %} -{% import 'macros.html' as macros %} +{% extends "page_2col.jinja" %} +{% import 'macros.jinja' as macros %} {% block title %}Admin | Amanuensis{% endblock %} {% block header %}

Amanuensis - Create a Lexicon

{% endblock %} diff --git a/amanuensis/templates/home/home.html b/amanuensis/templates/home/home.jinja similarity index 93% rename from amanuensis/templates/home/home.html rename to amanuensis/templates/home/home.jinja index d3657dc..2c68487 100644 --- a/amanuensis/templates/home/home.html +++ b/amanuensis/templates/home/home.jinja @@ -1,5 +1,5 @@ -{% extends "page_1col.html" %} -{% import 'macros.html' as macros with context %} +{% extends "page_1col.jinja" %} +{% import 'macros.jinja' as macros with context %} {% block title %}Home | Amanuensis{% endblock %} {% block header %}

Amanuensis - Home

{% endblock %} diff --git a/amanuensis/templates/lexicon/lexicon.html b/amanuensis/templates/lexicon/lexicon.html index b293ec8..3bcee3f 100644 --- a/amanuensis/templates/lexicon/lexicon.html +++ b/amanuensis/templates/lexicon/lexicon.html @@ -1,4 +1,4 @@ -{% extends "page_2col.html" %} +{% extends "page_2col.jinja" %} {% if g.lexicon.title %} {% set lexicon_title = g.lexicon.title %} {% else %} diff --git a/amanuensis/templates/macros.html b/amanuensis/templates/macros.jinja similarity index 100% rename from amanuensis/templates/macros.html rename to amanuensis/templates/macros.jinja diff --git a/amanuensis/templates/page.html b/amanuensis/templates/page.jinja similarity index 100% rename from amanuensis/templates/page.html rename to amanuensis/templates/page.jinja diff --git a/amanuensis/templates/page_1col.html b/amanuensis/templates/page_1col.jinja similarity index 75% rename from amanuensis/templates/page_1col.html rename to amanuensis/templates/page_1col.jinja index 0878463..5fb62eb 100644 --- a/amanuensis/templates/page_1col.html +++ b/amanuensis/templates/page_1col.jinja @@ -1,3 +1,3 @@ -{% extends "page.html" %} +{% extends "page.jinja" %} {% block sidebar %}{% endblock %} {% block content_class %}content-1col{% endblock %} \ No newline at end of file diff --git a/amanuensis/templates/page_2col.html b/amanuensis/templates/page_2col.jinja similarity index 93% rename from amanuensis/templates/page_2col.html rename to amanuensis/templates/page_2col.jinja index 9a93a9b..df107aa 100644 --- a/amanuensis/templates/page_2col.html +++ b/amanuensis/templates/page_2col.jinja @@ -1,4 +1,4 @@ -{% extends "page.html" %} +{% extends "page.jinja" %} {% block sidebar %}