diff --git a/app/main/routes.py b/app/main/routes.py index faf579b0988d072f1f864484489244b73f0483e9..255edb2daa7fd47d3a97b0ddd7429788bee8d31b 100644 --- a/app/main/routes.py +++ b/app/main/routes.py @@ -45,12 +45,6 @@ def dashboard(): ) -# @bp.route('/user_manual') -# @register_breadcrumb(bp, '.user_manual', '<i class="material-icons left">help</i>User manual') -# def user_manual(): -# return render_template('main/user_manual.html.j2', title='User manual') - - @bp.route('/news') @register_breadcrumb(bp, '.news', '<i class="material-icons left">email</i>News') def news(): diff --git a/app/templates/main/_manual_modal/_01_introduction.html.j2 b/app/templates/_base/_modals/_manual/_01_introduction.html.j2 similarity index 100% rename from app/templates/main/_manual_modal/_01_introduction.html.j2 rename to app/templates/_base/_modals/_manual/_01_introduction.html.j2 diff --git a/app/templates/main/_manual_modal/_02_registration_and_log_in.html.j2 b/app/templates/_base/_modals/_manual/_02_registration_and_log_in.html.j2 similarity index 100% rename from app/templates/main/_manual_modal/_02_registration_and_log_in.html.j2 rename to app/templates/_base/_modals/_manual/_02_registration_and_log_in.html.j2 diff --git a/app/templates/main/_manual_modal/_03_dashboard.html.j2 b/app/templates/_base/_modals/_manual/_03_dashboard.html.j2 similarity index 100% rename from app/templates/main/_manual_modal/_03_dashboard.html.j2 rename to app/templates/_base/_modals/_manual/_03_dashboard.html.j2 diff --git a/app/templates/main/_manual_modal/_06_services.html.j2 b/app/templates/_base/_modals/_manual/_06_services.html.j2 similarity index 100% rename from app/templates/main/_manual_modal/_06_services.html.j2 rename to app/templates/_base/_modals/_manual/_06_services.html.j2 diff --git a/app/templates/main/_manual_modal/_07_a_closer_look_at_the_corpus_analysis.html.j2 b/app/templates/_base/_modals/_manual/_07_a_closer_look_at_the_corpus_analysis.html.j2 similarity index 100% rename from app/templates/main/_manual_modal/_07_a_closer_look_at_the_corpus_analysis.html.j2 rename to app/templates/_base/_modals/_manual/_07_a_closer_look_at_the_corpus_analysis.html.j2 diff --git a/app/templates/main/_manual_modal/_08_cqp_query_language.html.j2 b/app/templates/_base/_modals/_manual/_08_cqp_query_language.html.j2 similarity index 100% rename from app/templates/main/_manual_modal/_08_cqp_query_language.html.j2 rename to app/templates/_base/_modals/_manual/_08_cqp_query_language.html.j2 diff --git a/app/templates/main/_manual_modal/_09_query_builder.html.j2 b/app/templates/_base/_modals/_manual/_09_query_builder.html.j2 similarity index 100% rename from app/templates/main/_manual_modal/_09_query_builder.html.j2 rename to app/templates/_base/_modals/_manual/_09_query_builder.html.j2 diff --git a/app/templates/main/_manual_modal/_10_tagsets.html.j2 b/app/templates/_base/_modals/_manual/_10_tagsets.html.j2 similarity index 100% rename from app/templates/main/_manual_modal/_10_tagsets.html.j2 rename to app/templates/_base/_modals/_manual/_10_tagsets.html.j2 diff --git a/app/templates/main/_manual_modal.html.j2 b/app/templates/_base/_modals/manual.html.j2 similarity index 72% rename from app/templates/main/_manual_modal.html.j2 rename to app/templates/_base/_modals/manual.html.j2 index 9233fb0d0567e8c4a00ff52f41cd98e01f000ef7..34ce1877e0ba82639823e61c77adb5a725a357cd 100644 --- a/app/templates/main/_manual_modal.html.j2 +++ b/app/templates/_base/_modals/manual.html.j2 @@ -13,35 +13,35 @@ </ul> <div id="manual-modal-introduction"> <br> - {% include "main/_manual_modal/_01_introduction.html.j2" %} + {% include "_base/_modals/_manual/_01_introduction.html.j2" %} </div> <div id="manual-modal-registration-and-log-in"> <br> - {% include "main/_manual_modal/_02_registration_and_log_in.html.j2" %} + {% include "_base/_modals/_manual/_02_registration_and_log_in.html.j2" %} </div> <div id="manual-modal-dashboard"> <br> - {% include "main/_manual_modal/_03_dashboard.html.j2" %} + {% include "_base/_modals/_manual/_03_dashboard.html.j2" %} </div> <div id="manual-modal-services"> <br> - {% include "main/_manual_modal/_06_services.html.j2" %} + {% include "_base/_modals/_manual/_06_services.html.j2" %} </div> <div id="manual-modal-a-closer-look-at-the-corpus-analysis"> <br> - {% include "main/_manual_modal/_07_a_closer_look_at_the_corpus_analysis.html.j2" %} + {% include "_base/_modals/_manual/_07_a_closer_look_at_the_corpus_analysis.html.j2" %} </div> <div id="manual-modal-cqp-query-language"> <br> - {% include "main/_manual_modal/_08_cqp_query_language.html.j2" %} + {% include "_base/_modals/_manual/_08_cqp_query_language.html.j2" %} </div> <div id="manual-modal-query-builder"> <br> - {% include "main/_manual_modal/_09_query_builder.html.j2" %} + {% include "_base/_modals/_manual/_09_query_builder.html.j2" %} </div> <div id="manual-modal-tagsets"> <br> - {% include "main/_manual_modal/_10_tagsets.html.j2" %} + {% include "_base/_modals/_manual/_10_tagsets.html.j2" %} </div> </div> <div class="modal-footer"> diff --git a/app/templates/_terms_of_use_modal.html.j2 b/app/templates/_base/_modals/terms_of_use.html.j2 similarity index 100% rename from app/templates/_terms_of_use_modal.html.j2 rename to app/templates/_base/_modals/terms_of_use.html.j2 diff --git a/app/templates/_footer.html.j2 b/app/templates/_base/footer.html.j2 similarity index 100% rename from app/templates/_footer.html.j2 rename to app/templates/_base/footer.html.j2 diff --git a/app/templates/_base/modals.html.j2 b/app/templates/_base/modals.html.j2 new file mode 100644 index 0000000000000000000000000000000000000000..829fcbb42ce56ed8fcec94d72098b11af2bb804c --- /dev/null +++ b/app/templates/_base/modals.html.j2 @@ -0,0 +1,5 @@ +{% include "_base/_modals/manual.html.j2" %} + +{% if current_user.is_authenticated and not current_user.terms_of_use_accepted %} +{% include "_base/_modals/terms_of_use.html.j2" %} +{% endif %} diff --git a/app/templates/_navbar.html.j2 b/app/templates/_base/navbar.html.j2 similarity index 100% rename from app/templates/_navbar.html.j2 rename to app/templates/_base/navbar.html.j2 diff --git a/app/templates/_roadmap.html.j2 b/app/templates/_base/roadmap.html.j2 similarity index 100% rename from app/templates/_roadmap.html.j2 rename to app/templates/_base/roadmap.html.j2 diff --git a/app/templates/_scripts.html.j2 b/app/templates/_base/scripts.html.j2 similarity index 100% rename from app/templates/_scripts.html.j2 rename to app/templates/_base/scripts.html.j2 diff --git a/app/templates/_sidenav.html.j2 b/app/templates/_base/sidenav.html.j2 similarity index 100% rename from app/templates/_sidenav.html.j2 rename to app/templates/_base/sidenav.html.j2 diff --git a/app/templates/_styles.html.j2 b/app/templates/_base/styles.html.j2 similarity index 100% rename from app/templates/_styles.html.j2 rename to app/templates/_base/styles.html.j2 diff --git a/app/templates/base.html.j2 b/app/templates/base.html.j2 index 9dd20f08e42a583c07528248c21c13d20a1d1f3a..067d2cb6f1dec94a6fe2d8abd38cbebec4b7a1aa 100644 --- a/app/templates/base.html.j2 +++ b/app/templates/base.html.j2 @@ -16,16 +16,16 @@ {% block styles %} {{ super() }} -{% include "_styles.html.j2" %} +{% include "_base/styles.html.j2" %} {% endblock styles %} {% block navbar %} -{% include "_navbar.html.j2" %} +{% include "_base/navbar.html.j2" %} {% endblock navbar %} {% block sidenav %} {% if current_user.is_authenticated %} -{% include "_sidenav.html.j2" %} +{% include "_base/sidenav.html.j2" %} {% endif %} {% endblock sidenav %} @@ -34,23 +34,17 @@ {% block page_content %}{% endblock page_content %} <div id="modals"> {% block modals %} - {% include "main/_manual_modal.html.j2" %} - {# {% if current_user.is_authenticated %} - {% include "_roadmap.html.j2" %} - {% endif %} #} - {% if current_user.is_authenticated and not current_user.terms_of_use_accepted %} - {% include "_terms_of_use_modal.html.j2" %} - {% endif %} + {% include "_base/modals.html.j2" %} {% endblock modals %} </div> {% endblock main %} {% block footer_attribs %} class="page-footer primary-variant-color"{% endblock footer_attribs %} {% block footer %} -{% include "_footer.html.j2" %} +{% include "_base/footer.html.j2" %} {% endblock footer %} {% block scripts %} {{ super() }} -{% include "_scripts.html.j2" %} +{% include "_base/scripts.html.j2" %} {% endblock scripts %} diff --git a/app/templates/main/user_manual.html.j2 b/app/templates/main/user_manual.html.j2 deleted file mode 100644 index 2ef1da01a3cd79f22f1be64634bc6f643adb7acc..0000000000000000000000000000000000000000 --- a/app/templates/main/user_manual.html.j2 +++ /dev/null @@ -1,43 +0,0 @@ -{% extends "base.html.j2" %} - -{% block page_content %} -<div class="container"> - <div class="row"> - <div class="col s12"> - <h1 id="title">{{ title }}</h1> - </div> - - <div class="col s12 m10"> - <div class="section scrollspy" id="introduction"> - {% include "main/manual/_01_introduction.html.j2" %} - </div> - <div class="section scrollspy" id="registration-and-log-in"> - {% include "main/manual/_02_registration_and_log_in.html.j2" %} - </div> - <div class="section scrollspy" id="dashboard"> - {% include "main/manual/_03_dashboard.html.j2" %} - </div> - <div class="section scrollspy" id="services"> - {% include "main/manual/_06_services.html.j2" %} - </div> - <div class="section scrollspy" id="a-closer-look-at-the-corpus-analysis"> - {% include "main/manual/_07_a_closer_look_at_the_corpus_analysis.html.j2" %} - </div> - <div class="section scrollspy" id="cqp-query-language"> - {% include "main/manual/_08_cqp_query_language.html.j2" %} - </div> - </div> - - <div class="col m2 hide-on-small-only"> - <ul class="section table-of-contents" style="position: fixed !important;"> - <li><a href="#introduction">Introduction</a></li> - <li><a href="#registration-and-log-in">Registration and Log in</a></li> - <li><a href="#dashboard">Dashboard</a></li> - <li><a href="#services">Services</a></li> - <li><a href="#a-closer-look-at-the-corpus-analysis">A closer look at the Corpus Analysis</a></li> - <li><a href="#cqp-query-language">CQP Query Language</a></li> - </ul> - </div> - </div> -</div> -{% endblock page_content %}