diff --git a/front/src/CollectionListElement.vue b/front/src/CollectionListElement.vue index 1689024..c678d60 100644 --- a/front/src/CollectionListElement.vue +++ b/front/src/CollectionListElement.vue @@ -6,6 +6,7 @@ const props = defineProps({ id: Number, name: String, books: Array, + count: Number, }) const router = useRouter() @@ -14,6 +15,14 @@ function goToCollection() { const collectionId = props.id router.push(`/collection/${props.id}`) } + +function setBookOpacity(index) { + if (props.books.length > 7 && index > 3) { + return 'opacity: ' + (100 - index * 13) + '%;' + } else { + return '' + } +}