This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Zaimki/components/ImageThumb.vue

28 lines
640 B
Vue

<template>
<a :href="buildImageUrl(id, 'big')" target="_blank" rel="noopener" class="d-inline-block"
@click.prevent="$eventHub.$emit('lightbox', buildImageUrl(id, 'big'))"
>
<img :src="buildImageUrl(id, 'thumb')" class="border rounded-lg"/>
</a>
</template>
<script>
export default {
props: {
id: {required: true},
},
methods: {
getUrl(size) {
return `${process.env.BUCKET}/images/${this.id}-${size}.png`;
},
},
}
</script>
<style lang="scss" scoped>
img {
height: 8rem;
width: 8rem;
}
</style>