From 88f32e9195f232d2ceeb1026e9a691185dc1e5f3 Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Fri, 30 Oct 2020 15:01:41 +0100 Subject: [PATCH] breadcrumbs intermediate --- web/app/templates/_roadmap.html.j2 | 28 +++++++++++++++++ .../templates/corpora/_breadcrumbs.html.j2 | 27 ++++++++++++++++ .../templates/corpora/add_corpus_file.html.j2 | 4 +++ web/app/templates/corpora/corpus_file.html.j2 | 6 +++- web/app/templates/jobs/_breadcrumbs.html.j2 | 9 ++++++ web/app/templates/jobs/job.html.j2 | 4 +++ web/app/templates/main/_breadcrumbs.html.j2 | 15 +++++++++ web/app/templates/main/about_and_faq.html.j2 | 4 +++ web/app/templates/main/dashboard.html.j2 | 4 +++ web/app/templates/main/index.html.j2 | 4 +++ web/app/templates/main/news.html.j2 | 4 +++ web/app/templates/main/privacy_policy.html.j2 | 4 +++ web/app/templates/main/terms_of_use.html.j2 | 4 +++ web/app/templates/nopaque.html.j2 | 31 +------------------ .../templates/settings/_breadcrumbs.html.j2 | 13 ++++++++ .../settings/change_password.html.j2 | 4 +++ .../settings/edit_general_settings.html.j2 | 4 +++ .../edit_notification_settings.html.j2 | 4 +++ 18 files changed, 142 insertions(+), 31 deletions(-) create mode 100644 web/app/templates/_roadmap.html.j2 create mode 100644 web/app/templates/corpora/_breadcrumbs.html.j2 create mode 100644 web/app/templates/jobs/_breadcrumbs.html.j2 create mode 100644 web/app/templates/main/_breadcrumbs.html.j2 create mode 100644 web/app/templates/settings/_breadcrumbs.html.j2 diff --git a/web/app/templates/_roadmap.html.j2 b/web/app/templates/_roadmap.html.j2 new file mode 100644 index 00000000..da756093 --- /dev/null +++ b/web/app/templates/_roadmap.html.j2 @@ -0,0 +1,28 @@ +{% if current_user.is_authenticated %} + +{% endif %} diff --git a/web/app/templates/corpora/_breadcrumbs.html.j2 b/web/app/templates/corpora/_breadcrumbs.html.j2 new file mode 100644 index 00000000..053f4061 --- /dev/null +++ b/web/app/templates/corpora/_breadcrumbs.html.j2 @@ -0,0 +1,27 @@ + diff --git a/web/app/templates/corpora/add_corpus_file.html.j2 b/web/app/templates/corpora/add_corpus_file.html.j2 index 70f72834..4ca54776 100644 --- a/web/app/templates/corpora/add_corpus_file.html.j2 +++ b/web/app/templates/corpora/add_corpus_file.html.j2 @@ -5,6 +5,10 @@ {% set scheme_primary_color = colors.corpus_analysis_darken %} {% set scheme_secondary_color = colors.corpus_analysis %} +{% block nav_content %} +{% include 'corpora/_breadcrumbs.html.j2' %} +{% endblock nav_content %} + {% block main_attribs %} class="corpus-analysis-color lighten"{% endblock main_attribs %} {% block page_content %} diff --git a/web/app/templates/corpora/corpus_file.html.j2 b/web/app/templates/corpora/corpus_file.html.j2 index 4f02a085..7548604b 100644 --- a/web/app/templates/corpora/corpus_file.html.j2 +++ b/web/app/templates/corpora/corpus_file.html.j2 @@ -5,13 +5,17 @@ {% set scheme_primary_color = colors.corpus_analysis_darken %} {% set scheme_secondary_color = colors.corpus_analysis %} +{% block nav_content %} +{% include 'corpora/_breadcrumbs.html.j2' %} +{% endblock nav_content %} + {% block main_attribs %} class="corpus-analysis-color lighten"{% endblock main_attribs %} {% block page_content %}
-

{{ corpus_file.author }}: {{ corpus_file.title }}

+

{{ corpus_file.author }}: {{ corpus_file.title }} ({{ corpus_file.publishing_year }})

diff --git a/web/app/templates/jobs/_breadcrumbs.html.j2 b/web/app/templates/jobs/_breadcrumbs.html.j2 new file mode 100644 index 00000000..dabad5b5 --- /dev/null +++ b/web/app/templates/jobs/_breadcrumbs.html.j2 @@ -0,0 +1,9 @@ + diff --git a/web/app/templates/jobs/job.html.j2 b/web/app/templates/jobs/job.html.j2 index 7cbc49ba..d23accfb 100644 --- a/web/app/templates/jobs/job.html.j2 +++ b/web/app/templates/jobs/job.html.j2 @@ -15,6 +15,10 @@ {% set scheme_color = colors.ocr_darken %} {% endif %} +{% block nav_content %} +{% include 'jobs/_breadcrumbs.html.j2' %} +{% endblock nav_content %} + {% block main_attribs %} class="{{ main_class }}"{% endblock main_attribs %} {% block page_content %} diff --git a/web/app/templates/main/_breadcrumbs.html.j2 b/web/app/templates/main/_breadcrumbs.html.j2 new file mode 100644 index 00000000..f3c4f98c --- /dev/null +++ b/web/app/templates/main/_breadcrumbs.html.j2 @@ -0,0 +1,15 @@ +
    +
  • nopaque
  • + {% if not (request.path == url_for('.index')) %} +
  • navigate_next
  • + {% endif %} + {% if request.path == url_for('.about_and_faq') %} +
  • About and faq
  • + {% elif request.path == url_for('.dashboard') %} +
  • Dashboard
  • + {% elif request.path == url_for('.news') %} +
  • News
  • + {% elif request.path == url_for('.terms_of_use') %} +
  • Terms of use
  • + {% endif %} +
diff --git a/web/app/templates/main/about_and_faq.html.j2 b/web/app/templates/main/about_and_faq.html.j2 index 24e87d67..cdae8dca 100644 --- a/web/app/templates/main/about_and_faq.html.j2 +++ b/web/app/templates/main/about_and_faq.html.j2 @@ -1,5 +1,9 @@ {% extends "nopaque.html.j2" %} +{% block nav_content %} +{% include 'main/_breadcrumbs.html.j2' %} +{% endblock nav_content %} + {% block page_content %}
diff --git a/web/app/templates/main/dashboard.html.j2 b/web/app/templates/main/dashboard.html.j2 index b014ecba..3d3018a8 100644 --- a/web/app/templates/main/dashboard.html.j2 +++ b/web/app/templates/main/dashboard.html.j2 @@ -1,5 +1,9 @@ {% extends "nopaque.html.j2" %} +{% block nav_content %} +{% include 'main/_breadcrumbs.html.j2' %} +{% endblock nav_content %} + {% block page_content %}
diff --git a/web/app/templates/main/index.html.j2 b/web/app/templates/main/index.html.j2 index dbc32c3e..8268de6a 100644 --- a/web/app/templates/main/index.html.j2 +++ b/web/app/templates/main/index.html.j2 @@ -1,6 +1,10 @@ {% extends "nopaque.html.j2" %} {% import 'materialize/wtf.html.j2' as wtf %} +{% block nav_content %} +{% include 'main/_breadcrumbs.html.j2' %} +{% endblock nav_content %} + {% block page_content %}
diff --git a/web/app/templates/main/news.html.j2 b/web/app/templates/main/news.html.j2 index c7947530..7b90f497 100644 --- a/web/app/templates/main/news.html.j2 +++ b/web/app/templates/main/news.html.j2 @@ -1,5 +1,9 @@ {% extends "nopaque.html.j2" %} +{% block nav_content %} +{% include 'main/_breadcrumbs.html.j2' %} +{% endblock nav_content %} + {% block page_content %}
diff --git a/web/app/templates/main/privacy_policy.html.j2 b/web/app/templates/main/privacy_policy.html.j2 index 71c469bf..dc8052ca 100644 --- a/web/app/templates/main/privacy_policy.html.j2 +++ b/web/app/templates/main/privacy_policy.html.j2 @@ -1,5 +1,9 @@ {% extends "nopaque.html.j2" %} +{% block nav_content %} +{% include 'main/_breadcrumbs.html.j2' %} +{% endblock nav_content %} + {% block page_content %}
diff --git a/web/app/templates/main/terms_of_use.html.j2 b/web/app/templates/main/terms_of_use.html.j2 index dbe39dc9..dba392a0 100644 --- a/web/app/templates/main/terms_of_use.html.j2 +++ b/web/app/templates/main/terms_of_use.html.j2 @@ -1,5 +1,9 @@ {% extends "nopaque.html.j2" %} +{% block nav_content %} +{% include 'main/_breadcrumbs.html.j2' %} +{% endblock nav_content %} + {% block page_content %}
diff --git a/web/app/templates/nopaque.html.j2 b/web/app/templates/nopaque.html.j2 index 94902c93..6a66440e 100644 --- a/web/app/templates/nopaque.html.j2 +++ b/web/app/templates/nopaque.html.j2 @@ -99,36 +99,7 @@
diff --git a/web/app/templates/settings/_breadcrumbs.html.j2 b/web/app/templates/settings/_breadcrumbs.html.j2 new file mode 100644 index 00000000..a0d061b8 --- /dev/null +++ b/web/app/templates/settings/_breadcrumbs.html.j2 @@ -0,0 +1,13 @@ +
    +
  • nopaque
  • +
  • navigate_next
  • +
  • Settings
  • +
  • navigate_next
  • + {% if request.path == url_for('settings.change_password') %} +
  • Change password
  • + {% elif request.path == url_for('settings.edit_general_settings') %} +
  • Edit general settings
  • + {% elif request.path == url_for('settings.edit_notification_settings') %} +
  • Edit notification settings
  • + {% endif %} +
diff --git a/web/app/templates/settings/change_password.html.j2 b/web/app/templates/settings/change_password.html.j2 index 771886bf..6cee5907 100644 --- a/web/app/templates/settings/change_password.html.j2 +++ b/web/app/templates/settings/change_password.html.j2 @@ -1,6 +1,10 @@ {% extends 'nopaque.html.j2' %} {% import 'materialize/wtf.html.j2' as wtf %} +{% block nav_content %} +{% include 'settings/_breadcrumbs.html.j2' %} +{% endblock nav_content %} + {% block page_content %}
diff --git a/web/app/templates/settings/edit_general_settings.html.j2 b/web/app/templates/settings/edit_general_settings.html.j2 index 18eff4d7..5e3b6428 100644 --- a/web/app/templates/settings/edit_general_settings.html.j2 +++ b/web/app/templates/settings/edit_general_settings.html.j2 @@ -1,6 +1,10 @@ {% extends 'nopaque.html.j2' %} {% import 'materialize/wtf.html.j2' as wtf %} +{% block nav_content %} +{% include 'settings/_breadcrumbs.html.j2' %} +{% endblock nav_content %} + {% block page_content %}
diff --git a/web/app/templates/settings/edit_notification_settings.html.j2 b/web/app/templates/settings/edit_notification_settings.html.j2 index 2a8e7b24..2736c1a3 100644 --- a/web/app/templates/settings/edit_notification_settings.html.j2 +++ b/web/app/templates/settings/edit_notification_settings.html.j2 @@ -1,6 +1,10 @@ {% extends 'nopaque.html.j2' %} {% import 'materialize/wtf.html.j2' as wtf %} +{% block nav_content %} +{% include 'settings/_breadcrumbs.html.j2' %} +{% endblock nav_content %} + {% block page_content %}