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
607 B
Vue

<template>
<a :href="getUrl('big')" target="_blank" rel="noopener" class="d-inline-block"
@click.prevent="$eventHub.$emit('lightbox', getUrl('big'))"
>
<img :src="getUrl('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>