Refactoring complet : contenu livre, config unique, routes, admin et light mode

- Source unique : supprime app/data/librodrome.config.yml, renomme site/ en bookplayer.config.yml
- Morceaux : renommés avec slugs lisibles, fichiers audio renommés, inversion ch2↔ch3 corrigée
- Chapitres : 11 fichiers .md réécrits avec le vrai contenu du livre (synthèse fidèle du PDF)
- Routes : /lire → /modele-eco, /ecouter → /en-musique, redirections 301
- Admin chapitres : champs structurés (titre, description, temps lecture), compteur mots
- Éditeur markdown : mode split, plein écran, support Tab, meilleur rendu aperçu
- Admin morceaux : drag & drop, ajout/suppression, gestion playlist
- Light mode : palettes printemps/été plus saturées et contrastées, teintes primary
- Raccourcis clavier player : espace, flèches gauche/droite
- Paroles : toggle supprimé, toujours visibles et scrollables
- Nouvelles pages : autonomie, evenement

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Yvv
2026-02-26 20:20:52 +01:00
parent 4fce862df6
commit 2f438d9d7a
70 changed files with 2125 additions and 1385 deletions

View File

@@ -1,38 +1,45 @@
<template>
<div
class="card-surface flex cursor-pointer items-center gap-4"
:class="{ 'border-primary/40! shadow-primary/10!': isCurrent }"
@click="handlePlay"
>
<!-- Play indicator / cover -->
<div class="song-item-wrapper">
<div
class="flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-lg bg-surface-200"
:class="{ 'animate-glow-pulse': isCurrent && store.isPlaying }"
class="card-surface flex cursor-pointer items-center gap-4"
:class="{ 'border-primary/40! shadow-primary/10!': isCurrent }"
@click="handlePlay"
>
<!-- Play indicator / cover -->
<div
v-if="isCurrent && store.isPlaying"
class="i-lucide-volume-2 h-5 w-5 text-primary"
/>
<div
v-else
class="i-lucide-play h-5 w-5 text-white/40 transition-colors group-hover:text-primary"
/>
class="flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-lg bg-surface-200"
:class="{ 'animate-glow-pulse': isCurrent && store.isPlaying }"
>
<div
v-if="isCurrent && store.isPlaying"
class="i-lucide-volume-2 h-5 w-5 text-primary"
/>
<div
v-else
class="i-lucide-play h-5 w-5 text-white/40 transition-colors group-hover:text-primary"
/>
</div>
<!-- Info -->
<div class="min-w-0 flex-1">
<p class="truncate text-sm font-medium" :class="isCurrent ? 'text-primary' : 'text-white'">
{{ song.title }}
</p>
<p class="truncate text-xs text-white/40">
{{ song.artist }}
</p>
</div>
<!-- Duration -->
<span class="font-mono text-xs text-white/30 flex-shrink-0">
{{ formatDuration(song.duration) }}
</span>
</div>
<!-- Info -->
<div class="min-w-0 flex-1">
<p class="truncate text-sm font-medium" :class="isCurrent ? 'text-primary' : 'text-white'">
{{ song.title }}
</p>
<p class="truncate text-xs text-white/40">
{{ song.artist }}
</p>
<!-- Lyrics panel (always visible) -->
<div v-if="song.lyrics" class="lyrics-panel">
<pre class="lyrics-text">{{ song.lyrics }}</pre>
</div>
<!-- Duration -->
<span class="font-mono text-xs text-white/30 flex-shrink-0">
{{ formatDuration(song.duration) }}
</span>
</div>
</template>
@@ -63,3 +70,23 @@ function formatDuration(seconds: number): string {
return `${mins}:${secs.toString().padStart(2, '0')}`
}
</script>
<style scoped>
.lyrics-panel {
margin-top: 0.25rem;
padding: 1rem 1.25rem;
border-radius: 0.75rem;
background: hsl(var(--color-surface));
border: 1px solid hsl(var(--color-text) / 0.08);
max-height: 24rem;
overflow-y: auto;
}
.lyrics-text {
white-space: pre-wrap;
font-family: inherit;
font-size: 0.875rem;
line-height: 1.7;
color: hsl(var(--color-text) / 0.6);
}
</style>

View File

@@ -1,21 +1,9 @@
<template>
<div v-if="song.lyrics" class="rounded-xl bg-surface p-6">
<button
class="flex w-full items-center justify-between text-left"
@click="isOpen = !isOpen"
>
<span class="font-display text-sm font-semibold text-white/70">Paroles</span>
<div
:class="isOpen ? 'i-lucide-chevron-up' : 'i-lucide-chevron-down'"
class="h-4 w-4 text-white/40 transition-transform"
/>
</button>
<Transition name="lyrics-expand">
<div v-if="isOpen" class="mt-4">
<pre class="whitespace-pre-wrap font-sans text-sm leading-relaxed text-white/60">{{ song.lyrics }}</pre>
</div>
</Transition>
<span class="font-display text-sm font-semibold text-white/70">Paroles</span>
<div class="mt-4 max-h-96 overflow-y-auto">
<pre class="whitespace-pre-wrap font-sans text-sm leading-relaxed text-white/60">{{ song.lyrics }}</pre>
</div>
</div>
</template>
@@ -25,26 +13,4 @@ import type { Song } from '~/types/song'
defineProps<{
song: Song
}>()
const isOpen = ref(false)
</script>
<style scoped>
.lyrics-expand-enter-active,
.lyrics-expand-leave-active {
transition: all 0.3s var(--ease-out-expo);
overflow: hidden;
}
.lyrics-expand-enter-from,
.lyrics-expand-leave-to {
max-height: 0;
opacity: 0;
}
.lyrics-expand-enter-to,
.lyrics-expand-leave-from {
max-height: 500px;
opacity: 1;
}
</style>