repod/src/components/Discover/TopItem.vue
Michel Roux fb21092dff
All checks were successful
repod / nextcloud (push) Successful in 1m7s
repod / nodejs (push) Successful in 1m47s
Subscription ok
2023-08-24 22:29:11 +02:00

45 lines
575 B
Vue

<template>
<router-link :to="toUrl(link)">
<img :alt="`${title} - ${author}`"
:src="imageUrl"
:title="author">
</router-link>
</template>
<script>
export default {
name: 'TopItem',
components: {},
props: {
author: {
type: String,
required: true,
},
imageUrl: {
type: String,
required: true,
},
link: {
type: String,
required: true,
},
title: {
type: String,
required: true,
},
},
methods: {
toUrl(url) {
return `/${btoa(url)}`
},
},
}
</script>
<style scoped>
img {
height: 100%;
width: 100%;
}
</style>