diff --git a/content/books/my-first-book copy.md b/content/books/my-first-book copy.md
index 8b4ed59..06a1ac0 100644
--- a/content/books/my-first-book copy.md
+++ b/content/books/my-first-book copy.md
@@ -3,7 +3,7 @@ title: "Dune 2"
year: 1966
media_type: "book"
genre: "Brol"
-rating: 5
+rating: 1
cover: "/covers/dune-placeholder.jpg"
status: "Read"
date_added: "2025-05-20"
diff --git a/src/pages/books.astro b/src/pages/books.astro
index 6d24976..7dfb487 100644
--- a/src/pages/books.astro
+++ b/src/pages/books.astro
@@ -82,18 +82,32 @@ const alpineData = {
{booksFoundCount > 0 ? (
- {allBooksAstro.map(book => (
-
{/* fallback to show all if Alpine not ready */}
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- ))}
+
) : (
@@ -136,15 +150,12 @@ const alpineData = {
let ratingMatch = this.selectedRating === '' || (ratingValue !== undefined && ratingValue !== null && ratingValue >= selectedRatingValue);
- // Temporary debug log for rating filter
- if (this.selectedRating !== '') {
- console.log(
- `Book: "${book.title}", Book Rating: ${ratingValue} (type: ${typeof ratingValue}), ` +
- `Selected Dropdown Rating: "${this.selectedRating}" (type: ${typeof this.selectedRating}), ` +
- `Parsed Selected: ${selectedRatingValue} (type: ${typeof selectedRatingValue}), Match: ${ratingMatch}`
- );
- }
- return genreMatch && ratingMatch;
+ // Debug log for genre and rating filter
+ console.log(
+ `Book: "${book.title}", Book Genre: "${book.genre}", Selected Genre: "${this.selectedGenre}", Genre Match: ${genreMatch}, ` +
+ `Book Rating: ${ratingValue} (type: ${typeof ratingValue}), Selected Dropdown Rating: "${this.selectedRating}" (type: ${typeof this.selectedRating}), Parsed Selected: ${selectedRatingValue} (type: ${typeof selectedRatingValue}), Rating Match: ${ratingMatch}`
+ );
+ return genreMatch && ratingMatch;
});
},