mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
Remove intersect
This commit is contained in:
parent
a75730d91f
commit
9188c28ee7
1
core/static/core/js/alpine/intersect.min.js
vendored
1
core/static/core/js/alpine/intersect.min.js
vendored
@ -1 +0,0 @@
|
|||||||
(()=>{function o(e){e.directive("intersect",e.skipDuringClone((t,{value:i,expression:l,modifiers:n},{evaluateLater:r,cleanup:c})=>{let s=r(l),a={rootMargin:x(n),threshold:f(n)},u=new IntersectionObserver(d=>{d.forEach(h=>{h.isIntersecting!==(i==="leave")&&(s(),n.includes("once")&&u.disconnect())})},a);u.observe(t),c(()=>{u.disconnect()})}))}function f(e){if(e.includes("full"))return .99;if(e.includes("half"))return .5;if(!e.includes("threshold"))return 0;let t=e[e.indexOf("threshold")+1];return t==="100"?1:t==="0"?0:Number(`.${t}`)}function p(e){let t=e.match(/^(-?[0-9]+)(px|%)?$/);return t?t[1]+(t[2]||"px"):void 0}function x(e){let t="margin",i="0px 0px 0px 0px",l=e.indexOf(t);if(l===-1)return i;let n=[];for(let r=1;r<5;r++)n.push(p(e[l+r]||""));return n=n.filter(r=>r!==void 0),n.length?n.join(" ").trim():i}document.addEventListener("alpine:init",()=>{window.Alpine.plugin(o)});})();
|
|
@ -29,7 +29,7 @@
|
|||||||
{% block additional_js %}{% endblock %}
|
{% block additional_js %}{% endblock %}
|
||||||
|
|
||||||
{# Alpine JS must be loaded after scripts that use it. #}
|
{# Alpine JS must be loaded after scripts that use it. #}
|
||||||
<script src="{{ static('core/js/alpine/alpinejs.min.js') }}" defer></script>
|
<script src="{{ static('core/js/alpinejs.min.js') }}" defer></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
window.showSaveFilePicker = showSaveFilePicker; /* Export function to normal javascript */
|
window.showSaveFilePicker = showSaveFilePicker; /* Export function to normal javascript */
|
||||||
</script>
|
</script>
|
||||||
<script defer type="text/javascript" src="{{ static('core/js/zipjs/zip-fs-full.min.js') }}"></script>
|
<script defer type="text/javascript" src="{{ static('core/js/zipjs/zip-fs-full.min.js') }}"></script>
|
||||||
<script defer type="text/javascript" src="{{ static('core/js/alpine/intersect.min.js') }}"></script>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
@ -33,31 +32,29 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<template x-for="[album, pictures] in Object.entries(albums)">
|
<template x-for="[album, pictures] in Object.entries(albums)" x-cloak>
|
||||||
<section x-data="{ shown: false }" x-intersect:enter="shown = true">
|
<section>
|
||||||
<hgroup x-show="shown" x-transition x-cloak>
|
<br />
|
||||||
<br />
|
<h4 x-text="album"></h4>
|
||||||
<h4 x-text="album"></h4>
|
<div class="photos">
|
||||||
<div class="photos">
|
<template x-for="picture in pictures">
|
||||||
<template x-for="picture in pictures">
|
<a :href="`/sas/picture/${picture.id}#pict`">
|
||||||
<a :href="`/sas/picture/${picture.id}#pict`">
|
<div
|
||||||
<div
|
class="photo"
|
||||||
class="photo"
|
:class="{not_moderated: !picture.is_moderated}"
|
||||||
:class="{not_moderated: !picture.is_moderated}"
|
:style="`background-image: url(${picture.thumb_url})`"
|
||||||
:style="`background-image: url(${picture.thumb_url})`"
|
>
|
||||||
>
|
<template x-if="!picture.is_moderated">
|
||||||
<template x-if="!picture.is_moderated">
|
<div class="overlay"> </div>
|
||||||
<div class="overlay"> </div>
|
<div class="text">{% trans %}To be moderated{% endtrans %}</div>
|
||||||
<div class="text">{% trans %}To be moderated{% endtrans %}</div>
|
</template>
|
||||||
</template>
|
<template x-if="picture.is_moderated">
|
||||||
<template x-if="picture.is_moderated">
|
<div class="text"> </div>
|
||||||
<div class="text"> </div>
|
</template>
|
||||||
</template>
|
</div>
|
||||||
</div>
|
</a>
|
||||||
</a>
|
</template>
|
||||||
</template>
|
</div>
|
||||||
</div>
|
|
||||||
</hgroup>
|
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
<div class="photos" :aria-busy="loading"></div>
|
<div class="photos" :aria-busy="loading"></div>
|
||||||
|
Loading…
Reference in New Issue
Block a user