From c5414b6f432db9831b0387454926dde70d276b09 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sat, 24 Sep 2022 16:29:57 +0200 Subject: Use preview-image for cover --- components/ModelBoxCard.vue | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) (limited to 'components') diff --git a/components/ModelBoxCard.vue b/components/ModelBoxCard.vue index 6ac9f43..a6085b7 100644 --- a/components/ModelBoxCard.vue +++ b/components/ModelBoxCard.vue @@ -3,10 +3,11 @@ class="hover:ease-out hover:shadow-md" ) a(:href="'/models/'+model.id") - .image.bg-gray-900.rounded-xl.w-full.h-48 - img( - v-if="coverImage >= 0" - :src="baseAPI + '' + model.uploads[coverImage].filepath" + .image.bg-gray-900.rounded-xl.w-full.h-48.overflow-hidden + file-preview( + :path="model.uploads[0].filepath" + bg="#111827" + v-if="model.uploads" ) .space-y-3.mt-5 @@ -24,38 +25,21 @@