From 7f9f1d40e806aaf2e0017c0c157b76fb284b049f Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Mon, 9 Dec 2024 13:07:42 +0100 Subject: spit of navigation element into its own file --- src/jwebmail/__init__.py | 4 ++-- src/jwebmail/templates/_bot_nav.html | 38 +----------------------------------- src/jwebmail/templates/_nav.html | 22 +++++++++++++++++++++ src/jwebmail/templates/_top_nav.html | 38 +----------------------------------- 4 files changed, 26 insertions(+), 76 deletions(-) create mode 100644 src/jwebmail/templates/_nav.html diff --git a/src/jwebmail/__init__.py b/src/jwebmail/__init__.py index d7ac1f0..a1bd00a 100644 --- a/src/jwebmail/__init__.py +++ b/src/jwebmail/__init__.py @@ -36,7 +36,7 @@ else: toml_read_file = dict(load=toml_load, text=True) -__version__ = "2.8.1.dev3" +__version__ = "2.8.2.dev0" csrf = CSRFProtect() @@ -55,7 +55,7 @@ def validate_config(app): def create_app(): app = Flask(__name__) - app.jinja_options = dict(undefined=ChainableUndefined) + app.jinja_options = dict(undefined=ChainableUndefined, extensions=["jinja2.ext.do"]) if app.config["DEBUG"]: app.config.from_file("../../jwebmail.toml", **toml_read_file) diff --git a/src/jwebmail/templates/_bot_nav.html b/src/jwebmail/templates/_bot_nav.html index 03cb939..a1e1b76 100644 --- a/src/jwebmail/templates/_bot_nav.html +++ b/src/jwebmail/templates/_bot_nav.html @@ -1,43 +1,7 @@
- + {% include '_nav.html' %}
diff --git a/src/jwebmail/templates/_nav.html b/src/jwebmail/templates/_nav.html new file mode 100644 index 0000000..79b7b6e --- /dev/null +++ b/src/jwebmail/templates/_nav.html @@ -0,0 +1,22 @@ + diff --git a/src/jwebmail/templates/_top_nav.html b/src/jwebmail/templates/_top_nav.html index c94918c..4e5bcb9 100644 --- a/src/jwebmail/templates/_top_nav.html +++ b/src/jwebmail/templates/_top_nav.html @@ -41,43 +41,7 @@
- + {% include '_nav.html' %}
-- cgit v1.2.3