From 6043dabe8f1351f567843a6c0509958d6d56870a Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 14 Jun 2024 10:32:45 -0500 Subject: jquery, bootstrap: update page dependencies * Add jquery which is needed for bootstrap plugins. * Add the default bootstrap theme. * Provide route to serve up jquery libraries. --- qc_app/base_routes.py | 7 +++++++ qc_app/templates/base.html | 12 ++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/qc_app/base_routes.py b/qc_app/base_routes.py index dbfcf48..9023fec 100644 --- a/qc_app/base_routes.py +++ b/qc_app/base_routes.py @@ -13,3 +13,10 @@ def bootstrap(filename): """Fetch bootstrap files.""" return send_from_directory( appenv(), f"share/genenetwork2/javascript/bootstrap/{filename}") + + +@base.route("/jquery/") +def jquery(filename): + """Fetch jquery files.""" + return send_from_directory( + appenv(), f"share/genenetwork2/javascript/jquery/{filename}") diff --git a/qc_app/templates/base.html b/qc_app/templates/base.html index 91faee8..3f1ccac 100644 --- a/qc_app/templates/base.html +++ b/qc_app/templates/base.html @@ -9,7 +9,12 @@ GN Uploader: {%block title%}{%endblock%} + href="{{url_for('base.bootstrap', + filename='css/bootstrap.min.css')}}" /> + + @@ -18,7 +23,6 @@ {%block css%}{%endblock%} - @@ -26,6 +30,10 @@ {%block contents%}{%endblock%} + + {%block javascript%}{%endblock%} -- cgit v1.2.3