diff --git a/content/books/alice-in-wonderland.md b/content/books/alice-in-wonderland.md new file mode 100644 index 0000000..614e641 --- /dev/null +++ b/content/books/alice-in-wonderland.md @@ -0,0 +1,9 @@ +--- +title: Alice's Adventures in Wonderland +author: Lewis Carroll +stars: 3 +readDate: 2024 +url: https://app.thestorygraph.com/books/83b0e44a-06fe-4042-9d2d-e4f41244fb9c +thumbnailUrl: https://cdn.thestorygraph.com/l83t3e6wh6tq7dqxbvrba34ee2nb +tags: fiction, classics, fantasy +--- \ No newline at end of file diff --git a/content/books/cities-that-shaped-the-ancient-world.md b/content/books/cities-that-shaped-the-ancient-world.md new file mode 100644 index 0000000..b490707 --- /dev/null +++ b/content/books/cities-that-shaped-the-ancient-world.md @@ -0,0 +1,9 @@ +--- +title: Cities That Shaped The Ancient World +author: John Julius Norwich +stars: 3.5 +readDate: 2024 +url: https://app.thestorygraph.com/books/20bc1ff4-56bb-4e88-a403-bc150d45f9d2 +thumbnailUrl: https://cdn.thestorygraph.com/i8znw2yrd6p4m76dx6rvyuyd48h2 +tags: non-fiction, history +--- diff --git a/content/books/song-of-achilles.md b/content/books/song-of-achilles.md new file mode 100644 index 0000000..48afe28 --- /dev/null +++ b/content/books/song-of-achilles.md @@ -0,0 +1,10 @@ +--- +title: "The Song of Achilles" +author: Madline Miller +stars: 2.5 +readDate: 2025/03/22 +url: https://app.thestorygraph.com/books/9202845d-26cd-4a85-b15f-408116117028 +thumbnailUrl: https://cdn.thestorygraph.com/m8cw3kb3qx4h2jl8kg0u4m3txhie +tags: fiction, fantasy, romance +--- +This one really tailed off half-way through. I found the characters very one-dimensional (Patrcolus pines after Achilles, Achilles has muscles and can swing a sword fast), but the story took me at least up until the half-way mark. Weirdly I wasn't interested too much when the actual Iliad story line started to get going - maybe because I've heard it a million times before - and their essentially non-existent romance (more accurately an inch-deep obsession, I'd argue) didn't exactly inspire me to carry on reading. diff --git a/content/books/stasiland.md b/content/books/stasiland.md new file mode 100644 index 0000000..2b2c975 --- /dev/null +++ b/content/books/stasiland.md @@ -0,0 +1,9 @@ +--- +title: "Stasiland: Stories from Behind the Berlin Wall" +author: Anna Funder +stars: 4 +readDate: 2025/03/22 +url: https://app.thestorygraph.com/books/9202845d-26cd-4a85-b15f-408116117028 +thumbnailUrl: https://cdn.thestorygraph.com/gphzjvwbhr8d5agrieobx0yy2xhb +tags: non-fiction, history, politics +--- diff --git a/content/books/stray-reflections.md b/content/books/stray-reflections.md new file mode 100644 index 0000000..c5890b3 --- /dev/null +++ b/content/books/stray-reflections.md @@ -0,0 +1,9 @@ +--- +title: Stray Reflections +author: Muhammad Iqbal +stars: 5 +readDate: 2025/03/22 +url: +thumbnailUrl: +tags: non-fiction, politics, philosophy +--- diff --git a/content/books/to-be-taught-if-fortunate.md b/content/books/to-be-taught-if-fortunate.md new file mode 100644 index 0000000..4c5f49e --- /dev/null +++ b/content/books/to-be-taught-if-fortunate.md @@ -0,0 +1,10 @@ +--- +title: To Be Taught, If Fortunate +author: Becky Chambers +stars: 4.5 +readDate: 2025/03/22 +url: https://app.thestorygraph.com/books/fca2631f-b3e2-4b9d-a2fd-4c1ec5e4d3f7 +thumbnailUrl: https://cdn.thestorygraph.com/8ep9zjc581zefkzfyhtizqjnz8u5 +tags: fiction, science fiction +--- +Really enjoyed this! It was reflective yet lighthearted. I also love this specific flavour of sci-fi, where vastly different species of aliens and worlds are thought up and articulated beautifully by the author. \ No newline at end of file diff --git a/next-sitemap.config.cjs b/next-sitemap.config.cjs index 8ba6e89..c5e58e6 100644 --- a/next-sitemap.config.cjs +++ b/next-sitemap.config.cjs @@ -32,8 +32,7 @@ module.exports = { console.log(attributes) if (!attributes) { return null } - metadata.pubdate = attributes.pubdate ?? null - metadata.lastmod = attributes.moddate ?? null + metadata.lastmod = attributes.moddate ?? attributes.pubdate ?? null console.log('Calculated sitemap dates for article', path) } diff --git a/next.config.mjs b/next.config.mjs index aecfe96..d4f92d9 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -2,7 +2,10 @@ const nextConfig = { reactStrictMode: true, output: 'export', - trailingSlash: true // ensure pages get their own directory in output + trailingSlash: true, // ensure pages get their own directory in output + images: { + unoptimized: true + } } export default nextConfig diff --git a/package.json b/package.json index 5dd39cc..cbb311d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "www-aaronjy-2024", - "version": "1.6.2.0", + "version": "1.6.3.0", "private": true, "type": "module", "scripts": { diff --git a/public/img/book-placeholder.jpg b/public/img/book-placeholder.jpg new file mode 100644 index 0000000..82f1edd Binary files /dev/null and b/public/img/book-placeholder.jpg differ diff --git a/public/sitemap.xml b/public/sitemap.xml index b810b4a..0efc8c5 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -5,10 +5,10 @@ https://www.aaronjy.me/cv/0.8 https://www.aaronjy.me/tags/0.8 https://www.aaronjy.me/writing/0.8 -https://www.aaronjy.me/writing/attitudes-to-reading/0.6Tue, 18 Mar 2025 00:00:00 GMT -https://www.aaronjy.me/writing/moving-from-github-to-forgejo/0.6Sun, 16 Mar 2025 00:00:00 GMT -https://www.aaronjy.me/writing/performance-considerations-tcp-game-server/Fri, 21 Mar 2025 21:12:47 GMT0.6Sun, 23 Feb 2025 21:12:37 GMT -https://www.aaronjy.me/writing/quick-reflection-katherine-may/0.6Sun, 09 Mar 2025 00:00:00 GMT -https://www.aaronjy.me/writing/static-site-on-google-cloud/0.6Wed, 01 May 2024 00:00:00 GMT -https://www.aaronjy.me/writing/support-content-filte-structure-changes-on-a-static-site/0.6Mon, 18 Mar 2024 16:47:32 GMT +https://www.aaronjy.me/writing/attitudes-to-reading/Tue, 18 Mar 2025 00:00:00 GMT0.6 +https://www.aaronjy.me/writing/moving-from-github-to-forgejo/Sun, 16 Mar 2025 00:00:00 GMT0.6 +https://www.aaronjy.me/writing/performance-considerations-tcp-game-server/Fri, 21 Mar 2025 21:12:47 GMT0.6 +https://www.aaronjy.me/writing/quick-reflection-katherine-may/Sun, 09 Mar 2025 00:00:00 GMT0.6 +https://www.aaronjy.me/writing/static-site-on-google-cloud/Wed, 01 May 2024 00:00:00 GMT0.6 +https://www.aaronjy.me/writing/support-content-filte-structure-changes-on-a-static-site/Mon, 18 Mar 2024 16:47:32 GMT0.6 \ No newline at end of file diff --git a/src/components/BookListItem/BookListItem.jsx b/src/components/BookListItem/BookListItem.jsx new file mode 100644 index 0000000..4d2c919 --- /dev/null +++ b/src/components/BookListItem/BookListItem.jsx @@ -0,0 +1,24 @@ +import Image from 'next/image' + +import style from './BookListItem.module.css' +import Link from 'next/link' + +export default function BookListItem ({ href, title, author, stars, readDate, url, thumbnailUrl, tags, review }) { + return ( +
+
+ + {`Book + +
+
+

+ {title} +

+

{author}

+

{tags}

+

{stars}/5

+
+
+ ) +} diff --git a/src/components/BookListItem/BookListItem.module.css b/src/components/BookListItem/BookListItem.module.css new file mode 100644 index 0000000..e84d6a9 --- /dev/null +++ b/src/components/BookListItem/BookListItem.module.css @@ -0,0 +1,18 @@ +.item { + height: 100%; + display: flex; + flex-direction: column; + flex-grow: 1; + justify-content: flex-end; +} + +.heading { + font-size: 1rem; + margin-bottom: 5px; +} + +.author { + margin-top: 5px; + /* font-weight: bold; */ +} + diff --git a/src/components/Grid/Grid.jsx b/src/components/Grid/Grid.jsx new file mode 100644 index 0000000..8637e5f --- /dev/null +++ b/src/components/Grid/Grid.jsx @@ -0,0 +1,13 @@ +import style from './Grid.module.css' + +export default function Grid ({ columns, children }) { + return ( +
+ {children} +
+ ) +} diff --git a/src/components/Grid/Grid.module.css b/src/components/Grid/Grid.module.css new file mode 100644 index 0000000..ea09cda --- /dev/null +++ b/src/components/Grid/Grid.module.css @@ -0,0 +1,4 @@ +.grid { + display: grid; + gap: 25px; +} \ No newline at end of file diff --git a/src/components/Header/Header.jsx b/src/components/Header/Header.jsx index bd78919..7f87fda 100644 --- a/src/components/Header/Header.jsx +++ b/src/components/Header/Header.jsx @@ -11,6 +11,7 @@ function Header () { Writing{', '} Tags{', '} CV{', '} + Library{', '} About diff --git a/src/pages/library/[slug].js b/src/pages/library/[slug].js new file mode 100644 index 0000000..6c45786 --- /dev/null +++ b/src/pages/library/[slug].js @@ -0,0 +1,15 @@ +import React from 'react' +import DefaultLayout from '@/layouts/DefaultLayout/DefaultLayout' +import { getStaticEntryPaths, getStaticEntryProps } from '@/lib/content' +import Article from '@/components/Article/Article' + +export const getStaticPaths = () => getStaticEntryPaths('./content/books') +export const getStaticProps = (ctx) => getStaticEntryProps('./content/books', ctx) + +export default function LibrarySingle ({ attributes, html }) { + return ( + +
+ + ) +} diff --git a/src/pages/library/index.js b/src/pages/library/index.js new file mode 100644 index 0000000..4f1f0d7 --- /dev/null +++ b/src/pages/library/index.js @@ -0,0 +1,72 @@ +import BookListItem from '@/components/BookListItem/BookListItem' +import Grid from '@/components/Grid/Grid' +import DefaultLayout from '@/layouts/DefaultLayout/DefaultLayout' +import { getStaticEntries } from '@/lib/content' +import { NextSeo } from 'next-seo' + +export const Title = 'Library' + +export const getStaticProps = () => ({ + props: { + bookEntries: getStaticEntries('./content/books') + } +}) + +const SORT_TITLE = 'title' +const SORT_RATING = 'rating' + +export default function Library ({ bookEntries }) { + // const tags = getTags(bookEntries) + + // const [sorter, setSorter] = useState(SORT_TITLE) + + // console.log(bookEntries) + + return ( + + + +

{Title}

+ +
+
+ + +
+ + + {bookEntries.map((entry, i) => ( + + ))} + +
+
+ ) +} + +// function getTags (bookEntries) { +// const tags = {} +// for (const entry of bookEntries) { +// const entryTags = entry.attributes.tags.split(', ') +// for (const entryTag of entryTags) { +// tags[entryTag] = tags[entryTag] ? tags[entryTag] + 1 : 1 +// } +// } + +// return tags +// } diff --git a/src/styles/globals.css b/src/styles/globals.css index f42faa9..9444bd2 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -13,4 +13,8 @@ tr { td:first-child { padding-right: 20px; +} + +.form-group { + margin: 20px 0; } \ No newline at end of file