Add section images, larger covers and track tags
Section images:
- A section gets an optional image, set from its new "Modifier" dialog
(name and image), which replaces "Renommer". It goes through the same
conversion as track covers and is deleted with its section.
- Track and section uploads share routes/coverUpload.js. The cover
folder is created again if it went missing, instead of failing.
Larger images: 72 px for tracks (was 48), 96 px for section headers,
160 px in the player and the edit dialog (was 96); smaller on phones.
Tags:
- Library tracks take free tags, edited in the "Modifier" dialog, which
suggests the tags already in use. Case is ignored ("Épique" and
"épique" are one tag); at most 15 tags of 30 characters.
- A tag bar above the library filters it, and the "Tout ajouter"
buttons (global and per section) then only queue its tracks
(enqueue-all takes a tag). The search also matches tags.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
793765fb79
commit
bda95ca946
13 changed files with 601 additions and 165 deletions
|
|
@ -597,18 +597,19 @@ a.btn {
|
|||
/* Pochette d'un morceau : <img>, ou <div> vide (note de musique) ou à image de fond (aperçu). */
|
||||
.cover {
|
||||
flex-shrink: 0;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 10px;
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
border-radius: 12px;
|
||||
object-fit: cover;
|
||||
background: var(--surface-soft) center / cover no-repeat;
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
/* Lecteur et fenêtre de modification. */
|
||||
.cover--large {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
border-radius: 14px;
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
border-radius: 18px;
|
||||
}
|
||||
|
||||
.cover--empty {
|
||||
|
|
@ -618,16 +619,16 @@ a.btn {
|
|||
|
||||
&::after {
|
||||
content: "♪";
|
||||
font-size: 1.4rem;
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
|
||||
&.cover--large::after {
|
||||
font-size: 2.4rem;
|
||||
font-size: 3.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* Bibliothèque : sections repliables et fenêtre de modification d'un morceau
|
||||
* Bibliothèque : sections repliables et fenêtre de modification (morceau ou section)
|
||||
*/
|
||||
|
||||
.library {
|
||||
|
|
@ -648,9 +649,8 @@ a.btn {
|
|||
|
||||
.library-section__summary {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.25rem 0.75rem;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
padding: 0.85rem 0;
|
||||
cursor: pointer;
|
||||
list-style: none;
|
||||
|
|
@ -670,6 +670,72 @@ a.btn {
|
|||
}
|
||||
}
|
||||
|
||||
/* Nom et nombre de morceaux : restent à côté de l'image, quitte à passer sur deux lignes. */
|
||||
.library-section__heading {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: baseline;
|
||||
gap: 0.25rem 0.75rem;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* Étiquettes : sous un morceau, en barre de filtre au-dessus de la bibliothèque, ou en
|
||||
suggestions dans la fenêtre de modification. Celle du filtre actif est pressée. */
|
||||
.tag-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.35rem;
|
||||
|
||||
&:not(:empty) {
|
||||
margin-top: 0.4rem;
|
||||
}
|
||||
}
|
||||
|
||||
.tag-list--filter:not(:empty) {
|
||||
margin-top: 0.75rem;
|
||||
}
|
||||
|
||||
.tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
padding: 0.2rem 0.7rem;
|
||||
border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
|
||||
border-radius: 999px;
|
||||
background: color-mix(in srgb, var(--accent) 15%, transparent);
|
||||
color: var(--text);
|
||||
font: inherit;
|
||||
font-size: 0.8rem;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: color-mix(in srgb, var(--accent) 30%, transparent);
|
||||
}
|
||||
|
||||
&[aria-pressed="true"] {
|
||||
background: var(--accent-gradient);
|
||||
color: var(--on-accent);
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline: 2px solid #fff;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.tag__count {
|
||||
opacity: 0.7;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
/* Image de la section, entre la flèche et le nom. */
|
||||
.cover--section {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
.library-section__name {
|
||||
font-weight: 600;
|
||||
font-size: 1.05rem;
|
||||
|
|
@ -708,13 +774,13 @@ a.btn {
|
|||
}
|
||||
}
|
||||
|
||||
.track-editor {
|
||||
.cover-editor {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.track-editor__cover-fields {
|
||||
.cover-editor__fields {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
|
@ -819,10 +885,21 @@ a.btn {
|
|||
flex-basis: 100%;
|
||||
}
|
||||
|
||||
.track-editor {
|
||||
.cover-editor {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.cover {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.cover--large,
|
||||
.cover--section {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
}
|
||||
|
||||
.media-item__actions .btn,
|
||||
.library-section__toolbar .btn {
|
||||
width: auto;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue