From f177207e2895a5c8c2063c4eb7ee8bcf9c89ae39 Mon Sep 17 00:00:00 2001 From: ehab Date: Sun, 7 Sep 2025 10:44:27 +0300 Subject: [PATCH 1/7] fix close banner --- templates/partials/banner.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/partials/banner.html b/templates/partials/banner.html index 2280fc4c4..ba1f2232f 100644 --- a/templates/partials/banner.html +++ b/templates/partials/banner.html @@ -9,14 +9,14 @@ From f1a8069ab35e758a02c1b546fda6fa9642d807ea Mon Sep 17 00:00:00 2001 From: ehab Date: Sun, 7 Sep 2025 11:26:08 +0300 Subject: [PATCH 2/7] update banner --- content/home/index.md | 3 +++ templates/_default/base.html | 2 +- templates/shortcodes/banner.html | 22 ++++++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 templates/shortcodes/banner.html diff --git a/content/home/index.md b/content/home/index.md index ef5d8ea3d..f5fef3f37 100644 --- a/content/home/index.md +++ b/content/home/index.md @@ -7,6 +7,9 @@ extra: imgPath: home/tf.png --- + +{{ banner()}} + {{ hero_text_center( diff --git a/templates/_default/base.html b/templates/_default/base.html index 8153974a0..9b795a415 100644 --- a/templates/_default/base.html +++ b/templates/_default/base.html @@ -43,7 +43,7 @@ {% include "partials/header.html" %}
- {% include "partials/banner.html" %} + {% block content %}{% endblock %}
diff --git a/templates/shortcodes/banner.html b/templates/shortcodes/banner.html new file mode 100644 index 000000000..ba1f2232f --- /dev/null +++ b/templates/shortcodes/banner.html @@ -0,0 +1,22 @@ + + From 1b4eb236939706c90f109a5162759a86f7cc98b0 Mon Sep 17 00:00:00 2001 From: ehab Date: Sun, 7 Sep 2025 11:30:57 +0300 Subject: [PATCH 3/7] update link --- templates/shortcodes/banner.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/shortcodes/banner.html b/templates/shortcodes/banner.html index ba1f2232f..fc085373f 100644 --- a/templates/shortcodes/banner.html +++ b/templates/shortcodes/banner.html @@ -9,7 +9,7 @@ + \ No newline at end of file From f19c4a92d21e368927c9e60c2de784e34891e30d Mon Sep 17 00:00:00 2001 From: ehab-hassan Date: Tue, 9 Sep 2025 12:34:07 +0300 Subject: [PATCH 7/7] hide banner from newsroom --- templates/_default/base.html | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/templates/_default/base.html b/templates/_default/base.html index 8153974a0..e288c12e6 100644 --- a/templates/_default/base.html +++ b/templates/_default/base.html @@ -42,11 +42,22 @@ {% include "partials/header.html" %} -
- {% include "partials/banner.html" %} +
+ {# Show banner on all pages except /newsroom paths #} + {% set show_banner = true %} + {% if current_path is defined and current_path is starting_with("/newsroom") %} + {% set show_banner = false %} + {% endif %} + {% if show_banner %} + {% include "partials/banner.html" %} + {% endif %} {% block content %}{% endblock %}
+ + + +
{% include "partials/footer.html" %}