Checklist styling update #53

Merged
quoije merged 5 commits from cursor/checklist-styling-update-82ef into 2026-video.backend 2025-12-22 05:36:34 -05:00
2 changed files with 45 additions and 30 deletions
Showing only changes of commit c3ab04f805 - Show all commits
+34 -22
View File
@@ -44,11 +44,6 @@
.navbar-toggler-icon { .navbar-toggler-icon {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='white' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='white' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
} }
/* New styles for table */
.table-hover tbody tr:hover {
background-color: #f1f1f1;
cursor: pointer;
}
</style> </style>
</head> </head>
<body class="bg-light page-loading"> <body class="bg-light page-loading">
@@ -90,25 +85,42 @@
<div class="container mt-5"> <div class="container mt-5">
<h2>Checklist</h2> <h2>Checklist</h2>
<div id="watched-ratio" class="ratio"></div>
<h3 class="fs-6" style="margin-bottom: -1px;">Temps avant les Oscars (<span id="oscar-date-day-month">—</span> <span id="oscar-year">—</span>) - <span id="time-left"></span></h3> <!-- Summary card (match Stats page spacing/structure) -->
<h3 class="fs-6"><span id="movies-per-day"></span></h3> <div class="card shadow-sm mt-3">
<div class="progress my-3"> <div class="card-body">
<div id="progress-bar" class="progress-bar" role="progressbar" style="width: 0%; background-color: red;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div> <div class="d-flex flex-column gap-1">
<div id="watched-ratio" class="fw-semibold">—</div>
<div class="text-muted small">
Temps avant les Oscars (<span id="oscar-date-day-month">—</span> <span id="oscar-year">—</span>) — <span id="time-left">—</span>
</div>
<div class="text-muted small"><span id="movies-per-day"></span></div>
</div>
<div class="progress mt-3" style="height: 10px;">
<div id="progress-bar" class="progress-bar" role="progressbar" style="width: 0%; background-color: red;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" aria-busy="true"></div>
</div>
</div>
</div> </div>
<!-- Table for movies --> <!-- Table for movies -->
<table class="table table-hover movie-table"> <div class="table-responsive mt-3">
<thead> <table class="table table-striped table-hover align-middle movie-table mb-0">
<tr> <thead>
<th scope="col">Vu</th> <tr>
<th scope="col">Titre</th> <th scope="col">Vu</th>
<th scope="col">Date</th> <th scope="col">Titre</th>
</tr> <th scope="col">Date</th>
</thead> </tr>
<tbody id="movie-table-body"> </thead>
<!-- Movie rows will be inserted here --> <tbody id="movie-table-body">
</tbody> <tr>
</table> <td colspan="3" class="text-center py-4 text-muted" aria-live="polite" aria-busy="true">Chargement…</td>
</tr>
</tbody>
</table>
</div>
<br><br> <br><br>
</div> </div>
+11 -8
View File
@@ -453,12 +453,9 @@ window.addEventListener('DOMContentLoaded', async function () {
<td id="watched-date-${movie.imdb_id}">${watchedDate}</td> <td id="watched-date-${movie.imdb_id}">${watchedDate}</td>
`; `;
// Set initial row color based on watched state // Use Bootstrap table state classes (matches Stats page styling better than custom backgrounds)
if (watchedMovie) { movieRow.classList.toggle('table-success', Boolean(watchedMovie));
movieRow.style.backgroundColor = 'rgba(144, 238, 144, 0.6)'; // Lighter light green with transparency movieRow.classList.toggle('table-danger', !watchedMovie);
} else {
movieRow.style.backgroundColor = 'rgba(255, 99, 71, 0.6)'; // Lighter light red with transparency
}
movieTableBody.appendChild(movieRow); movieTableBody.appendChild(movieRow);
@@ -478,10 +475,16 @@ window.addEventListener('DOMContentLoaded', async function () {
if (isChecked) { if (isChecked) {
watchedDateCell.textContent = new Date().toLocaleString(); watchedDateCell.textContent = new Date().toLocaleString();
row.style.backgroundColor = 'rgba(144, 238, 144, 0.6)'; // Apply light green with transparency if (row) {
row.classList.add('table-success');
row.classList.remove('table-danger');
}
} else { } else {
watchedDateCell.textContent = ''; watchedDateCell.textContent = '';
row.style.backgroundColor = 'rgba(255, 99, 71, 0.6)'; // Apply light red with transparency if (row) {
row.classList.add('table-danger');
row.classList.remove('table-success');
}
} }
await fetch('/api/movies/users/updateWatchedMovies', { await fetch('/api/movies/users/updateWatchedMovies', {