diff --git a/package-lock.json b/package-lock.json index 71df3914..cbbb8a57 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "22.7.1", + "version": "22.8.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "22.7.1", + "version": "22.8.0", "license": "MIT", "dependencies": { "@cdransf/api-text": "^1.5.0", diff --git a/package.json b/package.json index d39bf621..370ed429 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "22.7.1", + "version": "22.8.0", "description": "The source for my personal site. Built using 11ty (and other tools).", "type": "module", "scripts": { diff --git a/src/assets/styles/pages/books.css b/src/assets/styles/pages/books.css index 410c2135..2cbf2959 100644 --- a/src/assets/styles/pages/books.css +++ b/src/assets/styles/pages/books.css @@ -113,12 +113,23 @@ p { margin: var(--sizing-base) 0; + & svg { + margin-bottom: var(--inline-margin-bottom); + } + &.music { color: var(--music); & svg { stroke: var(--music); - margin-bottom: var(--inline-margin-bottom); + } + } + + &.movies { + color: var(--tv); + + & svg { + stroke: var(--tv); } } } diff --git a/src/assets/styles/pages/watching.css b/src/assets/styles/pages/watching.css index b94fd886..b8844c80 100644 --- a/src/assets/styles/pages/watching.css +++ b/src/assets/styles/pages/watching.css @@ -139,12 +139,23 @@ aspect-ratio: var(--aspect-ratio-banner); } + & p > svg { + margin-bottom: var(--inline-margin-bottom); + } + & p.music { color: var(--music); & svg { stroke: var(--music); - margin-bottom: var(--inline-margin-bottom); + } + } + + & p.books { + color: var(--books); + + & svg { + stroke: var(--books); } } diff --git a/src/data/books.js b/src/data/books.js index 48d8416e..8ff8ab79 100644 --- a/src/data/books.js +++ b/src/data/books.js @@ -27,7 +27,8 @@ const fetchAllBooks = async () => { art, favorite, tags, - artists + artists, + movies `) .order('date_finished', { ascending: false }) .range(rangeStart, rangeStart + PAGE_SIZE - 1) @@ -69,6 +70,10 @@ const processBooks = (books) => { artist['url'] = `/music/artists/${sanitizeMediaString(artist['name'])}-${sanitizeMediaString(parseCountryField(artist['country']))}` return artist }).sort((a, b) => a['name'].localeCompare(b['name'])) : null, + movies: book['movies']?.[0]?.['id'] ? book['movies'].map(movie => { + movie['url'] =`/watching/movies/${movie['tmdb_id']}` + return movie + }).sort((a, b) => b['year'] - a['year']) : null, year, } }) diff --git a/src/data/movies.js b/src/data/movies.js index 2220c47f..f9d69484 100644 --- a/src/data/movies.js +++ b/src/data/movies.js @@ -29,7 +29,8 @@ const fetchAllMovies = async () => { art, backdrop, tags, - artists + artists, + books `) .order('last_watched', { ascending: false }) .range(rangeStart, rangeStart + PAGE_SIZE - 1) @@ -70,6 +71,10 @@ const processMovies = (movies) => { artist['url'] = `/music/artists/${sanitizeMediaString(artist['name'])}-${sanitizeMediaString(parseCountryField(artist['country']))}` return artist }).sort((a, b) => a['name'].localeCompare(b['name'])) : null, + books: item['books']?.[0]?.['id'] ? item['books'].map(book => { + book['url'] = `/books/${book['isbn']}` + return book + }).sort((a, b) => a['title'].localeCompare(b['title'])) : null, })) } diff --git a/src/pages/dynamic/books/book.html b/src/pages/dynamic/books/book.html index 1b71d9ad..0dd45d31 100644 --- a/src/pages/dynamic/books/book.html +++ b/src/pages/dynamic/books/book.html @@ -73,6 +73,25 @@ schema: book
+ {% tablericon "device-tv-old" "Movies" %} + {{ sectionTitle }} +
+@@ -69,6 +69,18 @@ schema: movie
+ {% tablericon "books" "Books" %} + I've read about this movie! +
+