make clicking on the image inside posts expands it

master
Aevann1 2022-08-24 18:43:08 +02:00
parent 640e740e55
commit 604c2583af
6 changed files with 8 additions and 8 deletions

View File

@ -277,7 +277,7 @@
{% if '@' not in request.path %} {% if '@' not in request.path %}
{% if sub and SITE_NAME != 'WPD' %} {% if sub and SITE_NAME != 'WPD' %}
<a href="{{sub.banner_url}}"> <a href="{{sub.banner_url}}">
<img alt="/h/{{sub.name}} banner" role="button" onclick="expandDesktopImage()" src="{{sub.banner_url}}" width=100% style="object-fit:cover;max-height:min(42vh,30vw)!important"> <img alt="/h/{{sub.name}} banner" onclick="expandDesktopImage()" src="{{sub.banner_url}}" width=100% style="object-fit:cover;max-height:min(42vh,30vw)!important">
</a> </a>
{% elif SITE_NAME == 'rDrama' %} {% elif SITE_NAME == 'rDrama' %}
<a href="https://secure.transequality.org/site/Donation2?df_id=1480"> <a href="https://secure.transequality.org/site/Donation2?df_id=1480">
@ -303,7 +303,7 @@
{% endif %} {% endif %}
<a href="{{banner}}"> <a href="{{banner}}">
<img alt="site banner" role="button" onclick="expandDesktopImage()" src="{{banner}}" width="100%"> <img alt="site banner" onclick="expandDesktopImage()" src="{{banner}}" width="100%">
</a> </a>
{% endif %} {% endif %}
{% endif %} {% endif %}

View File

@ -45,7 +45,7 @@
{% if request.path != '/sidebar' %} {% if request.path != '/sidebar' %}
<a href="{{image}}"> <a href="{{image}}">
<img class="mb-4" alt="sidebar image" role="button" onclick="expandDesktopImage()" loading="lazy" src="{{image}}" width=100%> <img class="mb-4" alt="sidebar image" onclick="expandDesktopImage()" loading="lazy" src="{{image}}" width=100%>
</a> </a>
{% endif %} {% endif %}
</div> </div>

View File

@ -5,7 +5,7 @@
{% if request.path != '/sidebar' %} {% if request.path != '/sidebar' %}
<a href="{{art_image}}"> <a href="{{art_image}}">
<img class="mb-4" alt="sidebar image" role="button" onclick="expandDesktopImage()" loading="lazy" src="{{art_image}}" width=100%> <img class="mb-4" alt="sidebar image" onclick="expandDesktopImage()" loading="lazy" src="{{art_image}}" width=100%>
</a> </a>
{% endif %} {% endif %}

View File

@ -10,11 +10,11 @@
{% if request.path != '/sidebar' %} {% if request.path != '/sidebar' %}
{% if v and (v.is_banned or v.agendaposter) %} {% if v and (v.is_banned or v.agendaposter) %}
<a href="/i/{{SITE_NAME}}/sidebar2.webp"> <a href="/i/{{SITE_NAME}}/sidebar2.webp">
<img class="mb-4" alt="sidebar image" role="button" onclick="expandDesktopImage()" loading="lazy" src="/i/{{SITE_NAME}}/sidebar2.webp" width=100%> <img class="mb-4" alt="sidebar image" onclick="expandDesktopImage()" loading="lazy" src="/i/{{SITE_NAME}}/sidebar2.webp" width=100%>
</a> </a>
{% else %} {% else %}
<a href="{{image}}"> <a href="{{image}}">
<img class="mb-4" alt="sidebar image" role="button" onclick="expandDesktopImage()" loading="lazy" src="{{image}}" width=100%> <img class="mb-4" alt="sidebar image" onclick="expandDesktopImage()" loading="lazy" src="{{image}}" width=100%>
</a> </a>
{% endif %} {% endif %}
{% endif %} {% endif %}

View File

@ -753,7 +753,7 @@
<div class="row no-gutters"> <div class="row no-gutters">
<div class="col"> <div class="col">
<a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener noreferrer" href="{{p.realurl(v)}}"> <a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener noreferrer" href="{{p.realurl(v)}}">
<img src="{{p.realurl(v)}}" class="img-fluid" style="max-height:500px" alt="Unable to load image"> <img onclick="expandDesktopImage()" src="{{p.realurl(v)}}" class="img-fluid" style="max-height:500px" alt="Unable to load image">
</a> </a>
</div> </div>
</div> </div>

View File

@ -387,7 +387,7 @@
<div class="row"> <div class="row">
<div class="col px-0"> <div class="col px-0">
<a href="{{u.banner_url}}"> <a href="{{u.banner_url}}">
<img alt="@{{u.username}}'s banner" role="button" onclick="expandDesktopImage()" loading="lazy" src="{{u.banner_url}}" width=100% style="object-fit:cover;max-height:30vh!important"> <img alt="@{{u.username}}'s banner" onclick="expandDesktopImage()" loading="lazy" src="{{u.banner_url}}" width=100% style="object-fit:cover;max-height:30vh!important">
</a> </a>
</div> </div>
</div> </div>