forked from DebaucheryLibrarian/traxxx
61 lines
1.0 KiB
Vue
61 lines
1.0 KiB
Vue
<template>
|
|
<a
|
|
:href="`/tag/${tag.slug}`"
|
|
:title="tag.name"
|
|
class="tile"
|
|
>
|
|
<img
|
|
v-if="tag.poster"
|
|
:src="`/img/${tag.poster.thumbnail}`"
|
|
:alt="tag.name"
|
|
class="poster"
|
|
>
|
|
|
|
<span class="title">{{ tag.name }}</span>
|
|
</a>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
tag: {
|
|
type: Object,
|
|
default: null,
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
@import 'theme';
|
|
|
|
.tile {
|
|
color: $text;
|
|
background: $background;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
box-sizing: border-box;
|
|
box-shadow: 0 0 3px rgba(0, 0, 0, .25);
|
|
text-align: center;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.poster {
|
|
width: 100%;
|
|
height: 14rem;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.title {
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 1rem;
|
|
padding: .5rem 1rem;
|
|
font-weight: bold;
|
|
text-transform: capitalize;
|
|
}
|
|
</style>
|