Calculating tag photo dimensions in seed file, improved tag photo lazy loading.

This commit is contained in:
DebaucheryLibrarian
2021-03-16 04:35:26 +01:00
parent 6fef87b0f1
commit 586ff6d4bd
3 changed files with 30 additions and 4 deletions

View File

@@ -10,9 +10,11 @@
class="photo-link"
>
<img
:src="`/img/${photo.thumbnail}`"
:style="{ 'background-image': `url(/img/${photo.thumbnail})` }"
:src="getPath(photo, 'thumbnail', { local: true })"
:style="{ 'background-image': `url(${getPath(photo, 'lazy', { local: true })})` }"
:alt="photo.comment"
:width="photo.width"
:height="photo.height"
class="photo"
@load="$emit('load', $event)"
>
@@ -122,6 +124,7 @@ export default {
.poster,
.photo {
width: auto;
max-height: 15rem;
max-width: 100%;
box-shadow: 0 0 3px var(--shadow-weak);