split files

This commit is contained in:
Zutatensuppe 2021-05-01 08:42:39 +02:00
parent 62f8991e11
commit 9e3a6721c9
7 changed files with 99 additions and 123 deletions

View file

@ -0,0 +1,22 @@
const ImageTeaser = {
name: 'image-teaser',
props: {
image: Object
},
template: `<div class="imageteaser" :style="style" @click="onClick"></div>`,
computed: {
style() {
const url = this.image.url.replace('uploads/', 'uploads/r/') + '-150x100.webp'
return {
'background-image': `url("${url}")`,
}
},
},
methods: {
onClick() {
this.$emit('click')
},
},
}
export default ImageTeaser