From d14cc414b54f37d3e951ffa285c1f6412c35a7a6 Mon Sep 17 00:00:00 2001 From: Shinuwa Date: Wed, 2 Dec 2026 11:32:08 +0100 Subject: [PATCH] Fix unreadable dropdowns and tidy the jukebox page on phones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Section dropdowns had a transparent background and white text: Chrome on Windows drew their options on white, so they could not be read. Selects and their options now get a solid dark background. Also style the file picker button and checkboxes, keep the drag-and-drop badge on one line, and on phones shrink the illustration, lay the player buttons out on two columns and fit track and section buttons on fewer lines. Dates are shown in short French ("2 déc. 2026, 11:24"). Co-Authored-By: Claude Opus 5.5 --- public/scripts/common.js | 10 +++--- public/style/styles.css | 70 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 74 insertions(+), 6 deletions(-) diff --git a/public/scripts/common.js b/public/scripts/common.js index a08fe48..24a47f6 100644 --- a/public/scripts/common.js +++ b/public/scripts/common.js @@ -115,13 +115,13 @@ export function formatDuration(seconds) { : `${minutes}:${secs}`; } +// Date courte en français, sans les secondes : « 2 déc. 2026, 11:24 ». +const DATE_FORMAT = new Intl.DateTimeFormat("fr-FR", { dateStyle: "medium", timeStyle: "short" }); + export function formatDate(value) { if (!value) return "?"; - try { - return new Date(value).toLocaleString(); - } catch (_) { - return value; - } + const date = new Date(value); + return Number.isNaN(date.getTime()) ? String(value) : DATE_FORMAT.format(date); } export function createApiClient({ getApiKey, basePath = "" } = {}) { diff --git a/public/style/styles.css b/public/style/styles.css index 6e0b4ec..79cb218 100644 --- a/public/style/styles.css +++ b/public/style/styles.css @@ -30,6 +30,9 @@ --border: rgba(255, 255, 255, 0.08); --border-strong: rgba(255, 255, 255, 0.12); --surface-strong: rgba(255, 255, 255, 0.15); + /* Fond plein des listes déroulantes : le navigateur ne sait pas dessiner leurs options sur un + fond transparent et les met sur du blanc, sous un texte blanc. */ + --bg-raised: #21172f; --shadow: rgba(2, 0, 8, 0.45); --gradient: radial-gradient(circle at 20% 20%, #2d1a49, transparent 45%), radial-gradient(circle at 80% 0%, #551e8c, transparent 40%), @@ -69,6 +72,8 @@ body { font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif; background: var(--gradient), var(--bg); color: var(--text); + /* Cases à cocher et barres de progression natives aux couleurs du site. */ + accent-color: var(--accent); } main { @@ -219,6 +224,7 @@ p { color: var(--accent); border-radius: 12px; font-size: 0.85rem; + white-space: nowrap; } /* ------------------------------------------------------------------------------------------------ @@ -248,8 +254,38 @@ textarea { font-size: 1rem; } +select { + background-color: var(--bg-raised); + cursor: pointer; +} + +select option, +select optgroup { + background-color: var(--bg-raised); + color: var(--text); +} + input[type="file"] { padding: 0.5rem; + color: var(--muted); + cursor: pointer; + + &::file-selector-button { + margin-right: 0.75rem; + padding: 0.4rem 1rem; + border: none; + border-radius: 999px; + background: var(--surface-strong); + color: var(--text); + font: inherit; + font-size: 0.9rem; + font-weight: 600; + cursor: pointer; + } + + &:hover::file-selector-button { + background: color-mix(in srgb, var(--accent) 35%, transparent); + } } input:focus, @@ -861,11 +897,31 @@ a.btn { width: 100%; } - .control-group, + /* L'illustration ne doit pas occuper tout le premier écran. */ + .hero .hero__visual img { + max-width: 150px; + } + + .hero { + padding: 1.5rem 1rem; + gap: 1rem; + } + .url-form__row { flex-direction: column; } + /* Boutons du lecteur sur deux colonnes ; « Stop & vider la file » seul en bas, à l'écart. */ + .control-group { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 0.5rem; + + & .btn--danger { + grid-column: 1 / -1; + } + } + .upload-list__item { grid-template-columns: 1fr; gap: 0.25rem; @@ -900,9 +956,21 @@ a.btn { height: 96px; } + /* Boutons resserrés : « Ajouter, Modifier, Supprimer » tiennent sur une ligne. */ .media-item__actions .btn, .library-section__toolbar .btn { width: auto; flex: 1; + padding-inline: 0.5rem; + white-space: nowrap; + } + + /* Flèches de déplacement à leur taille, sans s'étirer sur la ligne. */ + .library-section__toolbar .btn:is([data-action="up"], [data-action="down"]) { + flex: 0 0 2.75rem; + } + + .panel { + padding: 1.25rem; } }