mirror of
https://github.com/filegator/filegator.git
synced 2025-08-07 20:26:30 +02:00
Fix lazy loading images all being loaded when opening gallery (#534)
* Fix lazy loading images all being loaded when opening gallery Because the lazy loaded image didn't have a limited height. Many images would load anyway because they all fit in the parent box. Giving them a minimal height with object-cover keeps them looking good while limiting the amount that is lazy loaded. * reduce the height to make the minimal images square
This commit is contained in:
committed by
GitHub
parent
58a594dc80
commit
ee556f46e9
@@ -36,6 +36,11 @@ html, body, #wrapper, #inner, .container {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.image-lazy {
|
||||||
|
min-height: 150px;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
@media all and (max-width: 1088px) {
|
@media all and (max-width: 1088px) {
|
||||||
.container {
|
.container {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
<div v-if="images.length > 1" class="column is-one-fifth sidebox">
|
<div v-if="images.length > 1" class="column is-one-fifth sidebox">
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="(image, index) in images" :key="index">
|
<li v-for="(image, index) in images" :key="index">
|
||||||
<img v-lazy="imageSrc(image.path)" @click="currentItem = image">
|
<img v-lazy="imageSrc(image.path)" @click="currentItem = image" class="image-lazy">
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user