diff --git a/package-lock.json b/package-lock.json index 2f5d73e0..5384efbd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "3.2.0", + "version": "3.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "3.2.0", + "version": "3.3.0", "license": "MIT", "dependencies": { "@11ty/eleventy-fetch": "4.0.1", @@ -1674,9 +1674,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.61", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.61.tgz", - "integrity": "sha512-CcRGSBCBB6L9c3PBJWYYrBo6Bzeoi+GZTKvtuRtooJGWsINk+mOInZWcssU35zDTAwreVcrMimc9aMyPpehRNw==", + "version": "1.5.62", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.62.tgz", + "integrity": "sha512-t8c+zLmJHa9dJy96yBZRXGQYoiCEnHYgFwn1asvSPZSUdVxnB62A4RASd7k41ytG3ErFBA0TpHlKg9D9SQBmLg==", "dev": true, "license": "ISC" }, diff --git a/package.json b/package.json index 8508db09..30795355 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "3.2.0", + "version": "3.3.0", "description": "The source for my personal site. Built using 11ty (and other tools).", "type": "module", "engines": { diff --git a/queries/views/feeds/all-content.psql b/queries/views/feeds/all-content.psql index a6f85ff9..45bc6228 100644 --- a/queries/views/feeds/all-content.psql +++ b/queries/views/feeds/all-content.psql @@ -3,12 +3,12 @@ WITH feed_data AS ( SELECT p.date AS content_date, p.title, - p.description, + p.content AS description, CONCAT('https://coryd.dev', p.url) AS url, NULL AS image, NULL AS rating, p.tags, - json_build_object('title', p.title, 'url', CONCAT('https://coryd.dev', p.url), 'description', p.description, 'date', p.date) AS feed + json_build_object('title', p.title, 'url', CONCAT('https://coryd.dev', p.url), 'description', p.content, 'date', p.date) AS feed FROM optimized_posts p UNION ALL @@ -20,41 +20,49 @@ WITH feed_data AS ( NULL AS image, NULL AS rating, l.tags, - json_build_object('title', l.title, 'url', l.link, 'description', l.description, 'date', l.date) AS feed + json_build_object('title', CONCAT(l.title, ' via ', l.name), 'url', l.link, 'description', l.description, 'date', l.date) AS feed FROM optimized_links l - UNION ALL - SELECT - b.date_finished AS content_date, - b.title, - b.description, - CONCAT('https://coryd.dev', b.url) AS url, - b.image, - b.rating, - b.tags, - CASE WHEN LOWER(b.status) = 'finished' THEN - json_build_object('title', b.title, 'url', CONCAT('https://coryd.dev', b.url), 'description', b.description, 'image', b.image, 'rating', b.rating, 'date', b.date_finished) - ELSE - NULL - END AS feed - FROM - optimized_books b - UNION ALL - SELECT - m.last_watched AS content_date, - m.title, - m.description, - CONCAT('https://coryd.dev', m.url) AS url, - m.image, - m.rating, - m.tags, - CASE WHEN m.last_watched IS NOT NULL THEN - json_build_object('title', m.title, 'url', CONCAT('https://coryd.dev', m.url), 'description', m.description, 'image', m.image, 'rating', m.rating, 'date', m.last_watched) - ELSE - NULL - END AS feed - FROM - optimized_movies m +UNION ALL +SELECT + b.date_finished AS content_date, + b.title, + b.description, + CONCAT('https://coryd.dev', b.url) AS url, + b.image, + b.rating, + b.tags, + CASE WHEN LOWER(b.status) = 'finished' THEN + json_build_object('title', b.title, 'url', CONCAT('https://coryd.dev', b.url), 'description', CASE WHEN b.review IS NOT NULL THEN + b.review + ELSE + b.description + END, 'image', b.image, 'rating', b.rating, 'date', b.date_finished) + ELSE + NULL + END AS feed +FROM + optimized_books b +UNION ALL +SELECT + m.last_watched AS content_date, + m.title, + m.description, + CONCAT('https://coryd.dev', m.url) AS url, + m.image, + m.rating, + m.tags, + CASE WHEN m.last_watched IS NOT NULL THEN + json_build_object('title', m.title, 'url', CONCAT('https://coryd.dev', m.url), 'description', CASE WHEN m.review IS NOT NULL THEN + m.review + ELSE + m.description + END, 'image', m.image, 'rating', m.rating, 'date', m.last_watched) + ELSE + NULL + END AS feed +FROM + optimized_movies m ) SELECT json_agg(feed_data.* ORDER BY feed_data.content_date DESC) AS feed diff --git a/queries/views/media/books.psql b/queries/views/media/books.psql index cb396a34..ed8bbaad 100644 --- a/queries/views/media/books.psql +++ b/queries/views/media/books.psql @@ -78,7 +78,11 @@ json_build_object('title', CONCAT(b.title, ' by ', b.author), 'image', CONCAT('/ END) AS grid, CASE WHEN LOWER(b.read_status) = 'finished' AND b.star_rating IS NOT NULL THEN - json_build_object('title', b.title, 'url', CONCAT('https://coryd.dev', b.slug), 'date', b.date_finished, 'description', b.description, 'image', CONCAT('/', df.filename_disk), 'rating', b.star_rating) + json_build_object('title', b.title, 'url', CONCAT('https://coryd.dev', b.slug), 'date', b.date_finished, 'description', CASE WHEN b.review IS NOT NULL THEN + b.review + ELSE + b.description + END, 'image', CONCAT('/', df.filename_disk), 'rating', b.star_rating) ELSE NULL END AS feed diff --git a/queries/views/media/movies.psql b/queries/views/media/movies.psql index aff3d7e8..442f8cb0 100644 --- a/queries/views/media/movies.psql +++ b/queries/views/media/movies.psql @@ -83,7 +83,11 @@ WHERE r.movies_id = m.id) AS related_movies, CASE WHEN m.star_rating IS NOT NULL AND m.last_watched IS NOT NULL THEN - json_build_object('title', m.title, 'url', CONCAT('https://coryd.dev', m.slug), 'date', m.last_watched, 'description', m.description, 'image', CONCAT('/', df.filename_disk), 'rating', m.star_rating) + json_build_object('title', m.title, 'url', CONCAT('https://coryd.dev', m.slug), 'date', m.last_watched, 'description', CASE WHEN m.review IS NOT NULL THEN + m.review + ELSE + m.description + END, 'image', CONCAT('/', df.filename_disk), 'rating', m.star_rating) ELSE NULL END AS feed diff --git a/src/assets/styles/feed.xsl b/src/assets/styles/feed.xsl index c6d0cdd0..a2152485 100644 --- a/src/assets/styles/feed.xsl +++ b/src/assets/styles/feed.xsl @@ -45,14 +45,14 @@
-

+

-

+ {title} diff --git a/src/assets/styles/pages/feeds.css b/src/assets/styles/pages/feeds.css index 763ede86..4cdafc80 100644 --- a/src/assets/styles/pages/feeds.css +++ b/src/assets/styles/pages/feeds.css @@ -14,7 +14,7 @@ font-size: var(--font-size-sm); } - & h3 { + & h2 { margin-top: 0; }