stop banners from making page jump

pull/143/head
Aevann 2023-05-02 19:44:39 +03:00
parent a2405304e9
commit b22eb20b2b
2 changed files with 19 additions and 1 deletions

View File

@ -6854,14 +6854,26 @@ div.markdown {
.site-banner {
width: 100%;
height: 100%;
max-height: 30vh;
object-fit: contain;
}
.site-banner-hole {
width: 100%;
height: 100%;
object-fit: cover;
max-height: min(42vh,30vw) !important;
}
.banner-wrapper > div {
position: relative;
}
.banner-wrapper > div > div {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.modlog-action {
display: flex;

View File

@ -45,7 +45,13 @@
{% endif %}
{% endif %}
<img data-nonce="{{g.nonce}}" data-onclick="{{expand|default('expandImage()')}}" class="{{class|default('site-banner')}}" alt="{{alt|default('site banner')}}" src="{{banner_url}}">
<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}}">
</div>
</div>
</div>
</a>
{% endif %}
{% endif %}