frontend/src/views/CollectionView/CollectionMerchCard.vue

61 lines
1,012 B
Vue
Raw Normal View History

2025-09-18 21:05:19 +03:00
<script setup>
2025-09-16 21:26:36 +03:00
import BoxIcon from '@/components/icons/BoxIcon.vue'
2025-09-18 21:05:19 +03:00
defineProps({
merch: {
type: Object,
required: true,
}
})
2025-09-16 21:26:36 +03:00
</script>
<template>
2025-09-25 20:04:48 +03:00
<n-card class="responsive-card">
<template #header>
<h3 class="card-title">{{ merch.name }}</h3>
</template>
2025-09-16 21:26:36 +03:00
<template #cover>
<div class="cover-wrapper">
<BoxIcon />
</div>
</template>
</n-card>
</template>
<style scoped>
.responsive-card {
2025-09-25 20:04:48 +03:00
width: 180px;
height: 240px;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.card-title {
margin: 0;
font-size: 14px;
font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
white-space: normal;
2025-09-16 21:26:36 +03:00
}
.cover-wrapper {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
padding: 12px 0;
overflow: hidden;
}
.cover-wrapper :deep(svg) {
width: 100%;
height: auto;
max-width: 80%;
}
</style>