Retouches après captures : minuteur sous la barre d'action, onboarding, correction des séries au temps ; docs/design.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
af92c021e2
commit
dadd4088fc
+9
-2
@@ -1,6 +1,13 @@
|
||||
/* Base : remise à zéro, typographie, mise en page de l'écran. */
|
||||
*, *::before, *::after { box-sizing: border-box; }
|
||||
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
|
||||
html {
|
||||
-webkit-text-size-adjust: 100%; text-size-adjust: 100%;
|
||||
/* Le défilement vers un élément (focus, lien) tient compte de l'en-tête
|
||||
collant de l'exercice et des barres fixées en bas. */
|
||||
scroll-padding-top: 72px;
|
||||
scroll-padding-bottom: calc(var(--action-bar-h) + var(--space-4));
|
||||
}
|
||||
html:has(body.has-timer) { scroll-padding-bottom: calc(var(--action-bar-h) + var(--timer-h) + var(--space-4)); }
|
||||
html, body { margin: 0; padding: 0; }
|
||||
body {
|
||||
background: var(--bg);
|
||||
@@ -13,7 +20,7 @@ body {
|
||||
/* place pour la barre d'action collée en bas */
|
||||
padding-bottom: calc(var(--action-bar-h) + env(safe-area-inset-bottom));
|
||||
}
|
||||
body.has-timer { padding-bottom: calc(var(--action-bar-h) + 96px + env(safe-area-inset-bottom)); }
|
||||
body.has-timer { padding-bottom: calc(var(--action-bar-h) + var(--timer-h) + env(safe-area-inset-bottom)); }
|
||||
|
||||
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
|
||||
|
||||
|
||||
@@ -46,6 +46,9 @@
|
||||
display: flex; align-items: center; gap: var(--space-3);
|
||||
}
|
||||
.action-bar__in > .btn { flex: 1; }
|
||||
/* Le minuteur s'empile sous la barre d'action : « Terminer la séance » reste
|
||||
accessible pendant un repos. */
|
||||
body.has-timer .action-bar { bottom: calc(var(--timer-h) + env(safe-area-inset-bottom)); padding-bottom: 0; border-top-color: transparent; }
|
||||
.action-bar__meta { color: var(--text-muted); font-family: var(--font-display); font-weight: 600; font-size: var(--fs-md); white-space: nowrap; }
|
||||
|
||||
/* ---- Cartes ------------------------------------------------------------- */
|
||||
@@ -146,6 +149,16 @@ a.card--today:hover { border-color: var(--line-strong); border-left-color: var(-
|
||||
display: grid; place-items: center; background: var(--primary); color: var(--on-primary);
|
||||
font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg);
|
||||
}
|
||||
.card--onboarding { border-left: 6px solid var(--primary); padding: var(--space-5) var(--space-4); }
|
||||
.how__step strong { font-weight: 700; }
|
||||
.how__step span { color: var(--text-muted); }
|
||||
.status--info { color: var(--text); }
|
||||
.copy-line { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); }
|
||||
.copy-line__text {
|
||||
flex: 1; min-width: 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
|
||||
background: var(--surface-sunk); color: var(--text); border: 1px solid var(--line);
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-xs); overflow-wrap: anywhere;
|
||||
}
|
||||
.alt { display: grid; gap: var(--space-2); margin-top: var(--space-5); }
|
||||
.manual-copy { margin-top: var(--space-3); display: grid; gap: var(--space-2); }
|
||||
|
||||
@@ -194,6 +207,7 @@ a.card--today:hover { border-color: var(--line-strong); border-left-color: var(-
|
||||
transition: opacity .2s, transform .2s;
|
||||
}
|
||||
.toast--on { opacity: 1; transform: translate(-50%, 0); }
|
||||
body.has-timer .toast { bottom: calc(var(--action-bar-h) + var(--timer-h) + var(--space-4) + env(safe-area-inset-bottom)); }
|
||||
|
||||
/* ---- Minuteur ----------------------------------------------------------- */
|
||||
.timer {
|
||||
@@ -207,7 +221,7 @@ a.card--today:hover { border-color: var(--line-strong); border-left-color: var(-
|
||||
content: ""; position: absolute; inset: 0; background: var(--text);
|
||||
transform-origin: left; transform: scaleX(var(--progress, 1)); transition: transform .25s linear;
|
||||
}
|
||||
.timer__in { max-width: var(--max); margin: 0 auto; padding: var(--space-3) var(--gutter); display: flex; align-items: center; gap: var(--space-3); }
|
||||
.timer__in { max-width: var(--max); height: calc(var(--timer-h) - 4px); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: var(--space-3); }
|
||||
.timer__read { flex: 1; min-width: 0; }
|
||||
.timer__label { font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.timer__time { font-size: 2.75rem; line-height: 1; }
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
.effort[data-effort="ok"] { --c: var(--effort-ok); }
|
||||
.effort[data-effort="hard"] { --c: var(--effort-hard); }
|
||||
.effort[data-effort="failure"] { --c: var(--effort-failure); }
|
||||
.effort[aria-pressed="true"] { border-color: var(--c); background: var(--surface-2); }
|
||||
.effort[aria-pressed="true"] { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
|
||||
.effort__label { font-family: var(--font-display); text-transform: uppercase; font-weight: 700; letter-spacing: .06em; font-size: var(--fs-lg); color: var(--c); }
|
||||
.effort__hint { font-size: var(--fs-xs); color: var(--text-muted); }
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
--gutter: 16px;
|
||||
--max: 560px;
|
||||
--action-bar-h: 80px;
|
||||
--timer-h: 80px; /* minuteur, barre de progression comprise */
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
|
||||
@@ -14,7 +14,7 @@ export const AI_GUIDE_URL = "https://ia-fit.sans.pub/ia.md";
|
||||
* @param {{store: import("./store.js").Store}} o
|
||||
*/
|
||||
export function onboarding({ store }) {
|
||||
const status = h("p", { class: "status status--ok", role: "status", "aria-live": "polite" });
|
||||
const status = h("p", { class: "status status--info", role: "status", "aria-live": "polite" });
|
||||
const manual = h("div", { class: "manual-copy", hidden: true });
|
||||
|
||||
const copyBrief = async () => {
|
||||
@@ -72,7 +72,7 @@ export function onboarding({ store }) {
|
||||
h("h1", { class: "title title--hero" }, "Ton programme, construit avec ton IA"),
|
||||
h("p", { class: "lede" }, "Puis suivi séance par séance : séries, charges, repos. Tes données restent sur ton appareil, sans compte.")),
|
||||
|
||||
h("section", { class: "card card--today", "aria-labelledby": "onb-how" },
|
||||
h("section", { class: "card card--onboarding", "aria-labelledby": "onb-how" },
|
||||
h("h2", { class: "card__title", id: "onb-how" }, "En trois gestes"),
|
||||
h("ol", { class: "how" },
|
||||
h("li", { class: "how__step" }, h("strong", null, "Copie le texte"), h("span", null, " et colle-le dans ton IA : Claude, ChatGPT, Le Chat…")),
|
||||
@@ -80,11 +80,10 @@ export function onboarding({ store }) {
|
||||
h("li", { class: "how__step" }, h("strong", null, "Touche le lien qu'elle te renvoie"), h("span", null, " : ton programme s'affiche ici, et tu le valides."))),
|
||||
status,
|
||||
manual,
|
||||
h("p", { class: "card__hint" },
|
||||
"Ou dis simplement à ton IA : ",
|
||||
h("code", { class: "inline-code" }, `lis ${AI_GUIDE_URL}`),
|
||||
" ",
|
||||
h("button", { type: "button", class: "link-btn", on: { click: copyGuide } }, "Copier")),
|
||||
h("p", { class: "card__hint" }, "Ou, si ton IA sait lire une page web, dis-lui simplement :"),
|
||||
h("div", { class: "copy-line" },
|
||||
h("code", { class: "copy-line__text" }, `lis ${AI_GUIDE_URL}`),
|
||||
h("button", { type: "button", class: "btn btn--sm btn--ghost", on: { click: copyGuide } }, "Copier")),
|
||||
h("p", { class: "card__hint" }, "Connecteur MCP pour ton IA : bientôt.")),
|
||||
|
||||
h("section", { class: "alt", "aria-label": "Autres façons de commencer" },
|
||||
|
||||
@@ -90,7 +90,10 @@ export function historyEditScreen({ store, nav, id }) {
|
||||
replace(sets,
|
||||
x.sets.map((s, i) => h("div", { class: "edit-set" },
|
||||
h("span", { class: "edit-set__n" }, `Série ${i + 1}`),
|
||||
numberField(`Répétitions de la série ${i + 1}, ${x.name}`, s.reps, (v) => { s.reps = v === null ? null : Math.round(v); }, "rép."))),
|
||||
// Série au temps : la durée est celle de l'exercice, pas de répétitions à corriger.
|
||||
usesTime(x.tracking) && s.reps === null
|
||||
? h("span", { class: "muted" }, "Faite")
|
||||
: numberField(`Répétitions de la série ${i + 1}, ${x.name}`, s.reps, (v) => { s.reps = v === null ? null : Math.round(v); }, "rép."))),
|
||||
h("div", { class: "edit-sets__btns" },
|
||||
h("button", { type: "button", class: "btn btn--sm", on: { click: () => {
|
||||
const prev = x.sets[x.sets.length - 1];
|
||||
|
||||
@@ -100,7 +100,7 @@ export function sessionScreen({ store, key, nav, timer }) {
|
||||
if (!c.complete) {
|
||||
const lines = [];
|
||||
if (c.missing.length)
|
||||
lines.push(`${plural(c.missing.length, "exercice")} pas commencé${c.missing.length > 1 ? "s" : ""} : ${c.missing.slice(0, 3).join(", ")}${c.missing.length > 3 ? "…" : ""}.`);
|
||||
lines.push(`${plural(c.missing.length, "exercice")} pas commencé${c.missing.length > 1 ? "s" : ""} : ${c.missing.slice(0, 3).join(", ")}${c.missing.length > 3 ? "…" : "."}`);
|
||||
if (c.partial.length) lines.push(`${plural(c.partial.length, "exercice")} incomplet${c.partial.length > 1 ? "s" : ""}.`);
|
||||
lines.push("Tu pourras la corriger ensuite depuis l'historique.");
|
||||
const ok = await confirmDialog({ title: "La séance n'est pas finie", lines, confirm: "Enregistrer quand même", cancel: "Continuer la séance" });
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ export function createTimer() {
|
||||
if (tick) clearInterval(tick);
|
||||
tick = null;
|
||||
vibrate(work ? [300, 120, 300, 120, 300] : [180, 90, 180]);
|
||||
label.textContent = work ? `${labelText} · série terminée` : endText;
|
||||
label.textContent = work ? "Série terminée" : endText;
|
||||
live.textContent = work ? "Série terminée" : endText;
|
||||
close.textContent = "Fermer";
|
||||
const done = onDone;
|
||||
|
||||
Reference in New Issue
Block a user