From 26931c734b552303b66e91dd35b2232c76589ca5 Mon Sep 17 00:00:00 2001 From: Arthur Lefebvre Date: Wed, 8 Apr 2026 14:36:40 +0200 Subject: [PATCH] Improve collections view - Add opacity on book covers - Enlarge book covers --- front/src/CollectionListElement.vue | 21 +++++++++++++++++---- internal/query/query.go | 4 ++-- 2 files changed, 19 insertions(+), 6 deletions(-) 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 '' + } +}