diff --git a/app/Classes/BookProgressHandler.php b/app/Classes/BookProgressHandler.php index ade18f4..08672bf 100644 --- a/app/Classes/BookProgressHandler.php +++ b/app/Classes/BookProgressHandler.php @@ -18,12 +18,15 @@ class BookProgressHandler extends BaseHandler } } - $response = $this->makeRequest('GET', 'optimized_books_progress?select=isbn,progress'); + $response = $this->makeRequest('GET', 'optimized_books_progress?select=isbn,progress,status'); $result = []; foreach ($response as $row) { if (!empty($row['isbn'])) { - $result[$row['isbn']] = (int) $row['progress']; + $result[$row['isbn']] = [ + 'progress' => (int) $row['progress'], + 'status' => $row['status'] ?? null, + ]; } } diff --git a/package-lock.json b/package-lock.json index ee5026e..91b96d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "10.6.1", + "version": "10.6.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "10.6.1", + "version": "10.6.2", "license": "MIT", "dependencies": { "minisearch": "^7.1.2", diff --git a/package.json b/package.json index e79dcda..db842a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "10.6.1", + "version": "10.6.2", "description": "The source for my personal site. Built using 11ty (and other tools).", "type": "module", "engines": { diff --git a/queries/views/media/books/books_progress.sql b/queries/views/media/books/books_progress.sql index 309019a..16d8f43 100644 --- a/queries/views/media/books/books_progress.sql +++ b/queries/views/media/books/books_progress.sql @@ -1,7 +1,8 @@ CREATE OR REPLACE VIEW optimized_books_progress AS SELECT isbn, - progress + progress, + status FROM optimized_books WHERE diff --git a/src/pages/dynamic/media/reading/index.php.liquid b/src/pages/dynamic/media/reading/index.php.liquid index 861ac98..b367ab8 100644 --- a/src/pages/dynamic/media/reading/index.php.liquid +++ b/src/pages/dynamic/media/reading/index.php.liquid @@ -33,42 +33,43 @@ eleventyComputed: %}
{% for book in bookData %} - {% capture alt %}{{ book.title }} by {{ book.authors }}{% endcapture %} -
- - {{ alt | replaceQuotes }} - -
+ + {% capture alt %}{{ book.title }} by {{ book.authors }}{% endcapture %} +
-

{{ book.title }}

+ {{ alt | replaceQuotes }}
- {% if book.author %} - By {{ book.author }} - {% endif %} - - % - - {% if book.description %} -
{{ book.description | normalize_whitespace | markdown | htmlTruncate }}
- {% endif %} -
-
+
+ +

{{ book.title }}

+
+ {% if book.author %} + By {{ book.author }} + {% endif %} + + % + + {% if book.description %} +
{{ book.description | normalize_whitespace | markdown | htmlTruncate }}
+ {% endif %} +
+ + {% endfor %} -