From 7be09dd12d7d2a967ec106b9609fcb5fa087391c Mon Sep 17 00:00:00 2001 From: valere Date: Tue, 10 Feb 2026 07:31:31 +0100 Subject: [PATCH] WIP starbook demo --- app/app.vue | 32 ++- app/components/Card.vue | 30 +- app/components/Platine.vue | 312 ++++++++++---------- app/components/Rank.vue | 24 ++ app/components/UI/CloseButton.vue | 39 +++ app/components/{ => UI}/PlayButton.vue | 10 +- app/pages/card/[slug].vue | 4 +- app/pages/random.vue | 83 +++++- app/utils/platine/disc.ts | 180 +++++++++--- app/utils/platine/sampler.ts | 20 ++ appOLDD/components/Platine.vue | 198 ------------- appOLDD/platine-tools/disc.ts | 382 ------------------------- appOLDD/platine-tools/sampler.ts | 95 ------ assets/scss/z-index.scss | 3 - data/music.db | Bin 12288 -> 20480 bytes nuxt.config.ts | 6 + tailwind.config.js | 12 + 17 files changed, 516 insertions(+), 914 deletions(-) create mode 100644 app/components/Rank.vue create mode 100644 app/components/UI/CloseButton.vue rename app/components/{ => UI}/PlayButton.vue (56%) delete mode 100644 appOLDD/components/Platine.vue delete mode 100644 appOLDD/platine-tools/disc.ts delete mode 100644 appOLDD/platine-tools/sampler.ts delete mode 100644 assets/scss/z-index.scss diff --git a/app/app.vue b/app/app.vue index 88a8908..a3e54c3 100644 --- a/app/app.vue +++ b/app/app.vue @@ -1,8 +1,36 @@ + + diff --git a/app/components/Card.vue b/app/components/Card.vue index 68deed7..c8171c6 100644 --- a/app/components/Card.vue +++ b/app/components/Card.vue @@ -4,27 +4,19 @@ isFaceUp ? 'face-up' : 'face-down', showPlayButtonFaceUp ? 'show-play-button-face-up' : '' ]" :tabindex="props.tabindex" :aria-disabled="false" @click="$emit('click', $event)" - @keydown.enter="$emit('click', $event)" @keydown.space.prevent="$emit('click', $event)"> + @keydown.enter="$emit('click', $event)">
+ class="face-up backdrop-blur-sm border-2 z-10 card w-56 h-80 p-3 hover:shadow-xl hover:scale-110 transition-all shadow-lg flex flex-col overflow-hidden"> -
-
- -
-
- {{ props.card?.rank }} -
-
+ -
- +
+ Pochette de l'album + @load="$emit('image-loaded', $event)" class="pochette w-full h-full object-cover object-center" />
@@ -44,7 +36,7 @@ class="face-down backdrop-blur-sm z-10 card w-56 h-80 p-3 bg-opacity-10 bg-white rounded-2xl shadow-lg flex flex-col overflow-hidden select-none">
- +
@@ -75,7 +67,6 @@ const props = withDefaults(defineProps<{ import { getYearColor } from '~/utils/colors' const cardColor = computed(() => getYearColor(props.card.year || 0)) -const isRedCard = computed(() => (props.card?.suit === '♥' || props.card?.suit === '♦')) /* loading states of the card */ const isApiLoaded = ref(false) @@ -103,6 +94,10 @@ const isTrackLoaded = ref(false) perspective: 1000px; @apply transition-all scale-100 w-56 h-80 min-w-56 min-h-80; + .pochette { + border-radius: 0.75rem; + } + .flip-inner { position: relative; width: 100%; @@ -123,6 +118,7 @@ const isTrackLoaded = ref(false) } .face-up { + border-radius: 1rem; transform: rotateY(0deg); transition: box-shadow 0.6s; } @@ -158,7 +154,7 @@ const isTrackLoaded = ref(false) @apply shadow-2xl; transition: box-shadow 0.6s, - transform 0.6s; + transform 6s; } } diff --git a/app/components/Platine.vue b/app/components/Platine.vue index 3c4d8b4..bbd0a49 100644 --- a/app/components/Platine.vue +++ b/app/components/Platine.vue @@ -1,49 +1,43 @@ + + \ No newline at end of file diff --git a/app/components/UI/CloseButton.vue b/app/components/UI/CloseButton.vue new file mode 100644 index 0000000..428bd00 --- /dev/null +++ b/app/components/UI/CloseButton.vue @@ -0,0 +1,39 @@ + + + + + \ No newline at end of file diff --git a/app/components/PlayButton.vue b/app/components/UI/PlayButton.vue similarity index 56% rename from app/components/PlayButton.vue rename to app/components/UI/PlayButton.vue index f5b82b9..c8065e6 100644 --- a/app/components/PlayButton.vue +++ b/app/components/UI/PlayButton.vue @@ -1,7 +1,5 @@