repod/src/components/Discover/TopItem.vue

45 lines
573 B
Vue
Raw Normal View History

2023-07-25 20:07:35 +00:00
<template>
2023-08-24 21:19:54 +00:00
<router-link :to="toUrl">
<img :alt="`${title} - ${author}`"
2023-08-22 18:14:15 +00:00
:src="imageUrl"
2023-07-29 15:53:51 +00:00
:title="author">
2023-08-24 20:29:11 +00:00
</router-link>
2023-07-25 20:07:35 +00:00
</template>
<script>
export default {
name: 'TopItem',
components: {},
props: {
author: {
2023-07-25 20:07:35 +00:00
type: String,
required: true,
},
2023-08-22 18:14:15 +00:00
imageUrl: {
2023-07-25 20:07:35 +00:00
type: String,
required: true,
},
2023-08-22 18:14:15 +00:00
link: {
type: String,
required: true,
},
2023-08-22 18:14:15 +00:00
title: {
2023-07-25 20:07:35 +00:00
type: String,
required: true,
},
},
2023-08-24 21:19:54 +00:00
computed: {
toUrl() {
return `/${btoa(this.link)}`
2023-07-25 20:07:35 +00:00
},
},
}
</script>
<style scoped>
img {
height: 100%;
width: 100%;
}
</style>