This commit is contained in:
Kekskurse 2021-01-15 02:15:21 +01:00
parent ac180ca7c1
commit fd3fcddfd9

View file

@ -10,7 +10,7 @@
<!-- Add photos -->
@foreach($images as $image)
<img class="imageToReplace" src="/{{ $tenant->url }}/{{ $gallery->url }}/{{ $image->id }}/file?size=small" data-thumb="/{{ $tenant->url }}/{{ $gallery->url }}/{{ $image->id }}/file?size=small">
<img class="imageToReplace" src="/{{ $tenant->url }}/{{ $gallery->url }}/{{ $image->id }}/file?size=small" data-src="/{{ $tenant->url }}/{{ $gallery->url }}/{{ $image->id }}/file?size=big" data-thumb="/{{ $tenant->url }}/{{ $gallery->url }}/{{ $image->id }}/file?size=small">
@endforeach
</div>
@ -32,11 +32,14 @@
<link href="/css/photor.min.css" rel="stylesheet"> <!-- 1.4 KB in gzip -->
<script src="/js/jquery-3.5.1.min.js"></script>
<script src="/js/photor.min.js"></script> <!-- 5 KB in gzip -->
<script src="/js/lazyload.min.js"></script>
<script>
$(document).ready(function() {
$('.photor').photor();
let images = document.querySelectorAll(".imageToReplace");
var r = lazyload(images);
console.log(r);
});
</script>