forked from rDrama/rDrama
rename expandDesktopImage to expandImage
parent
5901f5a53f
commit
c279eeb9d2
|
@ -224,7 +224,7 @@ function formkey() {
|
|||
else return null;
|
||||
}
|
||||
|
||||
function expandDesktopImage(url) {
|
||||
function expandImage(url) {
|
||||
const e = this.event
|
||||
if(e.ctrlKey || e.metaKey || e.shiftKey || e.altKey)
|
||||
return;
|
||||
|
@ -449,7 +449,7 @@ function sort_table(t) {
|
|||
document.addEventListener("click", function(e){
|
||||
const element = e.target
|
||||
if (element instanceof HTMLImageElement && element.alt.startsWith('![]('))
|
||||
expandDesktopImage()
|
||||
expandImage()
|
||||
else if (element.tagName == "TH")
|
||||
sort_table(element)
|
||||
else if (element.classList.contains('giphy'))
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
{% endif %}
|
||||
|
||||
<div class="font-weight-bold mt-4 mb-2">First step:</div>
|
||||
<img onclick="expandDesktopImage()" alt="First step" style="height:30vh" src="/i/{{SITE_NAME}}/app-{{type}}-1.webp">
|
||||
<img onclick="expandImage()" alt="First step" style="height:30vh" src="/i/{{SITE_NAME}}/app-{{type}}-1.webp">
|
||||
|
||||
<div class="font-weight-bold mt-4 mb-2">Second step:</div>
|
||||
<img onclick="expandDesktopImage()" alt="Second step" style="height:30vh" src="/i/{{SITE_NAME}}/app-{{type}}-2.webp">
|
||||
<img onclick="expandImage()" alt="Second step" style="height:30vh" src="/i/{{SITE_NAME}}/app-{{type}}-2.webp">
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
{% if request.path != '/sidebar' %}
|
||||
<a href="{{art_image}}">
|
||||
<img class="mb-4" alt="sidebar image" onclick="expandDesktopImage()" loading="lazy" src="{{art_image}}" width=100%>
|
||||
<img class="mb-4" alt="sidebar image" onclick="expandImage()" loading="lazy" src="{{art_image}}" width=100%>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
{% if request.path != '/sidebar' %}
|
||||
{% if v and (v.is_banned or v.agendaposter) %}
|
||||
<a href="/i/{{SITE_NAME}}/sidebar2.webp">
|
||||
<img class="mb-4" alt="sidebar image" onclick="expandDesktopImage()" loading="lazy" src="/i/{{SITE_NAME}}/sidebar2.webp" width=100%>
|
||||
<img class="mb-4" alt="sidebar image" onclick="expandImage()" loading="lazy" src="/i/{{SITE_NAME}}/sidebar2.webp" width=100%>
|
||||
</a>
|
||||
{% elif not (sub and sub.name == 'chudrama' and v and not v.can_see_chudrama) %}
|
||||
<a href="{{image}}">
|
||||
<img class="mb-4" alt="sidebar image" onclick="expandDesktopImage()" loading="lazy" src="{{image}}" width=100%>
|
||||
<img class="mb-4" alt="sidebar image" onclick="expandImage()" loading="lazy" src="{{image}}" width=100%>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
@ -142,7 +142,7 @@
|
|||
<div class="row no-gutters mb-4">
|
||||
<div class="col">
|
||||
<a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener" href="{{p.realurl(v)}}">
|
||||
<img onclick="expandDesktopImage()" src="{{p.realurl(v)}}" class="img-fluid" style="max-height:500px" alt="Unable to load image">
|
||||
<img onclick="expandImage()" src="{{p.realurl(v)}}" class="img-fluid" style="max-height:500px" alt="Unable to load image">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
</a>
|
||||
{% elif p.is_image %}
|
||||
<a href="{{p.realurl(v)}}" rel="nofollow noopener">
|
||||
<img onclick="expandDesktopImage('{{p.realurl(v)}}')" alt="post thumbnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
|
||||
<img onclick="expandImage('{{p.realurl(v)}}')" alt="post thumbnail" loading="lazy" src="{{p.thumb_url}}" class="post-img">
|
||||
</a>
|
||||
{% elif p.is_video or p.is_audio %}
|
||||
<a href="{{p.realurl(v)}}" rel="nofollow noopener">
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
<div class="d-md-flex text-center text-md-left">
|
||||
<div id="profile--pfp" {% if u.hat_active(v)[0] %}class="profile--pfp--hat hat"{% endif %}>
|
||||
<a rel="nofollow noopener" href="{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}" class="profile-pic-100-wrapper">
|
||||
<img onclick="expandDesktopImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" loading="lazy" src="{{u.profile_url}}" class="profile-pic profile-pic-100 mb-5">
|
||||
<img onclick="expandImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" loading="lazy" src="{{u.profile_url}}" class="profile-pic profile-pic-100 mb-5">
|
||||
{% if u.hat_active(v)[0] -%}
|
||||
<img onclick="expandDesktopImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" class="profile-pic-100-hat hat" loading="lazy" src="{{u.hat_active(v)[0]}}?h=7" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.hat_active(v)[1]}}">
|
||||
<img onclick="expandImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" class="profile-pic-100-hat hat" loading="lazy" src="{{u.hat_active(v)[0]}}?h=7" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.hat_active(v)[1]}}">
|
||||
{%- endif %}
|
||||
</a>
|
||||
</div>
|
||||
|
@ -261,7 +261,7 @@
|
|||
<div class="row">
|
||||
<div class="col px-0">
|
||||
<a rel="nofollow noopener" href="{{u.banner_url}}">
|
||||
<img alt="@{{u.username}}'s banner" 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="expandImage()" loading="lazy" src="{{u.banner_url}}" width=100% style="object-fit:cover;max-height:30vh!important">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -269,9 +269,9 @@
|
|||
<div class="col">
|
||||
<div style="margin-top: -34px;" id="profile-mobile--pfp">
|
||||
<a rel="nofollow noopener" href="{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}" class="profile-pic-65-wrapper">
|
||||
<img onclick="expandDesktopImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" loading="lazy" src="{{u.profile_url}}" class="profile-pic-65 bg-white mb-2">
|
||||
<img onclick="expandImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" loading="lazy" src="{{u.profile_url}}" class="profile-pic-65 bg-white mb-2">
|
||||
{% if u.hat_active(v)[0] -%}
|
||||
<img onclick="expandDesktopImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" class="profile-pic-65-hat hat" loading="lazy" src="{{u.hat_active(v)[0]}}?h=7">
|
||||
<img onclick="expandImage('{% if u.highres %}{{u.highres}}{% else %}{{u.profile_url}}{% endif %}')" class="profile-pic-65-hat hat" loading="lazy" src="{{u.hat_active(v)[0]}}?h=7">
|
||||
{%- endif %}
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
{%- 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())}}">
|
||||
<img onclick="{{expand|default('expandImage()')}}" class="{{class|default('site-banner')}}" alt="{{alt|default('site banner')}}" src="{{src|default(live_banner())}}">
|
||||
</a>
|
||||
{% endmacro -%}
|
||||
|
||||
|
|
Loading…
Reference in New Issue