split files
This commit is contained in:
parent
62f8991e11
commit
9e3a6721c9
7 changed files with 99 additions and 123 deletions
22
public/components/ImageTeaser.vue.js
Normal file
22
public/components/ImageTeaser.vue.js
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue