Revert "disable banner expansion in WPD"

This reverts commit 273341d45b.
pull/65/head
Aevann1 2022-12-13 23:54:34 +02:00
parent 47d597a716
commit 972c5533f1
2 changed files with 3 additions and 9 deletions

View File

@ -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 %}

View File

@ -4,8 +4,7 @@
{%- endif -%}
{%- endmacro -%}
{%- macro banner(src, href, alt, class) %}
{% set expand = not href %}
{%- macro banner(src, href, alt, expand, class) %}
<a href="{{href|default(src)}}" rel="nofollow noopener">
<img onclick="{{expand|default('expandDesktopImage()')}}" class="{{class|default('site-banner')}}" alt="{{alt|default('site banner')}}" src="{{src|default(live_banner())}}">
</a>