aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/views/GalleryThumbnail.vue
diff options
context:
space:
mode:
Diffstat (limited to 'viewer/src/views/GalleryThumbnail.vue')
-rw-r--r--viewer/src/views/GalleryThumbnail.vue76
1 files changed, 0 insertions, 76 deletions
diff --git a/viewer/src/views/GalleryThumbnail.vue b/viewer/src/views/GalleryThumbnail.vue
deleted file mode 100644
index 41a59e1..0000000
--- a/viewer/src/views/GalleryThumbnail.vue
+++ /dev/null
@@ -1,76 +0,0 @@
1<!-- ldgallery - A static generator which turns a collection of tagged
2-- pictures into a searchable web gallery.
3--
4-- Copyright (C) 2019-2020 Guillaume FOUET
5--
6-- This program is free software: you can redistribute it and/or modify
7-- it under the terms of the GNU Affero General Public License as
8-- published by the Free Software Foundation, either version 3 of the
9-- License, or (at your option) any later version.
10--
11-- This program is distributed in the hope that it will be useful,
12-- but WITHOUT ANY WARRANTY; without even the implied warranty of
13-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14-- GNU Affero General Public License for more details.
15--
16-- You should have received a copy of the GNU Affero General Public License
17-- along with this program. If not, see <https://www.gnu.org/licenses/>.
18-->
19
20<template>
21 <div class="forcedsize" :class="{preload: loading}">
22 <v-lazy-image
23 v-if="item.thumbnail"
24 class="thumbnail"
25 :src="pictureSrc"
26 :title="item.path"
27 @intersect="loading=true"
28 @load="loading=false"
29 />
30 <div v-else class="flex-column flex-center">
31 <fa-icon icon="folder" size="4x" />
32 {{item.title}}
33 </div>
34 </div>
35</template>
36
37<script lang="ts">
38import { Component, Vue, Prop } from "vue-property-decorator";
39
40@Component
41export default class GalleryThumbnail extends Vue {
42 @Prop({ required: true }) readonly item!: Gallery.Item;
43
44 loading: boolean = false;
45
46 get pictureSrc() {
47 return `${process.env.VUE_APP_DATA_URL}${this.item.thumbnail}`;
48 }
49}
50</script>
51
52<style lang="scss">
53@import "@/assets/scss/theme.scss";
54
55.thumbnail {
56 max-width: 250px;
57 max-height: 250px;
58}
59.preload {
60 animation: preloadAnimation 1s infinite ease-in-out alternate;
61}
62@keyframes preloadAnimation {
63 from {
64 background-color: $content-bgcolor;
65 }
66 to {
67 background-color: $loader-color;
68 }
69}
70// Temporary size until we get the true thumbnail size
71.forcedsize {
72 width: 250px;
73 height: 250px;
74 text-align: center;
75}
76</style>