fix: address code-review findings from pass 1 + 2 (#8)

- Fix saveCourseToDB returning 0 on conflict by falling back to SELECT
- Fix inactive layouts showing 'Never played' when last_played exists
- Add .icon-btn.spinning to courses.css for refresh button feedback
- Remove duplicate .btn-primary from courses.css (use shared.css version)
- Tokenize rating tier colors into --rating-tier-{high,mid,low} CSS vars
- Convert var to const/let throughout courses.js
- Fix logger.error calls to use {err} object form (pino convention)
- Extract RATING_TIER_HIGH/MID constants in course-layouts.ejs scriptlet
- Remove dead href='#' View all link from courses.ejs (deferred)
- Pass total prop explicitly from course-table.ejs to course-cards.ejs
- Remove dead #search-results-info selector from mobile.css
- Remove redundant .replace(/"/g, '"') from data attributes in course-table.ejs
This commit is contained in:
Samuel Enocsson
2026-05-25 09:54:15 +02:00
parent 4bbf6d9728
commit 9cb78c9c98
9 changed files with 97 additions and 96 deletions
+1 -1
View File
@@ -23,7 +23,7 @@
<div class="results-bar">
<span class="results-count">Showing <strong id="visible-count">0</strong> of <strong id="total-count">0</strong> courses</span>
<a class="results-link" href="#">View all &rarr;</a>
<%# "View all" link deferred — design spec includes it but functionality not yet implemented %>
</div>
<div id="course-table-region" hx-get="/partials/course-table" hx-trigger="load, refresh from:body" hx-swap="innerHTML"></div>