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
Raw Normal View History

2021-01-06 06:21:20 -08:00
<template>
<a :href="buildImageUrl(id, 'big')" target="_blank" rel="noopener" class="d-inline-block"
@click.prevent="$eventHub.$emit('lightbox', buildImageUrl(id, 'big'))"
2021-01-06 06:21:20 -08:00
>
<img :src="buildImageUrl(id, 'thumb')" class="border rounded-lg"/>
2021-01-06 06:21:20 -08:00
</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>