exempt holes from the new banner code

pull/146/head
Aevann 2023-05-06 01:08:12 +03:00
parent 6890c3f2b1
commit b7f1bc50a0
2 changed files with 22 additions and 6 deletions

View File

@ -6844,12 +6844,20 @@ div.markdown {
object-fit: contain;
}
.site-banner, .site-banner-hole {
.site-banner {
width: 100%;
height: 100%;
max-height: 30vh;
object-fit: contain;
}
.site-banner-hole {
width: 100%;
height: 100%;
max-height: min(42vh,30vw) !important;
object-fit: cover;
}
.banner-wrapper > div {
position: relative;
}

View File

@ -45,13 +45,21 @@
{% endif %}
{% endif %}
<div class="banner-wrapper">
<div style="padding: 0 0 12.2%">
<div>
<img data-nonce="{{g.nonce}}" data-onclick="{{expand|default('expandImage()')}}" class="{{class|default('site-banner')}}" alt="{{alt|default('site banner')}}" src="{{banner_url}}">
{% macro img_element() %}
<img data-nonce="{{g.nonce}}" data-onclick="{{expand|default('expandImage()')}}" class="{{class|default('site-banner')}}" alt="{{alt|default('site banner')}}" src="{{banner_url}}">
{% endmacro %}
{% if sub and sub.has_banners %}
{{img_element()}}
{% else %}
<div class="banner-wrapper">
<div style="padding: 0 0 12.2%">
<div>
{{img_element()}}
</div>
</div>
</div>
</div>
{% endif %}
</a>
{% endif %}
{% endif %}