diff --git a/frontend/index.html b/frontend/index.html index 1eeac51..e061920 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1,5 +1,5 @@ - +
diff --git a/frontend/src/index.css b/frontend/src/index.css index 7cc45fd..0530a0e 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -4,6 +4,7 @@ --text: #e6eef8; --subtle: #9fb3c8; --accent: #79c0ff; + --header-h: 56px; } * { box-sizing: border-box; } @@ -145,7 +146,7 @@ kbd { } /* ====== Site chrome (outside card) ====== */ .site { - min-height: 100%; + min-height: 100dvh; position: relative; /* push-mode: the content will slide right when sidebar is open */ } @@ -153,11 +154,9 @@ kbd { .site-header { position: fixed; z-index: 50; - top: 16px; - left: 16px; - display: flex; - gap: 12px; - align-items: center; + top: 0; left: 16px; right: 16px; + display: flex; gap: 12px; align-items: center; + height: var(--header-h); } .burger { @@ -229,11 +228,10 @@ kbd { /* Main content wrapper; centers the card like before */ .site-content { - min-height: 100%; + min-height: calc(100dvh - var(--header-h)); display: grid; place-items: center; - padding: 24px; - transition: transform 180ms ease; + padding: calc(var(--header-h) + 12px) 24px 32px; } /* ====== Card stays as you had ====== */ diff --git a/frontend/src/pages/ShowsPage.tsx b/frontend/src/pages/ShowsPage.tsx index 0b086c5..79c3e2d 100644 --- a/frontend/src/pages/ShowsPage.tsx +++ b/frontend/src/pages/ShowsPage.tsx @@ -5,15 +5,31 @@ type Show = { ep_num: number; ep_title: string; season_name: string; - start_time: string; // "HH:MM:SS" - playback_length: string; // "HH:MM:SS" or "MM:SS" + start_time: string; + playback_length: string; date_created: string; }; const GET_URL = "/api/v1/shows"; const POST_URL = "/api/v1/current"; -const HHMMSS = /^([01]\d|2[0-3]):[0-5]\d:[0-5]\d$/; +const HHMM = /^(\d{1,2}):([0-5]\d)$/; + +function toHHMMSS(v: string): string | null { + const m = v.trim().match(HHMM); + if (!m) return null; + const h = Math.abs(parseInt(m[1], 10)); + if (h > 23) return null; + const hh = String(h).padStart(2, "0"); + const mm = m[2]; + return `${hh}:${mm}:00`; +} +function toHHMM(v: string): string | null { + const m = v.trim().match(/^(\d{1,2}):([0-5]\d)$/); + if (!m) return null; + const h = Number(m[1]); if (h > 23) return null; + return `${String(h).padStart(2, "0")}:${m[2]}`; +} export default function ShowsPage() { const [shows, setShows] = useStatePick an episode, set optional start time (HH:MM:SS), then “Set current”.
++ エピソードを選択し、必要であれば開始時刻(HH:MM)を入力して「現在のエピソードに設定」を押してください。 +
- {loading &&