diff --git a/files/templates/default.html b/files/templates/default.html index add1c26c2b..48d0c85f69 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -15,11 +15,16 @@ {% 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, expand, class)}} + {{macros.banner(src, href, alt, class)}} {% endif %} {% endif %} {% endblock %} diff --git a/files/templates/util/macros.html b/files/templates/util/macros.html index 2e4c04f87e..a6937337b4 100644 --- a/files/templates/util/macros.html +++ b/files/templates/util/macros.html @@ -4,7 +4,8 @@ {%- endif -%} {%- endmacro -%} -{%- macro banner(src, href, alt, expand, class) %} +{%- macro banner(src, href, alt, class) %} + {% set expand = not href %} {{alt|default('site banner')}}