diff options
| author | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-09 01:14:57 -0700 |
|---|---|---|
| committer | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-09 01:14:57 -0700 |
| commit | 65466fd5c645e546707ce699b4ea289f894fea20 (patch) | |
| tree | debb3768e8d84000a8c32d2df8361bb42a457523 /static | |
| parent | 9f82415366e6220651351007c2dc0ef21df7ff85 (diff) | |
Auto-select today's date on add form; clean up rewatch history panel
- Default date_watched to today when adding a new film (JS, en-CA locale)
- Match rewatch history by tmdb_id when available, fall back to title
- Replace inline styles in rewatch section with CSS classes
- Simplify redundant Jinja conditions (rewatch_history and, loop.length > 1)
- Move review-panel margin-top hack to .review-panel-spaced class
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'static')
| -rw-r--r-- | static/app.js | 5 | ||||
| -rw-r--r-- | static/styles.css | 50 |
2 files changed, 55 insertions, 0 deletions
diff --git a/static/app.js b/static/app.js index fae2dbd..db3e694 100644 --- a/static/app.js +++ b/static/app.js @@ -1,3 +1,8 @@ +const dateDefault = document.querySelector("[data-default-today]"); +if (dateDefault) { + dateDefault.value = new Date().toLocaleDateString("en-CA"); +} + // Hamburger menu toggle const menuToggle = document.querySelector("#menu-toggle"); const navActions = document.querySelector("#nav-actions"); diff --git a/static/styles.css b/static/styles.css index 9507439..24340e7 100644 --- a/static/styles.css +++ b/static/styles.css @@ -488,6 +488,52 @@ h2 { margin-bottom: 10px; } +.rewatch-list { + display: flex; + flex-direction: column; + gap: 12px; +} + +.rewatch-row { + display: flex; + justify-content: space-between; + align-items: center; + padding-bottom: 12px; + border-bottom: 1px solid var(--line); +} + +.rewatch-meta { + margin: 0 0 4px; + color: var(--muted); + font-size: 0.9rem; +} + +.rewatch-rating { + margin: 0; + display: flex; + align-items: center; + gap: 8px; +} + +.rewatch-stars { + color: var(--accent); +} + +.rewatch-companion { + color: var(--muted); + font-size: 0.9rem; +} + +.rewatch-delta { + color: var(--subtle); + font-size: 0.85rem; + text-align: right; +} + +.rewatch-delta-rating { + color: var(--accent); +} + .detail-tagline { margin: 0 0 12px; color: var(--accent-strong); @@ -895,6 +941,10 @@ textarea:focus { grid-column: 1 / -1; } +.review-panel-spaced { + margin-top: 24px; +} + .year-bars { display: grid; gap: 10px; |
