reduce width of sidebar images in art page

master
Aevann 2024-04-11 13:16:13 +02:00
parent 195a21a8b1
commit 1162b10b35
3 changed files with 9 additions and 3 deletions

View File

@ -7839,3 +7839,9 @@ img[src$="/e/speechbubble.webp"] {
height: 411px height: 411px
} }
} }
#view-art-sidebar img {
max-height: 300px !important;
width: 300px;
object-fit: contain;
}

View File

@ -457,4 +457,4 @@ def view_art(v):
urls = sorted(urls, key=lambda x: int(x.split('.webp')[0]), reverse=True) urls = sorted(urls, key=lambda x: int(x.split('.webp')[0]), reverse=True)
urls = [f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/{location_kind}/{x}" for x in urls] urls = [f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/{location_kind}/{x}" for x in urls]
return render_template(f'view_art.html', v=v, urls=urls, title=title) return render_template(f'view_art.html', v=v, urls=urls, title=title, kind=location_kind)

View File

@ -1,11 +1,11 @@
{% extends "default.html" %} {% extends "default.html" %}
{% block pagetitle %}{{title}}{% endblock %} {% block pagetitle %}{{title}}{% endblock %}
{% block content %} {% block content %}
<div class="text-center"> <div id="view-art-{{kind}}" class="text-center">
<h2 class="mt-4">{{title}}</h2> <h2 class="mt-4">{{title}}</h2>
{% for url in urls %} {% for url in urls %}
<a href="{{url|expand_art}}"> <a href="{{url|expand_art}}">
<img class="mt-4 mr-3 img" style="max-width:{% if request.path == '/banners' %}80vw{% else %}300px{% endif %}" src="{{url}}" loading="lazy" data-nonce="{{g.nonce}}" data-onclick="expandImage('{{url|expand_art}}')"> <img class="mt-4 mr-3 img" src="{{url}}" loading="lazy" data-nonce="{{g.nonce}}" data-onclick="expandImage('{{url|expand_art}}')">
</a> </a>
{% endfor %} {% endfor %}
</div> </div>