From b7bbc2cc1e0a0589084bfda1ba0990bbc92fd773 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 13 Dec 2022 23:49:26 +0200 Subject: [PATCH] Revert "disable banner expansion in WPD" This reverts commit 273341d45b5560de044e7fa16f43bb9e916a730b. --- files/templates/default.html | 9 ++------- files/templates/util/macros.html | 3 +-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/files/templates/default.html b/files/templates/default.html index 48d0c85f6..add1c26c2 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -15,16 +15,11 @@ {% set class = 'site-banner-hole' %} {% elif SITE_NAME == "rDrama" %} {% set href = "https://secure.transequality.org/site/Donation2?df_id=1480" %} + {% set expand = false %} {% elif SITE_NAME == 'PCM' %}{# special case: christmas #} {% set src = "/i/PCM/banners_xmas22/" ~ listdir('files/assets/images/PCM/banners_xmas22')|random() %} - {% elif SITE_NAME == "WPD" %} - {% if sub %} - {% set href = "/h/" ~ sub %} - {% else %} - {% set href = "/" %} - {% endif %} {% endif %} - {{macros.banner(src, href, alt, class)}} + {{macros.banner(src, href, alt, expand, class)}} {% endif %} {% endif %} {% endblock %} diff --git a/files/templates/util/macros.html b/files/templates/util/macros.html index a6937337b..2e4c04f87 100644 --- a/files/templates/util/macros.html +++ b/files/templates/util/macros.html @@ -4,8 +4,7 @@ {%- endif -%} {%- endmacro -%} -{%- macro banner(src, href, alt, class) %} - {% set expand = not href %} +{%- macro banner(src, href, alt, expand, class) %} {{alt|default('site banner')}}