diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7f730a..5fd3fd4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,3 +87,28 @@ jobs: trap 'docker rm -f "$cid" >/dev/null' EXIT docker cp . "$cid:/repo" docker start -a "$cid" + + hugo: + name: Hugo theme on the minimum Hugo version and the latest + runs-on: ubuntu-latest + timeout-minutes: 40 + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + # Builds the demo and the fixtures on both versions. A build that writes + # anything to stderr fails. + - name: Build every site on both Hugo versions + run: | + set -euo pipefail + tools/hugo-dev/hugo-dev.sh images + tools/hugo-dev/hugo-dev.sh build + # Same-HTML, link, design-parity and browser checks, in the Playwright + # image that matches tools/package.json. + - name: Check the builds + run: | + set -euo pipefail + cid="$(docker create -w /repo mcr.microsoft.com/playwright:v1.61.0-noble bash -c 'npm ci --prefix tools --no-audit --no-fund >/dev/null && node tools/hugo-dev/check-builds.mjs tools/hugo-dev/out')" + trap 'docker rm -f "$cid" >/dev/null' EXIT + docker cp . "$cid:/repo" + docker start -a "$cid" diff --git a/README.md b/README.md index b33bd68..44cff31 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Readerly -Readerly is a free theme for people who love books, for WordPress and for Jekyll. It is built for a book blog first, and it also gives you an author website and a reading log. Each use is optional: the theme creates no pages, posts or categories, and every section can be removed. It comes in two styles, Paper (light) and Lamplight (dark), and bundles its fonts, so it makes no third-party requests. +Readerly is a free theme for people who love books, for WordPress, Jekyll and Hugo. It is built for a book blog first, and it also gives you an author website and a reading log. Each use is optional: the theme creates no pages, posts or categories, and every section can be removed. It comes in two styles, Paper (light) and Lamplight (dark), and bundles its fonts, so it makes no third-party requests. -The WordPress theme requires WordPress 6.9 and PHP 7.4, under GPLv2 or later. The Jekyll theme runs on GitHub Pages and Jekyll 4, under the MIT License. +The WordPress theme requires WordPress 6.9 and PHP 7.4, under GPLv2 or later. The Jekyll theme runs on GitHub Pages and Jekyll 4, and the Hugo theme on Hugo 0.146.0 or later, both under the MIT License. ## Layout @@ -14,7 +14,9 @@ The WordPress theme requires WordPress 6.9 and PHP 7.4, under GPLv2 or later. Th | `jekyll/starter/` | A ready-to-publish site that uses the theme, published as the template repository `listofbooks-net/jekyll-theme-readerly-starter`. | | `jekyll/demo/` | The Jekyll demo site, Marginalia, with the design pages' content. | | `jekyll/fixtures/` | Sites that only the checks build: `bare` (a title and nothing else), `minima` (the output of `jekyll new`) and `sparse` (one post per missing field). | -| `tools/` | The generator, the checks that CI runs, the zip builder, a local WordPress and the Jekyll build images. None of it ships. | +| `hugo/theme/` | The Hugo theme, published as `listofbooks-net/hugo-theme-readerly`, with its demo site, Marginalia, in `hugo/theme/exampleSite/`. | +| `hugo/fixtures/` | Sites that only the checks build: `bare` (a title and nothing else), `quickstart` (what `hugo new site` and `hugo new content` make), `sparse` (one review per missing field), `paginated` (a custom pager path) and `no-credit` (the credit partial emptied). | +| `tools/` | The generator, the checks that CI runs, the zip builder, a local WordPress and the Jekyll and Hugo build images. None of it ships. | ## Generated files @@ -25,6 +27,7 @@ The WordPress theme requires WordPress 6.9 and PHP 7.4, under GPLv2 or later. Th - `wordpress/assets/fonts/` - `jekyll/theme/assets/css/readerly.css` (fonts, tokens and `design/assets/css/style.css`), `jekyll/theme/assets/js/theme.js`, and the theme's fonts and images - the demo's covers and images in `jekyll/demo/assets/` +- `hugo/theme/assets/readerly/css/readerly.css` (the same CSS as the Jekyll theme's) and `hugo/theme/assets/readerly/js/theme.js`, the theme's fonts and images in `hugo/theme/static/readerly/`, and the demo's covers and images in `hugo/theme/exampleSite/static/assets/` ```sh node tools/build-tokens.mjs # regenerate @@ -89,6 +92,37 @@ To compare the design pages with the demo by eye, run `node tools/jekyll-dev/sid `tools/publish-jekyll.sh ` pushes a release to the two public repositories: the tag first, then, once the starter builds against that tag, the `v` branch and `main`. Only an operator runs it; see the header of the script. +## Build and check the Hugo theme + +You need Docker and Node. The script builds two images from the official extended Hugo release, each checked against its published checksum: the theme's minimum version (`0.146.0`, which must equal `[module.hugoVersion] min` in `hugo/theme/hugo.toml`) and the latest version the theme is tested on (`0.169.0`). Both load the theme from `hugo/theme/`, so nothing is downloaded from the published repository. + +```sh +tools/hugo-dev/hugo-dev.sh images # build the two images, once +tools/hugo-dev/hugo-dev.sh build # build every site on both versions into tools/hugo-dev/out/ +tools/hugo-dev/hugo-dev.sh serve demo # serve the demo at http://localhost:4000/sub/ +``` + +`build` builds the demo and the five fixtures under the baseURL `http://localhost:4000/sub/`. A build fails when Hugo exits with an error or writes anything to stderr, where it prints every warning. + +To run the checks, install the tools and point `CHROMIUM_PATH` at a Chromium: + +```sh +npm ci --prefix tools +CHROMIUM_PATH=/usr/bin/chromium tools/hugo-dev/hugo-dev.sh check +``` + +`check` builds, then runs `tools/hugo-dev/check-builds.mjs`: + +1. Each site's HTML is the same on both Hugo versions, whitespace aside. +2. Every internal link and asset resolves to a built file under the baseURL. +3. Every attribute parses, no heading is empty, and each fixture's own cases hold: quotes and `` in titles and authors, a plain-string author and a menu of plain URLs on a site made with `hugo new site`, a custom pager path, and no credit link once the partial is emptied (`check-markup.mjs`). +4. The demo has the same markup as the seven design pages (`check-parity.mjs`). Each allowed difference is in `parity-exceptions.json` with its reason. +5. Every page of every site but `no-credit` passes `tools/wp-dev/check-pages.cjs` at 1280 px and 390 px, in Paper and Lamplight: no overflow, broken images, console errors or third-party requests, one h1, no empty headings or sections, and exactly one footer credit. + +To compare the design pages with the demo by eye, run `node tools/hugo-dev/side-by-side.mjs` after a build. It writes `tools/hugo-dev/out/side-by-side/index.html`. `tools/hugo-dev/hugo-dev.sh screenshots` rebuilds the two listing images, `hugo/theme/images/screenshot.png` (1500 by 1000) and `tn.png` (900 by 600), from the demo home page in Paper. + +`tools/publish-hugo.sh ` pushes a release to the public repository: the tag first, then `main`. Hugo Modules resolve the semantic version tag, so there is no branch to move. Only an operator runs it; see the header of the script. + ## Build the zip ```sh @@ -103,4 +137,4 @@ tools/wp-dev/wp-dev.sh zip-test dist/readerly-1.0.0.zip ## The footer credit -The footer keeps one link, "Theme by List of Books", to https://www.listofbooks.net/. In WordPress, a site owner can edit or delete it in the Site Editor. In Jekyll, a site owner removes it by adding an empty `_includes/shell/credit.html`. +The footer keeps one link, "Theme by List of Books", to https://www.listofbooks.net/. In WordPress, a site owner can edit or delete it in the Site Editor. In Jekyll, a site owner removes it by adding an empty `_includes/shell/credit.html`, and in Hugo an empty `layouts/_partials/credit.html`. diff --git a/hugo/fixtures/bare/hugo.toml b/hugo/fixtures/bare/hugo.toml new file mode 100644 index 0000000..d2cf224 --- /dev/null +++ b/hugo/fixtures/bare/hugo.toml @@ -0,0 +1 @@ +title = "Bare" diff --git a/hugo/fixtures/no-credit/content/reviews/the-only-review.md b/hugo/fixtures/no-credit/content/reviews/the-only-review.md new file mode 100644 index 0000000..c579a54 --- /dev/null +++ b/hugo/fixtures/no-credit/content/reviews/the-only-review.md @@ -0,0 +1,8 @@ +--- +title: The Only Review +date: 2026-10-01 +book_author: Ada Lin +categories: [Essays] +rating: 4 +--- +A single review, so the home page, the archive and the review page all carry the footer. diff --git a/hugo/fixtures/no-credit/hugo.toml b/hugo/fixtures/no-credit/hugo.toml new file mode 100644 index 0000000..4dec3bb --- /dev/null +++ b/hugo/fixtures/no-credit/hugo.toml @@ -0,0 +1 @@ +title = "No credit" diff --git a/hugo/fixtures/no-credit/layouts/_partials/credit.html b/hugo/fixtures/no-credit/layouts/_partials/credit.html new file mode 100644 index 0000000..e69de29 diff --git a/hugo/fixtures/paginated/content/blog/_index.md b/hugo/fixtures/paginated/content/blog/_index.md new file mode 100644 index 0000000..dd0241b --- /dev/null +++ b/hugo/fixtures/paginated/content/blog/_index.md @@ -0,0 +1,6 @@ +--- +layout: sections +sections: [intro, recent-reviews] +intro: + heading: The blog +--- diff --git a/hugo/fixtures/paginated/content/reviews/review-1.md b/hugo/fixtures/paginated/content/reviews/review-1.md new file mode 100644 index 0000000..a241218 --- /dev/null +++ b/hugo/fixtures/paginated/content/reviews/review-1.md @@ -0,0 +1,8 @@ +--- +title: Review number 1 +date: 2026-10-01 +book_author: Author 1 +categories: [Essays] +rating: 4 +--- +Body 1. diff --git a/hugo/fixtures/paginated/content/reviews/review-2.md b/hugo/fixtures/paginated/content/reviews/review-2.md new file mode 100644 index 0000000..c9e3cda --- /dev/null +++ b/hugo/fixtures/paginated/content/reviews/review-2.md @@ -0,0 +1,8 @@ +--- +title: Review number 2 +date: 2026-10-02 +book_author: Author 2 +categories: [Essays] +rating: 4 +--- +Body 2. diff --git a/hugo/fixtures/paginated/content/reviews/review-3.md b/hugo/fixtures/paginated/content/reviews/review-3.md new file mode 100644 index 0000000..48b55b6 --- /dev/null +++ b/hugo/fixtures/paginated/content/reviews/review-3.md @@ -0,0 +1,8 @@ +--- +title: Review number 3 +date: 2026-10-03 +book_author: Author 3 +categories: [Essays] +rating: 4 +--- +Body 3. diff --git a/hugo/fixtures/paginated/content/reviews/review-4.md b/hugo/fixtures/paginated/content/reviews/review-4.md new file mode 100644 index 0000000..0b39cf7 --- /dev/null +++ b/hugo/fixtures/paginated/content/reviews/review-4.md @@ -0,0 +1,8 @@ +--- +title: Review number 4 +date: 2026-10-04 +book_author: Author 4 +categories: [Essays] +rating: 4 +--- +Body 4. diff --git a/hugo/fixtures/paginated/content/reviews/review-5.md b/hugo/fixtures/paginated/content/reviews/review-5.md new file mode 100644 index 0000000..d16b7c9 --- /dev/null +++ b/hugo/fixtures/paginated/content/reviews/review-5.md @@ -0,0 +1,8 @@ +--- +title: Review number 5 +date: 2026-10-05 +book_author: Author 5 +categories: [Essays] +rating: 4 +--- +Body 5. diff --git a/hugo/fixtures/paginated/hugo.toml b/hugo/fixtures/paginated/hugo.toml new file mode 100644 index 0000000..e92d620 --- /dev/null +++ b/hugo/fixtures/paginated/hugo.toml @@ -0,0 +1,7 @@ +# Two reviews a page and a custom pager path: page 2 of the blog is /blog/seite/2/. +baseURL = "https://example.org/" +title = "Paginated" + +[pagination] + pagerSize = 2 + path = "seite" diff --git a/hugo/fixtures/quickstart/archetypes/default.md b/hugo/fixtures/quickstart/archetypes/default.md new file mode 100644 index 0000000..25b6752 --- /dev/null +++ b/hugo/fixtures/quickstart/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +date = '{{ .Date }}' +draft = true +title = '{{ replace .File.ContentBaseName "-" " " | title }}' ++++ diff --git a/hugo/fixtures/quickstart/content/about.md b/hugo/fixtures/quickstart/content/about.md new file mode 100644 index 0000000..bdc33e3 --- /dev/null +++ b/hugo/fixtures/quickstart/content/about.md @@ -0,0 +1,6 @@ ++++ +date = '2026-11-10T09:00:00Z' +title = 'About' ++++ + +A plain page on a plain Hugo site. diff --git a/hugo/fixtures/quickstart/content/posts/my-first-post.md b/hugo/fixtures/quickstart/content/posts/my-first-post.md new file mode 100644 index 0000000..b582d5e --- /dev/null +++ b/hugo/fixtures/quickstart/content/posts/my-first-post.md @@ -0,0 +1,13 @@ ++++ +date = '2026-11-10T09:00:00Z' +draft = false +title = 'My First Post' +categories = ['Notes'] +tags = ['hello'] ++++ + +This is the first post on a site made with `hugo new site`, using the quickstart steps and nothing else. + +The theme is added as a module or a submodule and named in `hugo.toml`. Nothing in the content changes. + +A third paragraph proves that the whole body is printed, and that the byline names the author from `params.author`. diff --git a/hugo/fixtures/quickstart/hugo.toml b/hugo/fixtures/quickstart/hugo.toml new file mode 100644 index 0000000..c02a8ae --- /dev/null +++ b/hugo/fixtures/quickstart/hugo.toml @@ -0,0 +1,21 @@ +# What `hugo new site` writes, plus a plain-string author and a menu of plain URLs. +baseURL = "https://example.org/" +title = "My New Hugo Site" + +[params] + author = "Jane Doe" + +[[menus.main]] + name = "Home" + url = "/" + weight = 1 + +[[menus.main]] + name = "Posts" + url = "/posts/" + weight = 2 + +[[menus.main]] + name = "About" + url = "/about/" + weight = 3 diff --git a/hugo/fixtures/sparse/content/author.md b/hugo/fixtures/sparse/content/author.md new file mode 100644 index 0000000..85814b9 --- /dev/null +++ b/hugo/fixtures/sparse/content/author.md @@ -0,0 +1,4 @@ +--- +layout: author +title: An Author With "No" Books +--- diff --git a/hugo/fixtures/sparse/content/reading-log.md b/hugo/fixtures/sparse/content/reading-log.md new file mode 100644 index 0000000..3ff2948 --- /dev/null +++ b/hugo/fixtures/sparse/content/reading-log.md @@ -0,0 +1,5 @@ +--- +layout: reading-log +title: Reading log +year: 2025 +--- diff --git a/hugo/fixtures/sparse/content/reviews/no-cover.md b/hugo/fixtures/sparse/content/reviews/no-cover.md new file mode 100644 index 0000000..7a5587c --- /dev/null +++ b/hugo/fixtures/sparse/content/reviews/no-cover.md @@ -0,0 +1,11 @@ +--- +title: A Book With No Cover +date: 2026-10-01 +book_author: Ada Lin +categories: [Fantasy] +rating: 3 +status: read +finished: 2026-09-28 +summary: The card shows a typeset cover with the title and author. +--- +No `cover` key, so every card and the book panel show the typeset placeholder. diff --git a/hugo/fixtures/sparse/content/reviews/no-genre.md b/hugo/fixtures/sparse/content/reviews/no-genre.md new file mode 100644 index 0000000..c3f1cc7 --- /dev/null +++ b/hugo/fixtures/sparse/content/reviews/no-genre.md @@ -0,0 +1,8 @@ +--- +title: A Book With No Genre +date: 2026-10-03 +book_author: Cora Pike +rating: 4 +pages: 200 +--- +No `genre`: no label above the title, no genre list entry and no related posts. diff --git a/hugo/fixtures/sparse/content/reviews/no-rating.md b/hugo/fixtures/sparse/content/reviews/no-rating.md new file mode 100644 index 0000000..028dae1 --- /dev/null +++ b/hugo/fixtures/sparse/content/reviews/no-rating.md @@ -0,0 +1,8 @@ +--- +title: A Book With No Rating +date: 2026-10-02 +book_author: Ben Ola +categories: [Fantasy] +status: read +--- +No `rating`, so no stars, and no `finished`, so it sorts last on the Read shelf. diff --git a/hugo/fixtures/sparse/content/reviews/plain-article.md b/hugo/fixtures/sparse/content/reviews/plain-article.md new file mode 100644 index 0000000..f86ba38 --- /dev/null +++ b/hugo/fixtures/sparse/content/reviews/plain-article.md @@ -0,0 +1,5 @@ +--- +title: A plain blog post +date: 2026-10-04 +--- +No book keys at all, so there is no book panel and the post is an ordinary article. diff --git a/hugo/fixtures/sparse/content/reviews/quoted-title.md b/hugo/fixtures/sparse/content/reviews/quoted-title.md new file mode 100644 index 0000000..29e2b3f --- /dev/null +++ b/hugo/fixtures/sparse/content/reviews/quoted-title.md @@ -0,0 +1,11 @@ +--- +title: The "Quiet" Arithmetic +date: 2026-10-07 +book_author: Ann "Ace" O'Neil +categories: [Essays] +rating: 4 +pages: 200 +status: reading +current_page: 50 +--- +A title and an author with double quotes, and an author name that contains ``, which must not end the JSON-LD block. diff --git a/hugo/fixtures/sparse/content/reviews/reading-no-pages.md b/hugo/fixtures/sparse/content/reviews/reading-no-pages.md new file mode 100644 index 0000000..a9a7a9f --- /dev/null +++ b/hugo/fixtures/sparse/content/reviews/reading-no-pages.md @@ -0,0 +1,8 @@ +--- +title: A Book I Am Reading +date: 2026-10-06 +book_author: Eli Moss +status: reading +current_page: 40 +--- +`status: reading` with no `pages`, so the card has a badge and no progress bar. diff --git a/hugo/fixtures/sparse/content/reviews/unknown-status.md b/hugo/fixtures/sparse/content/reviews/unknown-status.md new file mode 100644 index 0000000..6f839d2 --- /dev/null +++ b/hugo/fixtures/sparse/content/reviews/unknown-status.md @@ -0,0 +1,10 @@ +--- +title: A Book With An Unknown Status +date: 2026-10-05 +book_author: Dev Rao +categories: [Essays] +status: abandoned +verdict: + summary: A verdict with a summary and no lists. +--- +An unknown `status` puts the book on no shelf and shows no badge. diff --git a/hugo/fixtures/sparse/data/books.yaml b/hugo/fixtures/sparse/data/books.yaml new file mode 100644 index 0000000..ba0e4a8 --- /dev/null +++ b/hugo/fixtures/sparse/data/books.yaml @@ -0,0 +1,2 @@ +- featured: true + blurb: A featured book with no title, which the new-release section skips. diff --git a/hugo/fixtures/sparse/data/events.yaml b/hugo/fixtures/sparse/data/events.yaml new file mode 100644 index 0000000..ff12828 --- /dev/null +++ b/hugo/fixtures/sparse/data/events.yaml @@ -0,0 +1,5 @@ +# Only a past event, so the events section prints nothing. +- title: A reading that already happened + date: 2020-01-01 +- where: An upcoming event with no title, which is skipped + date: 2099-01-01 diff --git a/hugo/fixtures/sparse/hugo.toml b/hugo/fixtures/sparse/hugo.toml new file mode 100644 index 0000000..3ef73f6 --- /dev/null +++ b/hugo/fixtures/sparse/hugo.toml @@ -0,0 +1,8 @@ +# One review per row of the theme's "when it is missing" table. +# No author, menus, footer, newsletter, archive page or praise. +baseURL = "https://example.org/" +title = "Sparse" + +[params.readerly] + # A protocol-relative URL, which the theme must leave as written. + favicon = "//example.com/favicon.svg" diff --git a/hugo/theme/LICENSE b/hugo/theme/LICENSE new file mode 100644 index 0000000..5e3d69e --- /dev/null +++ b/hugo/theme/LICENSE @@ -0,0 +1,24 @@ +MIT License + +Copyright (c) 2026 List of Books + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +The fonts in static/readerly/fonts are licensed separately under the SIL Open Font +License 1.1; each font folder holds its OFL.txt. diff --git a/hugo/theme/README.md b/hugo/theme/README.md new file mode 100644 index 0000000..402906d --- /dev/null +++ b/hugo/theme/README.md @@ -0,0 +1,326 @@ +# Readerly + +Readerly is a free Hugo theme for book blogs, author sites and reading logs. + +![The Readerly home page in the Paper style](https://raw.githubusercontent.com/listofbooks-net/hugo-theme-readerly/main/images/screenshot.png) + +- Review posts with a cover, star rating, book details and a verdict box. +- A reading log with yearly statistics and shelves for Reading, Read, Want to read and Did not finish. +- An author page for your own books, praise and upcoming events. +- Genre and tag pages, and a search box that runs in the visitor's browser. +- Two styles, Paper (light) and Lamplight (dark), that follow the visitor's system setting, with a toggle. +- Bundled fonts and no third-party requests. +- schema.org review data, Open Graph tags and an RSS feed. + +Every part is optional. The theme creates no posts or pages, and a section with no data prints nothing, heading included. + +Readerly needs Hugo 0.146.0 or later. The standard edition is enough. + +## Install + +### As a Hugo module (recommended) + +You need Go installed. In your site's folder: + +```sh +hugo mod init github.com// +``` + +Add the theme to `hugo.toml`: + +```toml +[module] + [[module.imports]] + path = "github.com/listofbooks-net/hugo-theme-readerly" +``` + +Run `hugo server`. To update the theme later, run `hugo mod get -u`. + +### As a Git submodule + +```sh +git submodule add https://github.com/listofbooks-net/hugo-theme-readerly.git themes/readerly +``` + +Then set `theme = "readerly"` in `hugo.toml`. + +### Try the example site + +```sh +git clone https://github.com/listofbooks-net/hugo-theme-readerly.git +cd hugo-theme-readerly/exampleSite +hugo server +``` + +The example site is Marginalia, a fictional book blog with ten reviews, a reading log and an author page. Copy any of its files into your own site as a starting point. + +### Move an existing site to Readerly + +Readerly reads what most Hugo sites already have: posts in a section such as `content/posts/`, `categories` and `tags`, the `main` menu, `params.author` and `copyright`. Existing posts render as articles. Add book keys to a post to turn it into a review. + +## Write a review + +A review is an ordinary post in one of your main sections (by default, the section with the most pages) with extra front matter. Every key except `title` is optional. Delete a key and the part it fills disappears. A post with none of the book keys renders as a plain article. + +Run `hugo new content reviews/the-salt-orchard.md` to start from a template that lists every key. + +```yaml +--- +title: The Salt Orchard +date: 2026-11-04 +lead: A novel about grief that keeps its accounts in apples. +book_author: Mira Hollis +cover: /assets/covers/salt-orchard.jpg +categories: [Literary fiction] +tags: [Historical, Tidewater series] +rating: 4.5 +series: The Tidewater Books, Book 2 of 3 +pages: 384 +publication: 2026, Harrow & Lane +status: read +finished: 2026-10-30 +summary: A grieving fruit scientist inherits a failing orchard on a salt-burned coast. +verdict: + summary: Patient, precise and quietly devastating. + liked: [The orchard as a living clock, Danny Aske] + disliked: [A too-tidy answer to the ledger mystery] +--- +The review, in Markdown. +``` + +### Book entry keys + +Reviews and the rows of `data/reading_log.yaml` share these keys. + +| Key | Type | What it does | When it is missing | +| --- | --- | --- | --- | +| `title` | text | The post headline, and the book title unless `book_title` is set. | Required. | +| `book_title` | text | The book's title, when the headline differs from it. | The title is `title`. | +| `book_author` | text | The book's author. `author` stays free for the person who wrote the post. | No "by" line. | +| `cover` | path or URL | A cover image, ideally 2:3. A post can name an image in its own page bundle. | A typeset cover with the title and author. | +| `rating` | number, 0 to 5 | Stars. Halves are allowed. | No stars anywhere, and no average rating. | +| `series` | text | Shown in the book panel and the featured card. | That row is left out. | +| `pages` | number | Page count. Counts toward "Pages read" and the progress bar. | That row is left out. | +| `publication` | text | Publication details, such as `2026, Harrow & Lane`. | That row is left out. | +| `status` | `reading`, `read`, `want` or `dnf` | Puts the book on a reading-log shelf and shows a badge. | On no shelf, and no badge. | +| `finished` | date | Orders the Read shelf and counts the book in that year's statistics. | Last on the Read shelf, and not in a year's statistics. | +| `current_page` | number | With `pages`, a progress bar for `reading` and "Stopped at page N" for `dnf`. | No progress bar. | +| `url` | path or URL | A link for a reading-log row. Posts have their own URL. | The card has no link. | + +These keys apply to posts only: + +| Key | What it does | +| --- | --- | +| `categories` | The book's genres. The first one labels the cards, fills "You might also like", and appears in the genre list. Each genre has its own page. | +| `tags` | More labels, shown as chips next to the genre. Each tag has its own page. | +| `lead` | A subtitle under the headline. | +| `summary` | The text on review cards. Without it, Hugo uses the start of the post. | +| `featured` | `true` puts the post in the large card on the home page. Without any featured post, the newest review fills it. | +| `verdict` | `summary`, `liked` and `disliked`, shown in a box after the review. | + +If a post has `rating` and `book_author`, its page carries schema.org `Review` data for search engines. + +## Keep a reading log + +Create `content/reading-log.md`: + +```yaml +--- +title: Reading log +layout: reading-log +year: 2026 +intro: + eyebrow: Reading journal + heading: What I'm reading in 2026 +--- +``` + +The log shows every review with a `status`, plus the rows of `data/reading_log.yaml`. A book you reviewed needs no row there. List the books you have not reviewed, with the same keys as a review: + +```yaml +- title: Moth Season + book_author: Pell Ordway + status: reading + pages: 368 + current_page: 142 +- title: The Ninth Wave Hotel + book_author: Bea Lindqvist + status: want +``` + +`year` limits the statistics and the Read shelf to the books finished that year. Without `year`, they cover every book. Once the page exists, the "Currently reading" band on the home page links to it. + +## Build an author page + +Create a page with `layout: author` and fill three data files: `data/books.yaml` for your own books, `data/praise.yaml` for quotes, and `data/events.yaml` for readings and signings. + +```yaml +--- +title: Isobel Thorne +layout: author +hero: + eyebrow: Novelist + portrait: /img/isobel.jpg + lead: I write novels about small towns and old trades. + buttons: + - { title: Discover The Bell Foundry, url: "#new-release" } +--- +``` + +| File | Keys | +| --- | --- | +| `data/books.yaml` | `title`, `cover`, `year`, `kind`, `blurb`, `buy_url`, `url`. The first book with `featured: true` also fills the new-release band, which reads `label`, `lead`, `facts`, `url_label` and `where_to_buy` (a list). | +| `data/praise.yaml` | `quote`, `source`, `context`. The theme adds the quotation marks. | +| `data/events.yaml` | `title`, `date`, `where`, `url`, `label`. Events dated before the build are left out. | + +## Choose and order sections + +The home page and the `author` and `reading-log` layouts are lists of sections. To remove a section, reorder sections, or use one on another page, set `sections` in the page's front matter (for the home page, in `content/_index.md`): + +```yaml +--- +sections: [intro, recent-reviews, genres] +--- +``` + +A misspelt name stops the build with an error that names it. + +| Page | Default sections | +| --- | --- | +| Home page | `intro`, `content`, `featured-review`, `recent-reviews`, `currently-reading`, `genres`, `newsletter` | +| `layout: author` | `author-hero`, `new-release`, `books`, `praise`, `events`, `newsletter` | +| `layout: reading-log` | `intro-stats`, `currently-reading`, `shelves` | + +Any page can use `layout: sections` with its own list. These are all the sections: + +| Section | Shows | Page keys it reads | +| --- | --- | --- | +| `intro` | A heading with an eyebrow, lead and buttons. | `intro: {eyebrow, heading, lead, buttons}`. The heading and lead accept Markdown, so `*past midnight*` is set in italics. | +| `intro-stats` | `intro` with the reading statistics under it. | `intro`, `year` | +| `featured-review` | The newest featured review, else the newest review. | None | +| `recent-reviews` | A grid of reviews, paginated on the home page and other list pages. | None | +| `currently-reading` | Books with `status: reading`. | `currently-reading: {heading, note}` | +| `genres` | Each genre with its number of reviews. | `genres: {heading, note}` | +| `newsletter` | A sign-up form. | `newsletter`, which overrides any `params.readerly.newsletter` key | +| `author-hero` | The author's portrait and introduction. | `hero: {eyebrow, portrait, lead, text, buttons}` | +| `new-release` | The featured book from `data/books.yaml`. | None | +| `books` | Every book in `data/books.yaml`. | `books: {heading, note}` | +| `praise` | Quotes from `data/praise.yaml`. | `praise: {heading, note}` | +| `events` | Upcoming events from `data/events.yaml`. | `events: {heading, note}` | +| `shelves` | The Read, Want to read and Did not finish shelves. | `year`, and `shelves: {read, want, dnf}`, where each takes `{note}` or `false` to hide that shelf | +| `content` | The page's own Markdown. | None | + +On page 2 and later of the home page, only `recent-reviews` shows. + +## Archive, genres and search + +The list page of your reviews' section (for example `/reviews/` or `/posts/`) is the archive. With several `mainSections`, the first one's list page is the archive and the search box searches it. It lists every review, newest first, and the search box in the header and on the 404 page searches it. Search runs in the visitor's browser, with no index file and no external service. + +Each genre (`categories`) and tag has its own page, paginated. Genre and tag names appear as your posts write them (`Science fiction` stays `Science fiction`), without Hugo's automatic title case. To give a genre page a description, create `content/categories//_index.md`: + +```yaml +--- +title: Literary fiction +eyebrow: Category +lead: Novels where not much happens and everything changes. +--- +``` + +## Configure the site + +Readerly reads the standard Hugo settings `title`, `copyright`, `pagination.pagerSize`, `menus.main` and `menus.footer`, plus a few keys under `params`. Every key is optional. + +```toml +title = "Marginalia" +copyright = "All reviews are my own." + +[pagination] + pagerSize = 9 + +[[menus.main]] + name = "Reviews" + pageRef = "/" + weight = 1 +[[menus.main]] + name = "Reading log" + pageRef = "/reading-log" + weight = 2 + +[[menus.footer]] + name = "Browse" + identifier = "browse" +[[menus.footer]] + name = "About" + pageRef = "/about" + parent = "browse" + +[params] + description = "Honest book reviews." + tagline = "Book notes & reviews by Nora Vale" + [params.author] + name = "Nora Vale" + avatar = "/img/nora.jpg" + bio = "Former school librarian who reads about sixty books a year." + url = "/about/" + [params.readerly] + style = "auto" + footerAbout = "Slow, honest reviews of novels, essays and poetry." + [params.readerly.newsletter] + action = "https://buttondown.com/api/emails/embed-subscribe/you" + heading = "One email a month." +``` + +| Key | Default | What it does | +| --- | --- | --- | +| `menus.main` | none | Header links. | +| `menus.footer` | none | Footer link columns: each top-level entry is a column heading, and its children are the links. A top-level entry with no children is not shown. | +| `copyright` | none | Printed after "© year site title." in the footer. A value that contains © is printed on its own. | +| `params.description` | none | The meta description of pages that have none of their own. | +| `params.tagline` | none | The line under the site title. | +| `params.author` | none | A name, or `name`, `avatar`, `bio`, `url` and `links` (a list of `{title, url}`). With `name` and `bio`, each review ends with a bio card. A post's own `author` overrides the byline. | +| `params.readerly.style` | `auto` | `auto` follows the visitor's system setting. `paper` and `lamplight` fix one style. | +| `params.readerly.styleToggle` | `true` | Shows the light and dark button in the header. `false` also removes the theme's script from every page. | +| `params.readerly.newsletter` | none | `action` (the form's URL) turns the newsletter band on. Also `eyebrow`, `heading`, `note`, `button`, and `field` (the email field's name, default `email`). | +| `params.readerly.footerAbout` | none | A sentence under the site title in the footer. | +| `params.readerly.relatedPosts` | `3` | How many reviews "You might also like" shows. `0` turns it off. | +| `params.readerly.dateFormat` | `2 January 2006` | A [Go date layout](https://gohugo.io/functions/time/format/). Month names follow the site language. | +| `params.readerly.favicon` | none | The site icon. | +| `params.readerly.customCSS` | none | A stylesheet loaded after the theme's. | + +Links in menus, front matter and data files may be paths on your site (`/about/`) or full URLs. Paths work when the site lives under a subpath, such as a GitHub Pages project site. + +## Change colours and fonts + +The theme's colours, fonts and spacing are CSS custom properties. To change them, add a stylesheet under `static/` and name it in `params.readerly.customCSS`: + +```css +:root { --color-accent: #1d4ed8; } +``` + +The full list is at the top of `assets/readerly/css/readerly.css`. + +## Translate the interface + +Every interface string is in `i18n/en.yaml`. To change one, or to translate the theme, add the keys you want to `i18n/.yaml` in your site: + +```yaml +recent_reviews: Neueste Rezensionen +by: "von {{ .Name }}" +``` + +## Add comments or analytics + +Readerly makes no third-party requests. To add a comment system or analytics, create one of these files in your site: + +- `layouts/_partials/comments.html` is printed at the end of each review. +- `layouts/_partials/head-custom.html` is printed at the end of ``. + +## The footer credit + +Each page ends with one link, "Theme by List of Books", to https://www.listofbooks.net/. Keeping it is how you thank us for the theme. To remove it, create an empty file at `layouts/_partials/credit.html` in your site. + +## License + +The theme is released under the MIT License. The bundled fonts, Fraunces and Literata, are under the SIL Open Font License 1.1, and each font folder holds its license text. + +This repository is a read-only copy of the `hugo/theme` folder of [listofbooks-net/readerly-theme](https://github.com/listofbooks-net/readerly-theme), where the design and the WordPress and Jekyll versions also live. Open issues here or there. Send changes to the monorepo. diff --git a/hugo/theme/archetypes/reviews.md b/hugo/theme/archetypes/reviews.md new file mode 100644 index 0000000..6f690b5 --- /dev/null +++ b/hugo/theme/archetypes/reviews.md @@ -0,0 +1,26 @@ +--- +# A review. Every key except title is optional: delete a line and that part of the page disappears. +title: "{{ replace .File.ContentBaseName "-" " " | title }}" +date: {{ .Date }} +draft: true +lead: One sentence that sums up the book, shown under the title. +book_author: A. N. Author +# cover: cover.jpg # an image in this page's folder, a path under static/, or a URL. Without one a typeset cover shows +categories: [Literary fiction] # the first is the book's genre: the label above the title, the genre list, "You might also like" +tags: [Debut] # extra chips next to the genre +rating: 4.5 # 0 to 5, halves allowed +series: The Example Trilogy, Book 1 of 3 +pages: 320 +publication: 2026, Example Press +status: read # reading, read, want or dnf: puts the book on the reading log +finished: {{ now.Format "2006-01-02" }} # orders the Read shelf and counts the book in that year's statistics +# current_page: 120 # with pages: a progress bar for reading, "Stopped at page N" for dnf +# featured: true # the newest featured review fills the big card on the home page +summary: Two or three sentences for the review cards on the home page and in the archive. +verdict: + summary: A one-line verdict. + liked: [Something that worked, Another thing] + disliked: [Something that didn't] +--- + +Write the review here, in Markdown. diff --git a/hugo/theme/assets/readerly/css/readerly.css b/hugo/theme/assets/readerly/css/readerly.css new file mode 100644 index 0000000..dc5420d --- /dev/null +++ b/hugo/theme/assets/readerly/css/readerly.css @@ -0,0 +1,1402 @@ +/* Readerly for Hugo. GENERATED by tools/build-tokens.mjs from design/assets/css. Do not edit. */ + +/* + * Readerly — bundled fonts, under the SIL Open Font License (OFL.txt beside each font) + * GENERATED from design/tokens.json by tools/build-tokens.mjs. Do not edit. + */ + +@font-face { + font-family: "Fraunces"; + font-style: normal; + font-weight: 100 900; + font-display: swap; + src: url("../fonts/fraunces/fraunces-latin-standard-normal.woff2") format("woff2"); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: "Fraunces"; + font-style: normal; + font-weight: 100 900; + font-display: swap; + src: url("../fonts/fraunces/fraunces-latin-ext-standard-normal.woff2") format("woff2"); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +@font-face { + font-family: "Fraunces"; + font-style: italic; + font-weight: 100 900; + font-display: swap; + src: url("../fonts/fraunces/fraunces-latin-standard-italic.woff2") format("woff2"); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: "Fraunces"; + font-style: italic; + font-weight: 100 900; + font-display: swap; + src: url("../fonts/fraunces/fraunces-latin-ext-standard-italic.woff2") format("woff2"); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +@font-face { + font-family: "Literata"; + font-style: normal; + font-weight: 200 900; + font-display: swap; + src: url("../fonts/literata/literata-latin-standard-normal.woff2") format("woff2"); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: "Literata"; + font-style: normal; + font-weight: 200 900; + font-display: swap; + src: url("../fonts/literata/literata-latin-ext-standard-normal.woff2") format("woff2"); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +@font-face { + font-family: "Literata"; + font-style: italic; + font-weight: 200 900; + font-display: swap; + src: url("../fonts/literata/literata-latin-standard-italic.woff2") format("woff2"); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: "Literata"; + font-style: italic; + font-weight: 200 900; + font-display: swap; + src: url("../fonts/literata/literata-latin-ext-standard-italic.woff2") format("woff2"); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* + * Readerly — design tokens + * --------------------------------------------------------------- + * GENERATED from design/tokens.json by tools/build-tokens.mjs. + * Edit tokens.json and rerun the script; do not edit this file. + * + * Porting map + * WordPress theme.json settings.color.palette -> --color-* + * settings.typography.fontFamilies -> --font-* + * settings.typography.fontSizes -> --size-* + * settings.spacing.spacingSizes -> --space-* + * settings.layout.contentSize/wideSize-> --width-* + * settings.custom -> "supporting values" + * Hugo / Jekyll / Ghost: copy this file as-is. + * + * Light ("Paper") is the default. Dark ("Lamplight") applies through + * prefers-color-scheme, and [data-theme="light" | "dark"] on overrides + * the system. Both modes use the same token names; only the values change. + */ + +:root { + color-scheme: light; + + /* Colour palette — light ("paper") */ + --color-base: #f6f1e7; /* page background: warm paper */ + --color-surface: #fcf9f3; /* cards, panels, inputs */ + --color-contrast: #2a241e; /* body text: warm ink (13.9:1 on base) */ + --color-muted: #675d52; /* meta, captions (5.6:1 on base) */ + --color-accent: #9e3d27; /* links, buttons, stars (5.9:1 on base) */ + --color-accent-2: #4a6650; /* status, tags: sage (5.6:1 on base) */ + --color-border: #ddd3c3; /* hairlines, dividers (decorative only) */ + + /* Font families (bundled in assets/fonts, SIL Open Font License) */ + --font-heading: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif; + --font-body: "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif; + + /* Fluid font sizes: min at 360px wide, max at 1280px wide */ + --size-small: clamp(0.875rem, 0.8505rem + 0.1087vw, 0.9375rem); /* 14 -> 15px */ + --size-medium: clamp(1.0625rem, 1.0136rem + 0.2174vw, 1.1875rem); /* 17 -> 19px */ + --size-large: clamp(1.25rem, 1.1522rem + 0.4348vw, 1.5rem); /* 20 -> 24px */ + --size-x-large: clamp(1.625rem, 1.3804rem + 1.087vw, 2.25rem); /* 26 -> 36px */ + --size-xx-large: clamp(2.125rem, 1.587rem + 2.3913vw, 3.5rem); /* 34 -> 56px */ + + /* Spacing scale (4/8 rhythm; the larger steps breathe with the viewport) */ + --space-20: 0.5rem; /* 8px */ + --space-30: 1rem; /* 16px */ + --space-40: 1.5rem; /* 24px */ + --space-50: clamp(2rem, 1.8rem + 0.9vw, 2.5rem); /* 32 -> 40px */ + --space-60: clamp(2.5rem, 2rem + 2.2vw, 4rem); /* 40 -> 64px */ + --space-70: clamp(3.5rem, 2.6rem + 3.6vw, 6rem); /* 56 -> 96px */ + --space-80: clamp(4.5rem, 3rem + 6.2vw, 8rem); /* 72 -> 128px */ + + /* Layout widths */ + --width-content: 680px; + --width-wide: 1200px; + + /* Supporting values (theme.json settings.custom) */ + --line-height-body: 1.7; + --line-height-heading: 1.15; + --radius: 6px; + --radius-cover: 2px 4px 4px 2px; /* a book's spine edge is squarer */ + --border-width: 1px; + --duration: 200ms; + --easing: cubic-bezier(0.23, 1, 0.32, 1); +} + +/* Dark ("lamplight") — same names, independently chosen values. + Kept identical in both blocks below: system preference and explicit override. */ +@media (prefers-color-scheme: dark) { + :root:not([data-theme="light"]) { + color-scheme: dark; + --color-base: #1b1814; /* warm charcoal */ + --color-surface: #24201b; + --color-contrast: #eee6d8; /* 14.2:1 on base */ + --color-muted: #b3a795; /* 7.4:1 on base */ + --color-accent: #e59a7e; /* 8.0:1 on base */ + --color-accent-2: #9dbfa3; /* 9.1:1 on base */ + --color-border: #3a332b; + } +} + +:root[data-theme="dark"] { + color-scheme: dark; + --color-base: #1b1814; + --color-surface: #24201b; + --color-contrast: #eee6d8; + --color-muted: #b3a795; + --color-accent: #e59a7e; + --color-accent-2: #9dbfa3; + --color-border: #3a332b; +} + +/* + * Readerly — shared stylesheet + * --------------------------------------------------------------- + * Every colour, font, size, space and width comes from tokens.css. + * Sections map to blocks / partials when porting: + * 1. Layout primitives 6. Book components 11. Author site + * 2. Base & typography 7. Grid & shelf 12. Reading log + * 3. Layout helpers 8. Featured review 13. Archive & pagination + * 4. Header & nav 9. Single review 14. Not found + * 5. Buttons & forms 10. Comments 15. Footer + */ + +/* OD-LAYOUT-PRIMITIVES v1 — structure only: display, flex/grid, overflow, wrapping, ratio, geometry. + Put this @layer first; product CSS outside the layer wins ordinary layout rules. + Native hidden and closed-dialog states take precedence over component display rules. */ +@layer od-layout { + [hidden]:not([hidden="until-found" i]) { display: none !important; } + dialog:not([open]) { display: none !important; } + + :where(.od-stack,.od-row,.od-row-top,.od-cluster,.od-grid,.od-field,.od-stat,.od-cell,.od-tile) > :where(*) { min-width: 0; } + + .od-stack { display: flex; flex-direction: column; gap: var(--od-gap, 8px); } + .od-row { display: flex; align-items: center; gap: var(--od-gap, 8px); } + .od-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--od-gap, 8px); } + .od-fill { flex: 1 1 0; min-width: 0; } + .od-fixed { flex: none; } + + .od-stat, .od-field, .od-cell { display: grid; gap: var(--od-gap, 2px); } + :where(.od-stat,.od-field,.od-cell) > :where(*) { display: block; } + + .od-media { display: block; width: 100%; height: auto; aspect-ratio: var(--od-ratio, auto); } + + .od-icon { display: inline-block; inline-size: var(--od-icon-size, 1em); block-size: var(--od-icon-size, 1em); flex: none; } + + .od-clamp-2, .od-clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; } + .od-clamp-2 { -webkit-line-clamp: 2; } + .od-clamp-3 { -webkit-line-clamp: 3; } + .od-nowrap { white-space: nowrap; } +} +:root [hidden]:where(:not([hidden="until-found" i])) { display: none; } +/* /OD-LAYOUT-PRIMITIVES v1 */ + + +/* 2. Base & typography ------------------------------------------ */ + +*, *::before, *::after { box-sizing: border-box; } + +html { + -webkit-text-size-adjust: 100%; + text-size-adjust: 100%; + scroll-padding-top: var(--space-40); +} + +body { + margin: 0; + background-color: var(--color-base); + background-image: url("../img/paper-grain.svg"); + color: var(--color-contrast); + font-family: var(--font-body); + font-size: var(--size-medium); + line-height: var(--line-height-body); + font-optical-sizing: auto; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; +} + +h1, h2, h3, h4 { + margin: 0; + font-family: var(--font-heading); + font-weight: 500; + line-height: var(--line-height-heading); + letter-spacing: -0.01em; + text-wrap: balance; +} +h1 { font-size: var(--size-xx-large); } +h2 { font-size: var(--size-x-large); } +h3 { font-size: var(--size-large); } +h4 { font-size: var(--size-medium); font-weight: 600; } + +p { margin: 0; text-wrap: pretty; } + +a { + color: var(--color-accent); + text-decoration-line: underline; + text-decoration-thickness: 1px; + text-underline-offset: 0.2em; + transition: text-decoration-thickness var(--duration) var(--easing); +} +a:hover { text-decoration-thickness: 2px; } + +:focus-visible { + outline: 2px solid var(--color-accent); + outline-offset: 3px; + border-radius: 2px; +} + +img, svg { max-width: 100%; } +img { display: block; height: auto; } + +hr, .separator { + height: 0; + margin: var(--space-60) auto; + border: 0; + border-top: var(--border-width) solid var(--color-border); +} +.separator--ornament { + width: 100%; + max-width: 8rem; + border: 0; + text-align: center; + height: auto; +} +.separator--ornament::before { + content: "\2042"; /* asterism */ + color: var(--color-muted); + font-family: var(--font-heading); + font-size: var(--size-large); +} + +ul, ol { margin: 0; padding-left: 1.25em; } +li + li { margin-top: var(--space-20); } + +blockquote { margin: 0; } + +figure { margin: 0; } +figcaption { + margin-top: var(--space-20); + color: var(--color-muted); + font-size: var(--size-small); +} + +small, .has-small-font-size { font-size: var(--size-small); } + +.visually-hidden { + position: absolute !important; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0 0 0 0); + white-space: nowrap; + border: 0; +} + +.skip-link { + position: absolute; + top: var(--space-20); + left: var(--space-20); + z-index: 10; + padding: var(--space-20) var(--space-30); + background: var(--color-contrast); + color: var(--color-base); + font-size: var(--size-small); + text-decoration: none; + border-radius: var(--radius); + transform: translateY(-200%); +} +.skip-link:focus { transform: none; } + +.eyebrow { + display: block; + color: var(--color-accent-2); + font-family: var(--font-body); + font-size: var(--size-small); + font-weight: 600; + letter-spacing: 0.08em; + text-transform: uppercase; + line-height: 1.4; +} + +.lead { + font-size: var(--size-large); + line-height: 1.55; +} + +.muted { color: var(--color-muted); } + + +/* 3. Layout helpers --------------------------------------------- */ + +.wrap { + width: 100%; + max-width: calc(var(--width-wide) + 2 * var(--space-40)); + margin-inline: auto; + padding-inline: var(--space-40); +} +.wrap--content { max-width: calc(var(--width-content) + 2 * var(--space-40)); } + +@media (max-width: 480px) { + .wrap { padding-inline: var(--space-30); } + .wrap--content { max-width: calc(var(--width-content) + 2 * var(--space-30)); } +} + +.section { padding-block: var(--space-70); } +.section--tight { padding-block: var(--space-60); } +.section + .section { padding-top: 0; } +.section--band { + background-color: var(--color-surface); + border-block: var(--border-width) solid var(--color-border); +} +.section + .section--band, .section--band + .section { padding-top: var(--space-70); } + +.section-head { + display: flex; + flex-wrap: wrap; + align-items: baseline; + justify-content: space-between; + gap: var(--space-20) var(--space-40); + margin-bottom: var(--space-50); + padding-bottom: var(--space-30); + border-bottom: var(--border-width) solid var(--color-border); +} +.section-head p { color: var(--color-muted); font-size: var(--size-small); } + +.more-link { + display: inline-flex; + align-items: center; + gap: 0.35em; + font-size: var(--size-small); + font-weight: 600; + text-decoration: none; +} +.more-link:hover { text-decoration: underline; } + +/* Columns block: stacks below 768px */ +.columns { + display: grid; + grid-template-columns: minmax(0, 1fr); + gap: var(--space-50); +} +@media (min-width: 768px) { + .columns--equal { grid-template-columns: repeat(2, minmax(0, 1fr)); } + .columns--1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } + .columns--2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } + .columns--thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); } + .columns--center { align-items: center; } +} + +/* Flow spacing for stacked text groups */ +.flow > * + * { margin-top: var(--space-30); } +.flow-lg > * + * { margin-top: var(--space-40); } + + +/* 4. Header & nav ----------------------------------------------- */ + +.site-header { + border-bottom: var(--border-width) solid var(--color-border); +} + +.site-header__bar { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: var(--space-30) var(--space-40); + padding-block: var(--space-40) var(--space-30); +} + +.site-branding { min-width: 0; } + +.site-title { + font-family: var(--font-heading); + font-size: var(--size-x-large); + font-weight: 500; + line-height: 1.1; + letter-spacing: -0.015em; +} +.site-title a { color: var(--color-contrast); text-decoration: none; } +.site-title a:hover { color: var(--color-accent); } + +.site-tagline { + margin-top: 0.25em; + color: var(--color-muted); + font-size: var(--size-small); + font-style: italic; +} + +.site-tools { + display: flex; + align-items: center; + gap: var(--space-20); + flex: 0 1 22rem; + min-width: 0; +} +@media (max-width: 640px) { + .site-tools { flex-basis: 100%; } +} +.site-tools--compact { flex: none; } +@media (max-width: 640px) { + .site-tools--compact { flex-basis: auto; } +} + +/* Site nav wraps instead of scrolling, so no label is ever clipped */ +.site-nav ul { + display: flex; + flex-wrap: wrap; + gap: 0 var(--space-40); + margin: 0; + padding: 0 0 var(--space-30); + list-style: none; +} +.site-nav li { margin: 0; } +@media (max-width: 480px) { + .site-nav ul { column-gap: var(--space-30); } +} +.site-nav a { + display: inline-block; + padding-block: var(--space-20); + color: var(--color-contrast); + font-size: var(--size-small); + font-weight: 500; + text-decoration: none; + border-bottom: 2px solid transparent; + transition: border-color var(--duration) var(--easing), color var(--duration) var(--easing); +} +.site-nav a:hover { color: var(--color-accent); border-bottom-color: var(--color-border); } +.site-nav a[aria-current="page"] { + color: var(--color-accent); + border-bottom-color: var(--color-accent); +} + +.icon-button { + display: inline-grid; + place-items: center; + flex: none; + width: 44px; + height: 44px; + padding: 0; + border: var(--border-width) solid var(--color-border); + border-radius: var(--radius); + background: var(--color-surface); + color: var(--color-contrast); + cursor: pointer; + --od-icon-size: 1.25rem; + transition: border-color var(--duration) var(--easing), color var(--duration) var(--easing); +} +.icon-button:hover { border-color: var(--color-contrast); color: var(--color-accent); } + +.theme-toggle .icon-sun { display: none; } +.theme-toggle[aria-pressed="true"] .icon-sun { display: inline-block; } +.theme-toggle[aria-pressed="true"] .icon-moon { display: none; } + + +/* 5. Buttons & forms -------------------------------------------- */ + +.buttons { + display: flex; + flex-wrap: wrap; + gap: var(--space-20) var(--space-30); +} + +.button { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 0.5em; + min-height: 44px; + padding: 0.5em 1.25em; + border: var(--border-width) solid var(--color-accent); + border-radius: var(--radius); + background: var(--color-accent); + color: var(--color-base); + font-family: var(--font-body); + font-size: var(--size-small); + font-weight: 600; + line-height: 1.2; + text-decoration: none; + cursor: pointer; + transition: background-color var(--duration) var(--easing), border-color var(--duration) var(--easing), color var(--duration) var(--easing); +} +.button:hover { + background: var(--color-contrast); + border-color: var(--color-contrast); + color: var(--color-base); +} +.button--outline { + background: transparent; + border-color: var(--color-contrast); + color: var(--color-contrast); +} +.button--outline:hover { + background: var(--color-contrast); + color: var(--color-base); +} +.button:disabled, .button[aria-disabled="true"] { + background: var(--color-border); + border-color: var(--color-border); + color: var(--color-muted); + cursor: not-allowed; +} + +.field { display: grid; gap: var(--space-20); } +.field + .field { margin-top: var(--space-30); } + +label, .label { + font-size: var(--size-small); + font-weight: 600; +} +.label-note { color: var(--color-muted); font-weight: 400; } + +.input, textarea.input { + width: 100%; + min-height: 44px; + padding: 0.55em 0.85em; + border: var(--border-width) solid var(--color-muted); + border-radius: var(--radius); + background: var(--color-surface); + color: var(--color-contrast); + font: inherit; + font-size: var(--size-medium); + line-height: 1.4; +} +textarea.input { min-height: 8rem; resize: vertical; } +.input::placeholder { color: var(--color-muted); opacity: 1; } +.input:focus-visible { outline-offset: 1px; border-color: var(--color-accent); } + +.search-form { + display: flex; + flex: 1 1 auto; + min-width: 0; +} +.search-form .input { + flex: 1 1 auto; + min-width: 0; + border-right: 0; + border-radius: var(--radius) 0 0 var(--radius); + font-size: var(--size-small); +} +.search-form .icon-button { + border-color: var(--color-muted); + border-radius: 0 var(--radius) var(--radius) 0; +} + +.form-status:empty { display: none; } +.form-status { + margin-top: var(--space-30); + color: var(--color-accent-2); + font-size: var(--size-small); + font-weight: 600; +} + + +/* 6. Book components -------------------------------------------- */ + +/* Cover image: always the full 2:3 frame, never cropped */ +.cover { + display: block; + width: 100%; + height: auto; + border-radius: var(--radius-cover); + --cover-edge: 0 0 0 0 transparent; + box-shadow: var(--cover-edge), 0 1px 2px rgb(42 36 30 / 0.18), 0 6px 14px -8px rgb(42 36 30 / 0.35); +} + +/* Dark mode: a faint 1px edge keeps dark covers from dissolving into the page */ +@media (prefers-color-scheme: dark) { + :root:not([data-theme="light"]) .cover { --cover-edge: 0 0 0 1px color-mix(in srgb, var(--color-contrast) 24%, transparent); } +} +:root[data-theme="dark"] .cover { --cover-edge: 0 0 0 1px color-mix(in srgb, var(--color-contrast) 24%, transparent); } + +/* CSS-only fallback cover for books without an image. + Mirrors the SVG covers (400 x 600): title from the top at 46/400 of the width, + author in spaced capitals near the foot, spine shading and the same grain. */ +.cover--placeholder { + container-type: inline-size; + display: flex; + flex-direction: column; + justify-content: space-between; + aspect-ratio: 2 / 3; + padding: 16% 9% 12%; + background-color: var(--color-accent-2); + background-image: + linear-gradient(90deg, rgb(0 0 0 / 0.14) 0 3%, rgb(255 255 255 / 0.12) 3% 3.5%, transparent 3.5%), + url("../img/cover-grain.svg"); + background-size: 100% 100%, 100% 100%; + color: var(--color-base); + font-family: var(--font-heading); + text-align: center; +} +.cover--placeholder strong { + font-size: 1.6rem; + font-size: 11.5cqi; + font-weight: 500; + line-height: 1.12; + letter-spacing: 0.01em; + text-wrap: balance; +} +.cover--placeholder span { + font-size: 0.6rem; + font-size: 4.25cqi; + letter-spacing: 0.2em; + line-height: 1.2; + text-transform: uppercase; +} + +.cover-link { + display: block; + transition: transform var(--duration) var(--easing); +} +.cover-link:hover { transform: translateY(-3px); } + +/* Star rating — set --rating (0–5, halves allowed) */ +.rating { + --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6l2.8 6 6.5.7-4.9 4.4 1.4 6.4L12 16.8 6.2 20.1l1.4-6.4L2.7 9.3l6.5-.7z'/%3E%3C/svg%3E"); + display: inline-block; + flex: none; + width: 5.5em; + height: 1.1em; + font-size: 1rem; + vertical-align: -0.15em; + background: linear-gradient(90deg, var(--color-accent) calc(var(--rating, 0) / 5 * 100%), var(--color-border) 0); + -webkit-mask: var(--star) 0 0 / 1.1em 1.1em repeat-x; + mask: var(--star) 0 0 / 1.1em 1.1em repeat-x; +} +.rating--large { font-size: 1.375rem; } +.rating-line { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: var(--space-20); + font-size: var(--size-small); + color: var(--color-muted); +} + +/* Status badge — text label is always present, colour only reinforces */ +.badge { + display: inline-flex; + align-items: center; + gap: 0.4em; + padding: 0.2em 0.6em; + border: var(--border-width) solid currentColor; + border-radius: var(--radius); + font-size: 0.8125rem; + font-weight: 600; + line-height: 1.4; + white-space: nowrap; +} +.badge::before { + content: ""; + width: 0.5em; + height: 0.5em; + border: 1.5px solid currentColor; + border-radius: 50%; +} +.badge--reading { color: var(--color-accent-2); } +.badge--reading::before { background: currentColor; } +.badge--read { background: var(--color-accent-2); border-color: var(--color-accent-2); color: var(--color-base); } +.badge--read::before { border-radius: 1px; background: currentColor; } +.badge--want { color: var(--color-muted); border-style: dashed; } +.badge--dnf { color: var(--color-accent); } +.badge--dnf::before { border-radius: 0; width: 0.6em; height: 0; border-width: 1.5px 0 0; } + +/* Book card — full (grid tile) */ +.book-card { + display: grid; + grid-template-rows: auto 1fr; + gap: var(--space-30); + min-width: 0; +} +.book-card__body { display: grid; align-content: start; gap: var(--space-20); min-width: 0; } +.book-card__title { + font-size: var(--size-large); + line-height: 1.2; +} +.book-card__title a { color: var(--color-contrast); text-decoration: none; } +.book-card__title a:hover { color: var(--color-accent); text-decoration: underline; text-decoration-thickness: 1px; } +.book-card__author { color: var(--color-muted); font-size: var(--size-small); } +.book-card__excerpt { font-size: var(--size-small); line-height: 1.6; } +.book-card__meta { + color: var(--color-muted); + font-size: var(--size-small); +} + +/* Book card — compact (row: small cover + details) */ +.book-card--compact { + grid-template-rows: none; + grid-template-columns: 4.5rem minmax(0, 1fr); + align-items: start; + gap: var(--space-30); +} +.book-card--compact .book-card__title { font-size: var(--size-medium); font-weight: 600; } +.book-card--compact .book-card__body { gap: 0.35rem; } +.book-card--compact .rating-line { margin-top: 0.25rem; } + +/* Reading progress */ +.progress { display: grid; gap: 0.35rem; margin-top: var(--space-20); } +.progress progress { + -webkit-appearance: none; + appearance: none; + width: 100%; + height: 6px; + border: 0; + border-radius: 3px; + background: var(--color-border); + color: var(--color-accent-2); + overflow: hidden; +} +.progress progress::-webkit-progress-bar { background: var(--color-border); } +.progress progress::-webkit-progress-value { background: var(--color-accent-2); } +.progress progress::-moz-progress-bar { background: var(--color-accent-2); } +.progress__label { + display: flex; + justify-content: space-between; + gap: var(--space-20); + color: var(--color-muted); + font-size: var(--size-small); +} + + +/* 7. Book grid & horizontal shelf ------------------------------- */ + +/* Query-loop style grid */ +.book-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); + gap: var(--space-60) var(--space-50); + margin: 0; + padding: 0; + list-style: none; +} +.book-grid > li { display: grid; margin: 0; } + +/* Fixed four-up grid: 2 columns on small screens, 4 from 900px */ +.book-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); } +@media (min-width: 900px) { + .book-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); } +} +.book-grid--compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: var(--space-40) var(--space-50); } +.book-grid--narrow-covers .book-card__cover { max-width: 12rem; } +@media (max-width: 480px) { + .book-grid--four { gap: var(--space-50) var(--space-30); } + .book-grid--four .book-card:not(.book-card--author) .book-card__excerpt { display: none; } +} + +/* List variant: same cards, cover beside text */ +.book-grid--list { grid-template-columns: minmax(0, 1fr); gap: 0; } +.book-grid--list > li { padding-block: var(--space-50); border-bottom: var(--border-width) solid var(--color-border); } +.book-grid--list > li:first-child { padding-top: 0; } +.book-grid--list .book-card { + grid-template-rows: none; + grid-template-columns: 6rem minmax(0, 1fr); + gap: var(--space-40); +} +@media (min-width: 768px) { + .book-grid--list .book-card { grid-template-columns: 9rem minmax(0, 1fr); gap: var(--space-50); } + .book-grid--list .book-card__excerpt { font-size: var(--size-medium); } +} + +/* Horizontal shelf: covers stand on a continuous ledge */ +.shelf { + --shelf-pad: var(--space-30); + display: flex; + margin: 0; + padding: 0 0 var(--space-30); + list-style: none; + overflow-x: auto; + scroll-snap-type: x proximity; + scrollbar-width: thin; + scrollbar-color: var(--color-border) transparent; +} +.shelf > li { + flex: none; + width: calc(9rem + 2 * var(--shelf-pad)); + margin: 0; + padding-inline: var(--shelf-pad); + scroll-snap-align: start; +} +.shelf > li:first-child { padding-left: 0; width: calc(9rem + var(--shelf-pad)); } +.shelf .book-card--compact { + grid-template-columns: minmax(0, 1fr); + gap: var(--space-30); +} +.shelf .book-card__cover { + margin-inline: calc(-1 * var(--shelf-pad)); + padding: 0 var(--shelf-pad) var(--space-20); + border-bottom: 6px solid var(--color-border); +} +.shelf > li:first-child .book-card__cover { margin-left: 0; padding-left: 0; } +.shelf .book-card__title { font-size: var(--size-small); } +.shelf:focus-visible { outline-offset: 6px; } + + +/* 8. Intro & featured review ------------------------------------ */ + +.intro { + display: grid; + gap: var(--space-40); + max-width: 52rem; +} +.intro h1 { font-size: var(--size-xx-large); font-weight: 400; } +.intro h1 em { color: var(--color-accent); font-style: italic; } + +.feature { + display: grid; + gap: var(--space-50); + padding: var(--space-50); + background: var(--color-surface); + border: var(--border-width) solid var(--color-border); + border-radius: var(--radius); +} +@media (min-width: 768px) { + .feature { + grid-template-columns: minmax(12rem, 18rem) minmax(0, 1fr); + align-items: center; + padding: var(--space-60); + gap: var(--space-60); + } +} +@media (max-width: 767px) { + .feature .cover-link { max-width: 14rem; } +} +.feature__body { display: grid; gap: var(--space-30); justify-items: start; } +.feature__title { font-size: var(--size-xx-large); } +.feature__title a { color: var(--color-contrast); text-decoration: none; } +.feature__title a:hover { color: var(--color-accent); } + +/* Table-of-contents list with dotted leaders (categories) */ +.toc { + margin: 0; + padding: 0; + list-style: none; + columns: 2 16rem; + column-gap: var(--space-60); +} +.toc li { margin: 0; break-inside: avoid; } +.toc a { + display: flex; + align-items: baseline; + gap: var(--space-20); + min-height: 44px; + padding-block: var(--space-20); + color: var(--color-contrast); + text-decoration: none; +} +.toc a::after { + content: ""; + order: 1; + flex: 1 1 auto; + border-bottom: 1px dotted var(--color-muted); + transform: translateY(-0.3em); +} +.toc__name { font-family: var(--font-heading); font-size: var(--size-large); } +.toc__count { order: 2; color: var(--color-muted); font-size: var(--size-small); font-variant-numeric: tabular-nums; } +.toc a:hover .toc__name { color: var(--color-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; } + +/* Tag chips */ +.tags { + display: flex; + flex-wrap: wrap; + gap: var(--space-20); + margin: 0; + padding: 0; + list-style: none; +} +.tags li { margin: 0; } +.tag { + display: inline-flex; + align-items: center; + min-height: 32px; + padding: 0.15em 0.7em; + border: var(--border-width) solid var(--color-border); + border-radius: var(--radius); + background: var(--color-surface); + color: var(--color-accent-2); + font-size: var(--size-small); + font-weight: 600; + text-decoration: none; +} +.tag:hover { border-color: var(--color-accent-2); } + +/* Newsletter */ +.newsletter { + display: grid; + gap: var(--space-40) var(--space-60); + align-items: end; +} +@media (min-width: 900px) { + .newsletter { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } +} +.newsletter__intro { display: grid; gap: var(--space-30); } +.newsletter__form { display: grid; gap: var(--space-20); } +.newsletter__row { display: flex; flex-wrap: wrap; gap: var(--space-20); } +.newsletter__row .input { flex: 1 1 14rem; } +.newsletter__row .button { flex: 0 0 auto; } +.newsletter__note { margin-top: var(--space-20); color: var(--color-muted); font-size: var(--size-small); } + + +/* 9. Single review ---------------------------------------------- */ + +.entry-header { + display: grid; + gap: var(--space-30); + padding-top: var(--space-70); +} +.entry-meta { + display: flex; + flex-wrap: wrap; + gap: var(--space-20) var(--space-30); + color: var(--color-muted); + font-size: var(--size-small); +} +.entry-meta > * + *::before { + content: "\00B7"; + margin-right: var(--space-30); +} + +/* Book details panel */ +.book-panel { + display: grid; + grid-template-columns: 7rem minmax(0, 1fr); + gap: var(--space-40); + margin-block: var(--space-60); + padding: var(--space-40); + background: var(--color-surface); + border: var(--border-width) solid var(--color-border); + border-radius: var(--radius); +} +@media (min-width: 600px) { + .book-panel { grid-template-columns: 10rem minmax(0, 1fr); gap: var(--space-50); padding: var(--space-50); } +} +.book-panel__title { font-size: var(--size-large); } +.book-panel__author { color: var(--color-muted); font-size: var(--size-small); margin-top: 0.25rem; } +.details { + display: grid; + grid-template-columns: max-content minmax(0, 1fr); + gap: var(--space-20) var(--space-30); + margin: var(--space-30) 0 0; + font-size: var(--size-small); +} +.details dt { color: var(--color-muted); } +.details dd { margin: 0; } +@media (max-width: 420px) { + .details { grid-template-columns: minmax(0, 1fr); gap: 0; } + .details dd + dt { margin-top: var(--space-20); } +} + +/* Long-form body */ +.entry-content > * + * { margin-top: var(--space-40); } +.entry-content > h2 { margin-top: var(--space-60); } +.entry-content > h3 { margin-top: var(--space-50); } +.entry-content > :is(h2, h3) + * { margin-top: var(--space-30); } +.entry-content > p:first-child::first-letter { + float: left; + margin: 0.08em 0.1em 0 0; + color: var(--color-accent); + font-family: var(--font-heading); + font-size: 3.4em; + line-height: 0.85; +} +.entry-content figure img { border-radius: var(--radius); } + +.pullquote { + margin-block: var(--space-60); + padding-block: var(--space-40); + border-block: var(--border-width) solid var(--color-contrast); + text-align: center; +} +.pullquote p { + font-family: var(--font-heading); + font-size: var(--size-x-large); + font-style: italic; + font-weight: 400; + line-height: 1.3; + text-wrap: balance; +} +.pullquote cite { + display: block; + margin-top: var(--space-30); + color: var(--color-muted); + font-size: var(--size-small); + font-style: normal; + letter-spacing: 0.06em; + text-transform: uppercase; +} + +blockquote.quote { + padding-left: var(--space-40); + border-left: 2px solid var(--color-border); + font-style: italic; +} + +/* Verdict summary */ +.verdict { + display: grid; + gap: var(--space-40); + margin-block: var(--space-60); + padding: var(--space-50); + border: var(--border-width) solid var(--color-contrast); + border-radius: var(--radius); +} +.verdict__head { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: var(--space-20) var(--space-30); +} +.verdict__summary { font-family: var(--font-heading); font-size: var(--size-large); line-height: 1.35; } +.verdict__lists { display: grid; gap: var(--space-40); } +@media (min-width: 600px) { .verdict__lists { grid-template-columns: repeat(2, minmax(0, 1fr)); } } +.verdict__lists ul { font-size: var(--size-small); } +.verdict__lists h3 { font-size: var(--size-medium); margin-bottom: var(--space-20); } + +.rating-key { padding: 0; list-style: none; } +.rating-key li { + display: grid; + grid-template-columns: 7.5rem minmax(0, 1fr); + gap: var(--space-30); + align-items: baseline; +} +.figure-portrait img { max-width: 16rem; border-radius: 50%; } + +/* Author bio card */ +.bio-card { + margin-top: var(--space-60); + display: grid; + grid-template-columns: 5rem minmax(0, 1fr); + gap: var(--space-40); + align-items: start; + padding-block: var(--space-50); + border-block: var(--border-width) solid var(--color-border); +} +@media (min-width: 600px) { .bio-card { grid-template-columns: 7rem minmax(0, 1fr); } } +.bio-card img { border-radius: 50%; } +.bio-card__body { display: grid; gap: var(--space-20); } +.bio-card__name { font-size: var(--size-large); } +.bio-card p { font-size: var(--size-small); line-height: 1.65; } + + +/* 10. Comments -------------------------------------------------- */ + +.comments { padding-top: var(--space-60); } + +.comment-list, .comment-list ol { margin: 0; padding: 0; list-style: none; } +.comment-list > li { margin: 0; padding-block: var(--space-40); border-bottom: var(--border-width) solid var(--color-border); } +.comment-list ol { margin-top: var(--space-40); padding-left: var(--space-50); border-left: var(--border-width) solid var(--color-border); } +.comment-list ol li { margin: 0; } +.comment { + display: grid; + grid-template-columns: 2.75rem minmax(0, 1fr); + gap: var(--space-30); +} +.comment__body { display: grid; gap: var(--space-20); font-size: var(--size-small); line-height: 1.65; } +.comment__meta { display: flex; flex-wrap: wrap; gap: 0 var(--space-30); align-items: baseline; } +.comment__author { font-weight: 600; font-size: var(--size-small); } +.comment__date { color: var(--color-muted); font-size: 0.8125rem; } +.comment__reply { font-size: 0.8125rem; font-weight: 600; } + +.avatar { + display: grid; + place-items: center; + width: 2.75rem; + height: 2.75rem; + border-radius: 50%; + background: var(--color-accent-2); + color: var(--color-base); + font-family: var(--font-heading); + font-size: var(--size-small); + font-weight: 600; +} +.avatar--alt { background: var(--color-accent); } +.avatar--author { background: var(--color-contrast); } + +.comment-form { margin-top: var(--space-50); } +.comment-form .buttons { margin-top: var(--space-40); } + + +/* 11. Author site ----------------------------------------------- */ + +.author-hero { + display: grid; + gap: var(--space-50); + align-items: center; +} +@media (min-width: 768px) { + .author-hero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-70); } +} +.author-hero__portrait img { border-radius: var(--radius); width: 100%; } +@media (max-width: 767px) { .author-hero__portrait { max-width: 22rem; } } +.author-hero__body { display: grid; gap: var(--space-40); justify-items: start; } +.author-hero__body h1 { font-size: clamp(2.5rem, 1.8rem + 3vw, 4.5rem); font-weight: 400; } + +.release { + display: grid; + gap: var(--space-50); + align-items: center; +} +@media (min-width: 768px) { + .release { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-70); } + .release__cover { order: 2; } +} +.release__cover { max-width: 22rem; width: 100%; justify-self: center; } +.release__body { display: grid; gap: var(--space-30); justify-items: start; } +.release__body h2 { font-size: var(--size-xx-large); } +.release__facts { color: var(--color-muted); font-size: var(--size-small); } + +.where-to-buy { + display: grid; + gap: var(--space-30); + margin-top: var(--space-60); + padding-top: var(--space-40); + border-top: var(--border-width) solid var(--color-border); +} +.where-to-buy ul { display: grid; gap: var(--space-20) var(--space-50); padding-left: 1.25em; font-size: var(--size-small); } +.where-to-buy li { margin: 0; } +@media (min-width: 768px) { .where-to-buy ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } } + +.book-grid--related { grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); } +/* Author book card: equal heights, actions pinned to the bottom on one row */ +.book-card--author .book-card__body { + display: flex; + flex-direction: column; + gap: var(--space-20); +} +.book-card__actions { + display: flex; + flex-wrap: wrap; + gap: var(--space-20); + margin-top: auto; + padding-top: var(--space-20); +} +.book-card__actions .button { padding-inline: 0.9em; white-space: nowrap; } + +.praise { + display: grid; + gap: var(--space-50); + margin: 0; + padding: 0; + list-style: none; +} +@media (min-width: 768px) { .praise { grid-template-columns: repeat(3, minmax(0, 1fr)); } } +.praise li { margin: 0; } +.praise figure { display: grid; gap: var(--space-30); padding-top: var(--space-30); border-top: 2px solid var(--color-contrast); } +.praise blockquote p { font-family: var(--font-heading); font-size: var(--size-large); font-style: italic; line-height: 1.4; } +.praise figcaption { margin: 0; } +.praise figcaption strong { display: block; color: var(--color-contrast); font-size: var(--size-small); } + +.events { margin: 0; padding: 0; list-style: none; } +.events li { margin: 0; } +.event { + display: grid; + grid-template-columns: 4.5rem minmax(0, 1fr); + gap: var(--space-40); + align-items: center; + padding-block: var(--space-40); + border-bottom: var(--border-width) solid var(--color-border); +} +.events li:first-child .event { border-top: var(--border-width) solid var(--color-border); } +@media (min-width: 640px) { + .event { grid-template-columns: 5rem minmax(0, 1fr) auto; } +} +@media (max-width: 639px) { + .event .button { grid-column: 2; justify-self: start; } +} +.event__date { + display: grid; + justify-items: center; + align-self: start; + padding: var(--space-20); + border: var(--border-width) solid var(--color-contrast); + border-radius: var(--radius); + line-height: 1.1; +} +.event__day { font-family: var(--font-heading); font-size: var(--size-x-large); } +.event__month { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; } +.event__title { font-size: var(--size-large); } +.event__where { color: var(--color-muted); font-size: var(--size-small); } + + +/* 12. Reading log ----------------------------------------------- */ + +.stats { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); + gap: var(--space-40); + margin: 0; + padding: var(--space-40) 0 0; + list-style: none; + border-top: var(--border-width) solid var(--color-border); +} +.stats li { margin: 0; } +.intro + .stats { margin-top: var(--space-50); } +.stats .od-stat { gap: 0.25rem; } +.stats__number { + font-family: var(--font-heading); + font-size: clamp(2.25rem, 1.8rem + 2vw, 3.25rem); + line-height: 1; + white-space: nowrap; + font-variant-numeric: lining-nums; +} +.stats__label { color: var(--color-muted); font-size: var(--size-small); } + +.shelf-section + .shelf-section { margin-top: var(--space-70); } +.shelf-section .section-head { margin-bottom: var(--space-40); } +.count { color: var(--color-muted); font-family: var(--font-body); font-size: var(--size-small); font-weight: 400; } + + + +/* 13. Archive & pagination -------------------------------------- */ + +.archive-header { + display: grid; + gap: var(--space-30); + padding-block: var(--space-70) var(--space-50); +} +.archive-header p { color: var(--color-muted); } + +.search-note { + margin-bottom: var(--space-50); + padding: var(--space-30) var(--space-40); + background: var(--color-surface); + border: var(--border-width) solid var(--color-border); + border-radius: var(--radius); + font-size: var(--size-small); +} + +.pagination { margin-top: var(--space-60); } +.pagination ul { + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; + gap: var(--space-20); + margin: 0; + padding: 0; + list-style: none; +} +.pagination li { margin: 0; } +.pagination li > a, .pagination li > span { + display: inline-grid; + place-items: center; + min-width: 44px; + min-height: 44px; + padding-inline: var(--space-30); + border: var(--border-width) solid transparent; + border-radius: var(--radius); + color: var(--color-contrast); + font-size: var(--size-small); + text-decoration: none; +} +.pagination li > a:hover { border-color: var(--color-contrast); } +.pagination [aria-current="page"] { + background: var(--color-contrast); + color: var(--color-base); + font-weight: 600; +} +.pagination .pagination__dir { display: inline-flex; align-items: center; gap: 0.4em; font-weight: 600; } +.pagination .is-disabled { color: var(--color-muted); font-weight: 400; } + + +/* 14. Not found ------------------------------------------------- */ + +.not-found { + display: grid; + gap: var(--space-40); + justify-items: start; + padding-block: var(--space-80) var(--space-60); +} +.not-found__code { + font-family: var(--font-heading); + font-size: clamp(5rem, 3rem + 10vw, 10rem); + font-weight: 300; + font-style: italic; + line-height: 0.9; + color: var(--color-accent); +} +.not-found .search-form { width: 100%; max-width: 32rem; } +.not-found .search-form .input { font-size: var(--size-medium); } +.not-found .search-form .icon-button { width: auto; padding-inline: var(--space-40); gap: var(--space-20); display: inline-flex; font: inherit; font-size: var(--size-small); font-weight: 600; } + + +/* 15. Footer ---------------------------------------------------- */ + +/* Pages that end in plain content get one section of breathing room; + pages that end in a section already carry their own bottom padding. */ +main > :last-child:not(.section) { margin-bottom: var(--space-70); } +main:has(> .section--band:last-child) + .site-footer { border-top: 0; } + +.site-footer { + margin-top: 0; + padding-block: var(--space-60) var(--space-40); + border-top: var(--border-width) solid var(--color-border); + font-size: var(--size-small); +} +.site-footer__grid { + display: grid; + gap: var(--space-50); +} +@media (min-width: 768px) { + .site-footer__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); } +} +.site-footer h2 { + margin-bottom: var(--space-30); + font-family: var(--font-body); + font-size: var(--size-small); + font-weight: 600; + letter-spacing: 0.08em; + text-transform: uppercase; + color: var(--color-muted); +} +.site-footer .site-title { font-size: var(--size-large); margin-bottom: var(--space-20); } +.site-footer p { color: var(--color-muted); max-width: 32rem; } +.footer-links { margin: 0; padding: 0; list-style: none; } +.footer-links li + li { margin-top: 0.25rem; } +.footer-links a { color: var(--color-contrast); text-decoration: none; display: inline-block; padding-block: 0.3rem; } +.footer-links a:hover { color: var(--color-accent); text-decoration: underline; } +.site-footer__bottom { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + gap: var(--space-20) var(--space-40); + margin-top: var(--space-60); + padding-top: var(--space-40); + border-top: var(--border-width) solid var(--color-border); + color: var(--color-muted); +} +.site-footer__bottom a { color: var(--color-muted); } +.site-footer__bottom a:hover { color: var(--color-contrast); } + + +/* Motion preferences -------------------------------------------- */ + +@media (prefers-reduced-motion: reduce) { + *, *::before, *::after { + transition-duration: 0.01ms !important; + animation-duration: 0.01ms !important; + scroll-behavior: auto !important; + } + .cover-link:hover { transform: none; } +} diff --git a/hugo/theme/assets/readerly/js/filter.js b/hugo/theme/assets/readerly/js/filter.js new file mode 100644 index 0000000..fa2ee74 --- /dev/null +++ b/hugo/theme/assets/readerly/js/filter.js @@ -0,0 +1,31 @@ +/* + * Readerly archive search. Narrows the archive list to ?s= (words in the title, + * author, series, genres or tags). Without JavaScript the page lists every review. + */ +(function () { + if (!window.URLSearchParams) return; + var search = (new URLSearchParams(window.location.search).get("s") || "").trim(); + if (!search) return; + + document.addEventListener("DOMContentLoaded", function () { + var list = document.querySelector("[data-filter-list]"); + var note = document.querySelector("[data-search-note]"); + if (!list) return; + + var words = search.toLowerCase().split(/\s+/).filter(Boolean); + var shown = 0; + Array.prototype.forEach.call(list.children, function (item) { + var text = item.getAttribute("data-search") || ""; + var match = words.every(function (word) { return text.indexOf(word) !== -1; }); + item.hidden = !match; + if (match) shown += 1; + }); + + if (!note) return; + var term = note.querySelector("[data-search-term]"); + if (term) term.textContent = search; + var count = note.getAttribute(shown === 0 ? "data-none" : shown === 1 ? "data-one" : "data-many") || ""; + note.appendChild(document.createTextNode(" " + count.replace("%n", shown))); + note.hidden = false; + }); +})(); diff --git a/hugo/theme/assets/readerly/js/theme.js b/hugo/theme/assets/readerly/js/theme.js new file mode 100644 index 0000000..ed66ec6 --- /dev/null +++ b/hugo/theme/assets/readerly/js/theme.js @@ -0,0 +1,88 @@ +/* + * Readerly — optional enhancements. Every page works without this file. + * - Light/dark toggle (remembers the choice; otherwise follows the system) + * - Friendly confirmation for demo forms (newsletter, comments) + * - Search term echo on the archive page + * Loaded in so a saved theme applies before first paint. + */ +(function () { + var root = document.documentElement; + var STORAGE_KEY = "readerly-theme"; + var darkQuery = window.matchMedia ? window.matchMedia("(prefers-color-scheme: dark)") : null; + + function readStoredTheme() { + try { + return localStorage.getItem(STORAGE_KEY); + } catch (error) { + return null; + } + } + + function storeTheme(value) { + try { + localStorage.setItem(STORAGE_KEY, value); + } catch (error) { + /* Storage blocked: the choice lasts for this page view only. */ + } + } + + function effectiveTheme() { + var explicit = root.getAttribute("data-theme"); + if (explicit === "light" || explicit === "dark") return explicit; + return darkQuery && darkQuery.matches ? "dark" : "light"; + } + + var stored = readStoredTheme(); + if (stored === "light" || stored === "dark") root.setAttribute("data-theme", stored); + + function initThemeToggle() { + var toggle = document.querySelector("[data-theme-toggle]"); + if (!toggle) return; + + function sync() { + toggle.setAttribute("aria-pressed", effectiveTheme() === "dark" ? "true" : "false"); + } + + toggle.hidden = false; + sync(); + toggle.addEventListener("click", function () { + var next = effectiveTheme() === "dark" ? "light" : "dark"; + root.setAttribute("data-theme", next); + storeTheme(next); + sync(); + }); + if (darkQuery && darkQuery.addEventListener) darkQuery.addEventListener("change", sync); + } + + function initDemoForms() { + var forms = document.querySelectorAll("form[data-demo-form]"); + Array.prototype.forEach.call(forms, function (form) { + var status = form.querySelector("[data-form-status]"); + form.addEventListener("submit", function (event) { + event.preventDefault(); + if (!form.checkValidity()) { + form.reportValidity(); + return; + } + form.reset(); + if (status) status.textContent = status.getAttribute("data-message") || ""; + }); + }); + } + + function initSearchNote() { + var note = document.querySelector("[data-search-note]"); + if (!note || !window.URLSearchParams) return; + var term = new URLSearchParams(window.location.search).get("s"); + if (!term) return; + var slot = note.querySelector("[data-search-term]"); + if (slot) slot.textContent = term; + note.hidden = false; + } + + document.addEventListener("DOMContentLoaded", function () { + initThemeToggle(); + initDemoForms(); + initSearchNote(); + }); +})(); diff --git a/hugo/theme/exampleSite/content/_index.md b/hugo/theme/exampleSite/content/_index.md new file mode 100644 index 0000000..dbb31e1 --- /dev/null +++ b/hugo/theme/exampleSite/content/_index.md @@ -0,0 +1,10 @@ +--- +title: Marginalia +intro: + eyebrow: Book notes since 2019 + heading: Honest reviews of the books that kept me up *past midnight*, and a few that didn’t. + lead: I’m Nora. I read about sixty books a year, mostly literary fiction, quiet fantasy and essays, and write about the ones that stay with me. + buttons: + - { title: Read the latest review, url: /reviews/the-salt-orchard/ } + - { title: See my reading log, url: /reading-log/ } +--- diff --git a/hugo/theme/exampleSite/content/about.md b/hugo/theme/exampleSite/content/about.md new file mode 100644 index 0000000..b790d8f --- /dev/null +++ b/hugo/theme/exampleSite/content/about.md @@ -0,0 +1,37 @@ +--- +title: Hello, I’m Nora +eyebrow: About +lead: "Marginalia is where I write about the books I read: slowly, honestly, and usually with a cup of tea going cold beside me." +description: About Nora Vale and how Marginalia reviews and rates books. +--- + +

I was a school librarian for eleven years. The best part of the job was the five minutes after the bell, when a student would come back to the desk and say “Have you got another one like that?” This site is my attempt to keep having that conversation.

+ +
+ }}" width="400" height="400" alt="Portrait placeholder for Nora Vale"> +
Me, approximately.
+
+ +

I read about sixty books a year. Most of them are literary fiction, quieter fantasy, essays and the occasional slim book of poems. I don’t review everything I read; you can see the full list, abandoned books included, in my }}">reading log.

+ +

How I rate books

+
    +
  • A book I’ll press into people’s hands. Rare: about one a year.
  • +
  • Excellent, with a flaw or two I could name.
  • +
  • Good company. Glad I read it, unlikely to reread it.
  • +
  • Something didn’t work for me, and I’ll say what.
  • +
  • I finished it so you don’t have to. I almost never post these.
  • +
+ +

Review copies

+

I’m happy to receive review copies, but I can’t promise a review, and I’ll always say when a book was sent to me. I don’t accept payment for reviews, and I don’t run sponsored posts.

+ +
+

“A reader lives a thousand lives before he dies. The man who never reads lives only one.”

+
+

A line I had pinned above the library desk for years. I’ve since stopped worrying about who said it first.

+ +
+ +

Say hello

+

Recommendations, disagreements and photos of your own teetering piles are all welcome at nora@example.com.

diff --git a/hugo/theme/exampleSite/content/author.md b/hugo/theme/exampleSite/content/author.md new file mode 100644 index 0000000..64a7cd0 --- /dev/null +++ b/hugo/theme/exampleSite/content/author.md @@ -0,0 +1,21 @@ +--- +layout: author +title: Isobel Thorne +description: Isobel Thorne writes novels about small towns, old trades and the people who keep them going. +hero: + eyebrow: Novelist + portrait: /assets/img/portrait-isobel.svg + lead: I write novels about small towns, old trades and the people who keep them going. My fourth book, The Bell Foundry, is out now. + text: I live on the edge of a fen with my husband, a lurcher called Pip and far too many notebooks. Before writing full time I restored church clocks, which explains a great deal. + buttons: + - { title: Discover The Bell Foundry, url: "#new-release" } + - { title: Join my newsletter, url: "#newsletter" } +books: + note: Four novels, all standalone +events: + note: Readings, signings and workshops +newsletter: + eyebrow: Letters from the fen + heading: "A short letter every season: new books, works in progress and the odd clock story." + note: Four emails a year. Unsubscribe whenever you like. +--- diff --git a/hugo/theme/exampleSite/content/categories/literary-fiction/_index.md b/hugo/theme/exampleSite/content/categories/literary-fiction/_index.md new file mode 100644 index 0000000..f0c360c --- /dev/null +++ b/hugo/theme/exampleSite/content/categories/literary-fiction/_index.md @@ -0,0 +1,5 @@ +--- +title: Literary fiction +eyebrow: Category +lead: Novels where not much happens and everything changes. Family sagas, quiet grief, small towns and big inner lives. +--- diff --git a/hugo/theme/exampleSite/content/reading-log.md b/hugo/theme/exampleSite/content/reading-log.md new file mode 100644 index 0000000..8131882 --- /dev/null +++ b/hugo/theme/exampleSite/content/reading-log.md @@ -0,0 +1,15 @@ +--- +layout: reading-log +title: Reading log 2026 +description: "Nora Vale's reading journal: currently reading, read in 2026, want to read and did not finish." +year: 2026 +intro: + eyebrow: Reading journal + heading: What I’m reading in 2026 + lead: Every book I start goes in here, including the ones I abandon. Ratings are out of five; half stars are allowed when a book refuses to settle. +currently-reading: + note: Updated 10 November 2026 +shelves: + want: { note: The pile by the bed } + dnf: { note: "Not bad books, just not mine right now" } +--- diff --git a/hugo/theme/exampleSite/content/reviews/_index.md b/hugo/theme/exampleSite/content/reviews/_index.md new file mode 100644 index 0000000..faf6192 --- /dev/null +++ b/hugo/theme/exampleSite/content/reviews/_index.md @@ -0,0 +1,4 @@ +--- +title: All reviews +lead: Every review on Marginalia, newest first. +--- diff --git a/hugo/theme/exampleSite/content/reviews/a-house-of-paper-moths.md b/hugo/theme/exampleSite/content/reviews/a-house-of-paper-moths.md new file mode 100644 index 0000000..a8c518a --- /dev/null +++ b/hugo/theme/exampleSite/content/reviews/a-house-of-paper-moths.md @@ -0,0 +1,16 @@ +--- +title: A House of Paper Moths +date: 2026-10-28 +book_author: Celia Marr +cover: /assets/covers/paper-moths.svg +categories: [Fantasy] +rating: 4.5 +pages: 412 +status: read +finished: 2026-10-24 +summary: "A bookbinder’s apprentice discovers that the moths eating the library’s oldest folios are rewriting them. Strange, tender and very funny." +--- + +Odile has spent four years learning to stitch signatures and pare leather when she notices that the library's oldest folios are changing. The moths that live in them are not eating the pages. They are editing them. + +Marr plays the premise for comedy first, and the jokes are good, but the book slowly turns into a story about who gets to keep a record and who gets left out of it. I laughed a lot and cried once, on a bus. diff --git a/hugo/theme/exampleSite/content/reviews/fieldwork.md b/hugo/theme/exampleSite/content/reviews/fieldwork.md new file mode 100644 index 0000000..25a093a --- /dev/null +++ b/hugo/theme/exampleSite/content/reviews/fieldwork.md @@ -0,0 +1,17 @@ +--- +title: Fieldwork +date: 2026-10-21 +book_author: Dara Quell +cover: /assets/covers/fieldwork.svg +categories: [Essays] +tags: [Five stars] +rating: 5 +pages: 256 +status: read +finished: 2026-10-17 +summary: "Twelve essays on walking the same three miles of farmland for a year. The best nature writing I’ve read in a decade, and the least preachy." +--- + +Quell walks the same three miles of farmland every week for a year and writes one essay a month about what changes. Hedges, a flooded lane, a farmer who stops to talk about drainage for an hour. + +There is no sermon here. Quell trusts the reader to notice what is being lost, and the restraint makes it land harder than any warning could. diff --git a/hugo/theme/exampleSite/content/reviews/letters-to-the-lighthouse.md b/hugo/theme/exampleSite/content/reviews/letters-to-the-lighthouse.md new file mode 100644 index 0000000..86a9346 --- /dev/null +++ b/hugo/theme/exampleSite/content/reviews/letters-to-the-lighthouse.md @@ -0,0 +1,17 @@ +--- +title: Letters to the Lighthouse +date: 2026-09-09 +book_author: Agnes Whitlow +cover: /assets/covers/lighthouse-letters.svg +categories: [Literary fiction] +tags: [Epistolary] +rating: 4 +pages: 304 +status: read +finished: 2026-09-05 +summary: "A novel in letters between a lighthouse keeper and the widow who writes to him by mistake. Gentle, witty, and sad in all the right places." +--- + +A widow writes to her late husband's old address and the letter reaches a lighthouse keeper instead. He writes back. + +Whitlow keeps the letters short and funny, and lets the sadness sit between them. A gentle book that knows exactly when to stop. diff --git a/hugo/theme/exampleSite/content/reviews/northern-ledger.md b/hugo/theme/exampleSite/content/reviews/northern-ledger.md new file mode 100644 index 0000000..3990cf7 --- /dev/null +++ b/hugo/theme/exampleSite/content/reviews/northern-ledger.md @@ -0,0 +1,16 @@ +--- +title: Northern Ledger +date: 2026-10-07 +book_author: Tomas Arvid +cover: /assets/covers/northern-ledger.svg +categories: [Mystery] +rating: 4 +pages: 336 +status: read +finished: 2026-10-03 +summary: "A tax inspector, a frozen harbour town and a set of accounts that don’t add up. A slow-burn mystery with a wonderfully dry narrator." +--- + +An inspector arrives in a frozen harbour town to audit a fish cannery and finds that the numbers balance perfectly. That is the problem. + +Arvid's narrator is so dry that the jokes take a second to arrive. The mystery burns slowly, and the solution is hidden in plain sight on page forty. diff --git a/hugo/theme/exampleSite/content/reviews/the-glass-cartographer.md b/hugo/theme/exampleSite/content/reviews/the-glass-cartographer.md new file mode 100644 index 0000000..6bc8b2e --- /dev/null +++ b/hugo/theme/exampleSite/content/reviews/the-glass-cartographer.md @@ -0,0 +1,16 @@ +--- +title: The Glass Cartographer +date: 2026-10-14 +book_author: Ravi Anand-Moss +cover: /assets/covers/glass-cartographer.svg +categories: [Science fiction] +rating: 4 +pages: 448 +status: read +finished: 2026-10-10 +summary: "A mapmaker on a generation ship charts corridors that keep moving. Big ideas, small kindnesses, and an ending that earns its hope." +--- + +The ship has been travelling for three hundred years and its corridors have started to rearrange themselves. Tamsin is the only person who still makes maps, and nobody believes hers. + +The ideas are big, but the book is built from small scenes: a shared meal, a borrowed coat, an argument about a door. The ending is hopeful, and it earns it. diff --git a/hugo/theme/exampleSite/content/reviews/the-quiet-arithmetic.md b/hugo/theme/exampleSite/content/reviews/the-quiet-arithmetic.md new file mode 100644 index 0000000..affddbd --- /dev/null +++ b/hugo/theme/exampleSite/content/reviews/the-quiet-arithmetic.md @@ -0,0 +1,16 @@ +--- +title: The Quiet Arithmetic +date: 2026-09-16 +book_author: Jun Sato-Bell +cover: /assets/covers/quiet-arithmetic.svg +categories: [Literary fiction] +rating: 3.5 +pages: 272 +status: read +finished: 2026-09-12 +summary: "A retired maths teacher counts her way through a year of small losses. Beautifully written, if a little too restrained for me." +--- + +Emiko has retired from teaching mathematics and keeps counting anyway: steps to the shop, pills in a box, friends who still call. + +The prose is lovely and exact. I wanted the book to raise its voice once, and it never quite does. diff --git a/hugo/theme/exampleSite/content/reviews/the-salt-orchard.md b/hugo/theme/exampleSite/content/reviews/the-salt-orchard.md new file mode 100644 index 0000000..c21a85a --- /dev/null +++ b/hugo/theme/exampleSite/content/reviews/the-salt-orchard.md @@ -0,0 +1,59 @@ +--- +title: The Salt Orchard +date: 2026-11-04 +book_author: Mira Hollis +cover: /assets/covers/salt-orchard.svg +categories: [Literary fiction] +tags: [Historical, Tidewater series] +rating: 4.5 +pages: 384 +status: read +finished: 2026-10-30 +summary: "A grieving fruit scientist inherits a failing orchard on a salt-burned coast, along with a ledger that seems to predict every bad harvest. Hollis writes weather the way other novelists write villains." +lead: A novel about grief that keeps its accounts in apples. +series: The Tidewater Books, Book 2 of 3 +publication: 2026, Harrow & Lane +verdict: + summary: Patient, precise and quietly devastating. The best novel about inheritance I’ve read this year, give or take one too-tidy ending. + liked: + - The orchard as a living, seasonal clock + - Danny Aske, the book’s grumpy heart + - Prose that makes weather feel like plot + disliked: + - A too-tidy answer to the ledger mystery + - A becalmed middle stretch +--- + +

Some novels open with a death. The Salt Orchard opens with an inventory. Nell Garrow, a fruit scientist who has spent twenty years cataloguing heritage apples for a seed bank, arrives at her late aunt’s orchard on the northern coast and counts what is left: forty-one trees, a cider press with a cracked screw, two elderly goats, and a leather-bound ledger in which every harvest since 1911 has been written down in the same small, slanting hand.

+

It’s the second book in Mira Hollis’s Tidewater sequence, after }}">The Tide Ledger, but you could start here. What connects the books is the coast itself (the same estuary, the same salt wind that strips the bark from the seaward side of every tree) rather than any plot you’d need to remember.

+ +

A ledger that seems to know

+

The hook, and it is a good one, is that the ledger’s oldest entries seem to anticipate the orchard’s worst years. A line from 1953 reads like a description of last spring’s blight. Hollis never lets this tip into the supernatural. Instead, Nell does what a scientist does: she cross-references, she charts, she argues with herself in the margins. The mystery of the ledger becomes a way for her to avoid the mystery of her aunt, a woman she loved and never really knew.

+

What I admired most is how patient the book is. Chapters are named for apple varieties, and each one moves through a single season of work: pruning, grafting, the long anxious weeks of blossom. If that sounds slow, it is, deliberately. By the time the autumn storm arrives in the final third, you know every tree on that slope, and you feel each loss.

+ +
+
+

“Grief is a ledger you keep in pencil. You keep thinking you’ll be allowed to rub it out.”

+
+
The Salt Orchard, chapter nine
+
+ +

The people on the slope

+

Hollis is very good on work, and on the people who do it. Danny Aske, the neighbour who has quietly kept the trees alive for three winters without being asked, could have been a sentimental figure. Instead he is prickly, proud and funny, and his friendship with Nell is the warmest thing in the book.

+

There’s also Ruth, the aunt’s former partner, whose letters run through the second half and who refuses, to the very end, to tell Nell what she wants to hear.

+ +
+ }}" width="1200" height="750" alt="Illustration of a stack of four books and a pear on a windowsill, with a pale arched window behind." loading="lazy"> +
My reading spot for most of October. The pear is standing in for the apples.
+
+ +

Where it stumbles

+

The ledger thread resolves a little too neatly. A late revelation about who wrote the 1953 entries ties things up like a puzzle box, while the rest of the novel is happy to leave things open. Readers who want a strong plot engine may also find the middle stretch, the summer chapters especially, becalmed.

+

I didn’t mind. I read the last eighty pages in one sitting on a wet Sunday, then went back to reread the opening inventory, which means something quite different once you know what’s coming.

+ +

Who it’s for

+
    +
  • Readers who love slow, place-rooted novels about work and family
  • +
  • Anyone who has sorted through a relative’s belongings and found a stranger there
  • +
  • Probably not for readers who need a twist every chapter
  • +
diff --git a/hugo/theme/exampleSite/content/reviews/the-tide-ledger.md b/hugo/theme/exampleSite/content/reviews/the-tide-ledger.md new file mode 100644 index 0000000..ff0b7d4 --- /dev/null +++ b/hugo/theme/exampleSite/content/reviews/the-tide-ledger.md @@ -0,0 +1,18 @@ +--- +title: The Tide Ledger +date: 2026-03-18 +book_author: Mira Hollis +cover: /assets/covers/tide-ledger.svg +categories: [Literary fiction] +tags: [Tidewater series] +rating: 4 +pages: 268 +status: read +finished: 2026-03-14 +summary: "The first Tidewater book: a coastal village, a drowned church and the woman who decides to dig it out. Where the sequence begins." +series: The Tidewater Books, Book 1 of 3 +--- + +The first Tidewater book. A coastal village, a church drowned by the estuary a century ago, and the woman who decides to dig it out. + +It is slower than its sequel and a little less sure of itself, but the coast is already the main character. diff --git a/hugo/theme/exampleSite/content/reviews/under-the-tamarind.md b/hugo/theme/exampleSite/content/reviews/under-the-tamarind.md new file mode 100644 index 0000000..3d8cac7 --- /dev/null +++ b/hugo/theme/exampleSite/content/reviews/under-the-tamarind.md @@ -0,0 +1,17 @@ +--- +title: Under the Tamarind +date: 2026-09-23 +book_author: Yemi Adesanya-Cole +cover: /assets/covers/under-the-tamarind.svg +categories: [Historical] +tags: [Literary fiction] +rating: 4 +pages: 528 +status: read +finished: 2026-09-19 +summary: "Three generations of a Lagos family across one tree’s lifetime. Sprawling, generous and full of food you can almost taste." +--- + +A tamarind tree in a Lagos courtyard watches three generations of one family argue, marry, leave and come back. + +It is a big, generous novel, and it is full of food. I finished it hungry and a little in love with everyone in it. diff --git a/hugo/theme/exampleSite/content/reviews/winter-pears.md b/hugo/theme/exampleSite/content/reviews/winter-pears.md new file mode 100644 index 0000000..018f9cc --- /dev/null +++ b/hugo/theme/exampleSite/content/reviews/winter-pears.md @@ -0,0 +1,16 @@ +--- +title: Winter Pears +date: 2026-09-30 +book_author: Lotte Brenner +cover: /assets/covers/winter-pears.svg +categories: [Poetry] +rating: 4.5 +pages: 96 +status: read +finished: 2026-09-26 +summary: "Short, plain-spoken poems about a mother’s last winter. I read it in one sitting and then again, slowly, with a pencil." +--- + +Forty short poems about the last winter of the poet's mother: hospital corridors, a radio left on, pears ripening on a sill. + +Brenner never reaches for a big image when a small one will do. I read it in one sitting, then again with a pencil. diff --git a/hugo/theme/exampleSite/data/books.yaml b/hugo/theme/exampleSite/data/books.yaml new file mode 100644 index 0000000..ce624d6 --- /dev/null +++ b/hugo/theme/exampleSite/data/books.yaml @@ -0,0 +1,38 @@ +- title: The Bell Foundry + book_author: Isobel Thorne + cover: /assets/covers/bell-foundry.svg + year: 2026 + kind: Novel + blurb: "A young caster is given the last commission of a closing foundry: a bell for a wedding no one in town wants." + buy_url: "#where-to-buy" + url: /about/ + featured: true + label: New release · out now + lead: "In a river town where the last bell foundry is about to close, a young caster is given one final commission: a bell that must ring for a wedding no one in the town wants to happen." + facts: Novel · 368 pages · Published 5 March 2026 · Hardback, ebook and audiobook + url_label: Read the first chapter + where_to_buy: + - Ask at your local independent bookshop. They can order any of my books within a few days. + - Order signed hardbacks directly from my publisher, Harrow & Lane. + - Borrow the ebook or audiobook free from your local library. +- title: A Map of Quiet Places + cover: /assets/covers/map-of-quiet-places.svg + year: 2023 + kind: Novel + blurb: A sound recordist sets out to find the quietest place left in England, and finds her estranged father there instead. + buy_url: "#where-to-buy" + url: /about/ +- title: Saltmarsh Hymns + cover: /assets/covers/saltmarsh-hymns.svg + year: 2021 + kind: Novel + blurb: A choir of fishermen’s widows, a flooded chapel and one long, disastrous rehearsal season. + buy_url: "#where-to-buy" + url: /about/ +- title: The Clockmaker’s Apprentice + cover: /assets/covers/clockmakers-apprentice.svg + year: 2019 + kind: Debut novel + blurb: Winner of a regional first-novel prize. A girl, a church clock and the summer it stopped. + buy_url: "#where-to-buy" + url: /about/ diff --git a/hugo/theme/exampleSite/data/events.yaml b/hugo/theme/exampleSite/data/events.yaml new file mode 100644 index 0000000..cdb5287 --- /dev/null +++ b/hugo/theme/exampleSite/data/events.yaml @@ -0,0 +1,14 @@ +- title: "In conversation: The Bell Foundry" + date: 2099-11-19 + where: Wren & Ash Books, York · 7 pm · Free, booking advised + url: /about/ + label: Book a place +- title: Reading and signing + date: 2099-12-03 + where: Harbour Street Library, Whitby · 6:30 pm · Free + url: /about/ +- title: "Writing small towns: a workshop" + date: 2100-01-22 + where: Online · 10 am to 1 pm GMT · 12 places + url: /about/ + label: Join the waitlist diff --git a/hugo/theme/exampleSite/data/praise.yaml b/hugo/theme/exampleSite/data/praise.yaml new file mode 100644 index 0000000..e3bf4de --- /dev/null +++ b/hugo/theme/exampleSite/data/praise.yaml @@ -0,0 +1,9 @@ +- quote: A novel that rings long after you close it. Thorne writes about craft with the authority of someone who has done it. + source: The Northern Review + context: on The Bell Foundry +- quote: Funny, exact and unexpectedly moving. I wanted to move to her fen and never leave. + source: Mira Hollis + context: author of The Salt Orchard +- quote: Thorne is the quiet master of the small-town novel. Every sentence has been weighed. + source: Lamplight Quarterly + context: on A Map of Quiet Places diff --git a/hugo/theme/exampleSite/data/reading_log.yaml b/hugo/theme/exampleSite/data/reading_log.yaml new file mode 100644 index 0000000..98a8976 --- /dev/null +++ b/hugo/theme/exampleSite/data/reading_log.yaml @@ -0,0 +1,43 @@ +- title: Moth Season + book_author: Pell Ordway + cover: /assets/covers/moth-season.svg + status: reading + pages: 368 + current_page: 142 +- title: Ninefold Bridge + book_author: Ada Merriweather + cover: /assets/covers/ninefold-bridge.svg + status: reading + pages: 290 + current_page: 210 +- title: Fen Lights + book_author: Mira Hollis + cover: /assets/covers/fen-lights.svg + status: want +- title: The Bell Foundry + book_author: Isobel Thorne + cover: /assets/covers/bell-foundry.svg + status: want +- title: The Ninth Wave Hotel + book_author: Bea Lindqvist + status: want +- title: The Brightwater Recipe Box + book_author: Polly Fenwick + cover: /assets/covers/brightwater-recipe-box.svg + status: want +- title: Atlas of Lost Rivers + book_author: Samir Haddad-Lowe + cover: /assets/covers/atlas-of-lost-rivers.svg + status: want +- title: The Long Way to Halden + book_author: Ivo Petrak + cover: /assets/covers/long-way-to-halden.svg + status: dnf + pages: 544 + current_page: 120 +- title: Small Hours + book_author: Wren Atherton + cover: /assets/covers/small-hours.svg + status: dnf + pages: 328 + current_page: 64 diff --git a/hugo/theme/exampleSite/hugo.toml b/hugo/theme/exampleSite/hugo.toml new file mode 100644 index 0000000..96924f3 --- /dev/null +++ b/hugo/theme/exampleSite/hugo.toml @@ -0,0 +1,114 @@ +# The Readerly demo site: the fictional book blog "Marginalia". +baseURL = "https://example.org/" +title = "Marginalia" +theme = "hugo-theme-readerly" +themesDir = "../.." +copyright = "All reviews are my own." + +[pagination] + pagerSize = 9 + +[markup.goldmark.renderer] + unsafe = true + +[params] + description = "Honest book reviews of literary fiction, quiet fantasy, essays and poetry." + tagline = "Book notes & reviews by Nora Vale" + + [params.author] + name = "Nora Vale" + avatar = "/assets/img/avatar-nora.svg" + bio = "Nora is a former school librarian who reads about sixty books a year and writes about the ones that stay with her. She lives in a small flat above a bakery, which is either very good or very bad for reading." + url = "/about/" + links = [ + { title = "More about Nora", url = "/about/" }, + { title = "Her reading log", url = "/reading-log/" }, + ] + + [params.readerly] + favicon = "/assets/img/favicon.svg" + footerAbout = "Slow, honest reviews of novels, essays and poetry, written at the kitchen table, mostly on Sunday mornings." + + [params.readerly.newsletter] + action = "#" + eyebrow = "The Sunday letter" + heading = "One email a month: what I read, what I loved, and what I gave up on." + note = "No spam, ever. Unsubscribe with one click." + +[[menus.main]] + name = "Reviews" + pageRef = "/" + weight = 1 + +[[menus.main]] + name = "Reading log" + pageRef = "/reading-log" + weight = 2 + +[[menus.main]] + name = "Archive" + pageRef = "/reviews" + weight = 3 + +[[menus.main]] + name = "About" + pageRef = "/about" + weight = 4 + +[[menus.footer]] + identifier = "browse" + name = "Browse" + weight = 1 + +[[menus.footer]] + name = "Reviews" + parent = "browse" + pageRef = "/" + weight = 1 + +[[menus.footer]] + name = "Reading log" + parent = "browse" + pageRef = "/reading-log" + weight = 2 + +[[menus.footer]] + name = "Archive" + parent = "browse" + pageRef = "/reviews" + weight = 3 + +[[menus.footer]] + name = "About" + parent = "browse" + pageRef = "/about" + weight = 4 + +[[menus.footer]] + identifier = "genres" + name = "Genres" + weight = 2 + +[[menus.footer]] + name = "Literary fiction" + parent = "genres" + pageRef = "/categories/literary-fiction" + weight = 1 + +[[menus.footer]] + name = "Fantasy" + parent = "genres" + pageRef = "/categories/fantasy" + weight = 2 + +[[menus.footer]] + name = "Historical" + parent = "genres" + pageRef = "/tags/historical" + weight = 3 + +[[menus.footer]] + name = "Poetry" + parent = "genres" + pageRef = "/categories/poetry" + weight = 4 diff --git a/hugo/theme/exampleSite/layouts/_shortcodes/asset-url.html b/hugo/theme/exampleSite/layouts/_shortcodes/asset-url.html new file mode 100644 index 0000000..8831b5e --- /dev/null +++ b/hugo/theme/exampleSite/layouts/_shortcodes/asset-url.html @@ -0,0 +1,2 @@ +{{- /* relURL resolves "/x" against the host, not the baseURL, so the slash goes first. */ -}} +{{- relURL (strings.TrimPrefix "/" (.Get 0)) -}} diff --git a/hugo/theme/exampleSite/static/assets/covers/atlas-of-lost-rivers.svg b/hugo/theme/exampleSite/static/assets/covers/atlas-of-lost-rivers.svg new file mode 100644 index 0000000..a042cfb --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/atlas-of-lost-rivers.svg @@ -0,0 +1,11 @@ + + + + + +Atlas of LostRivers +SAMIR HADDAD-LOWE + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/bell-foundry.svg b/hugo/theme/exampleSite/static/assets/covers/bell-foundry.svg new file mode 100644 index 0000000..c269232 --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/bell-foundry.svg @@ -0,0 +1,11 @@ + + + + + +The BellFoundry +ISOBEL THORNE + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/brightwater-recipe-box.svg b/hugo/theme/exampleSite/static/assets/covers/brightwater-recipe-box.svg new file mode 100644 index 0000000..a1bf4f9 --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/brightwater-recipe-box.svg @@ -0,0 +1,11 @@ + + + + + +TheBrightwaterRecipe Box +POLLY FENWICK + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/clockmakers-apprentice.svg b/hugo/theme/exampleSite/static/assets/covers/clockmakers-apprentice.svg new file mode 100644 index 0000000..e83b6ca --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/clockmakers-apprentice.svg @@ -0,0 +1,11 @@ + + + + + +TheClockmaker’sApprentice +ISOBEL THORNE + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/fen-lights.svg b/hugo/theme/exampleSite/static/assets/covers/fen-lights.svg new file mode 100644 index 0000000..98ae993 --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/fen-lights.svg @@ -0,0 +1,11 @@ + + + + + +Fen Lights +MIRA HOLLIS + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/fieldwork.svg b/hugo/theme/exampleSite/static/assets/covers/fieldwork.svg new file mode 100644 index 0000000..1af198d --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/fieldwork.svg @@ -0,0 +1,11 @@ + + + + + +Fieldwork +DARA QUELL + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/glass-cartographer.svg b/hugo/theme/exampleSite/static/assets/covers/glass-cartographer.svg new file mode 100644 index 0000000..45f1d01 --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/glass-cartographer.svg @@ -0,0 +1,11 @@ + + + + + +The GlassCartographer +RAVI ANAND-MOSS + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/lighthouse-letters.svg b/hugo/theme/exampleSite/static/assets/covers/lighthouse-letters.svg new file mode 100644 index 0000000..dea9aaf --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/lighthouse-letters.svg @@ -0,0 +1,11 @@ + + + + + +Letters to theLighthouse +AGNES WHITLOW + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/long-way-to-halden.svg b/hugo/theme/exampleSite/static/assets/covers/long-way-to-halden.svg new file mode 100644 index 0000000..8a37f65 --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/long-way-to-halden.svg @@ -0,0 +1,11 @@ + + + + + +The Long Wayto Halden +IVO PETRAK + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/map-of-quiet-places.svg b/hugo/theme/exampleSite/static/assets/covers/map-of-quiet-places.svg new file mode 100644 index 0000000..82abacc --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/map-of-quiet-places.svg @@ -0,0 +1,11 @@ + + + + + +A Map of QuietPlaces +ISOBEL THORNE + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/moth-season.svg b/hugo/theme/exampleSite/static/assets/covers/moth-season.svg new file mode 100644 index 0000000..a94d1c7 --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/moth-season.svg @@ -0,0 +1,11 @@ + + + + + +Moth Season +PELL ORDWAY + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/ninefold-bridge.svg b/hugo/theme/exampleSite/static/assets/covers/ninefold-bridge.svg new file mode 100644 index 0000000..a49bb25 --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/ninefold-bridge.svg @@ -0,0 +1,11 @@ + + + + + +NinefoldBridge +ADA MERRIWEATHER + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/northern-ledger.svg b/hugo/theme/exampleSite/static/assets/covers/northern-ledger.svg new file mode 100644 index 0000000..898f626 --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/northern-ledger.svg @@ -0,0 +1,11 @@ + + + + + +NorthernLedger +TOMAS ARVID + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/paper-moths.svg b/hugo/theme/exampleSite/static/assets/covers/paper-moths.svg new file mode 100644 index 0000000..bc460e6 --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/paper-moths.svg @@ -0,0 +1,11 @@ + + + + + +A House ofPaper Moths +CELIA MARR + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/quiet-arithmetic.svg b/hugo/theme/exampleSite/static/assets/covers/quiet-arithmetic.svg new file mode 100644 index 0000000..fe05550 --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/quiet-arithmetic.svg @@ -0,0 +1,11 @@ + + + + + +The QuietArithmetic +JUN SATO-BELL + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/salt-orchard.svg b/hugo/theme/exampleSite/static/assets/covers/salt-orchard.svg new file mode 100644 index 0000000..df6c1d6 --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/salt-orchard.svg @@ -0,0 +1,11 @@ + + + + + +The SaltOrchard +MIRA HOLLIS + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/saltmarsh-hymns.svg b/hugo/theme/exampleSite/static/assets/covers/saltmarsh-hymns.svg new file mode 100644 index 0000000..36b0481 --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/saltmarsh-hymns.svg @@ -0,0 +1,11 @@ + + + + + +SaltmarshHymns +ISOBEL THORNE + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/small-hours.svg b/hugo/theme/exampleSite/static/assets/covers/small-hours.svg new file mode 100644 index 0000000..e9b839a --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/small-hours.svg @@ -0,0 +1,11 @@ + + + + + +Small Hours +WREN ATHERTON + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/tide-ledger.svg b/hugo/theme/exampleSite/static/assets/covers/tide-ledger.svg new file mode 100644 index 0000000..e3672d8 --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/tide-ledger.svg @@ -0,0 +1,11 @@ + + + + + +The TideLedger +MIRA HOLLIS + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/under-the-tamarind.svg b/hugo/theme/exampleSite/static/assets/covers/under-the-tamarind.svg new file mode 100644 index 0000000..4f75b1b --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/under-the-tamarind.svg @@ -0,0 +1,11 @@ + + + + + +Under theTamarind +YEMI ADESANYA-COLE + + + + diff --git a/hugo/theme/exampleSite/static/assets/covers/winter-pears.svg b/hugo/theme/exampleSite/static/assets/covers/winter-pears.svg new file mode 100644 index 0000000..d3d992f --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/covers/winter-pears.svg @@ -0,0 +1,11 @@ + + + + + +Winter Pears +LOTTE BRENNER + + + + diff --git a/hugo/theme/exampleSite/static/assets/img/avatar-nora.svg b/hugo/theme/exampleSite/static/assets/img/avatar-nora.svg new file mode 100644 index 0000000..9e150d7 --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/img/avatar-nora.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/hugo/theme/exampleSite/static/assets/img/favicon.svg b/hugo/theme/exampleSite/static/assets/img/favicon.svg new file mode 100644 index 0000000..0eb19b2 --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/img/favicon.svg @@ -0,0 +1 @@ + diff --git a/hugo/theme/exampleSite/static/assets/img/portrait-isobel.svg b/hugo/theme/exampleSite/static/assets/img/portrait-isobel.svg new file mode 100644 index 0000000..33482e1 --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/img/portrait-isobel.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/hugo/theme/exampleSite/static/assets/img/still-life.svg b/hugo/theme/exampleSite/static/assets/img/still-life.svg new file mode 100644 index 0000000..67ec1e1 --- /dev/null +++ b/hugo/theme/exampleSite/static/assets/img/still-life.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/hugo/theme/go.mod b/hugo/theme/go.mod new file mode 100644 index 0000000..8b3ab51 --- /dev/null +++ b/hugo/theme/go.mod @@ -0,0 +1,3 @@ +module github.com/listofbooks-net/hugo-theme-readerly + +go 1.22 diff --git a/hugo/theme/hugo.toml b/hugo/theme/hugo.toml new file mode 100644 index 0000000..3826ba5 --- /dev/null +++ b/hugo/theme/hugo.toml @@ -0,0 +1,10 @@ +# Theme defaults. A site's own hugo.toml overrides any of these. +[module] + [module.hugoVersion] + min = "0.146.0" + +[params.readerly] + style = "auto" + styleToggle = true + relatedPosts = 3 + dateFormat = "2 January 2006" diff --git a/hugo/theme/i18n/en.yaml b/hugo/theme/i18n/en.yaml new file mode 100644 index 0000000..f69e124 --- /dev/null +++ b/hugo/theme/i18n/en.yaml @@ -0,0 +1,106 @@ +# Every interface string in Readerly. To change one, or to translate the theme, +# add the same key to i18n/.yaml in your site. +skip: Skip to content +search_reviews: Search reviews +search_placeholder: Search by title, author or genre +search: Search +dark_theme: Dark theme +primary_nav: Primary +by: "by {{ .Name }}" +byline: By +min_read: "{{ .Count }} min read" +latest_review: Latest review +featured_review: Featured review +read_the_review: Read the review +recent_reviews: Recent reviews +all_reviews: All reviews +browse_all_reviews: Browse all reviews +page_n: "Page {{ .Count }}" +page: Page +pagination: Pagination +newer: Newer +older: Older +currently_reading: Currently reading +my_reading_log: My reading log +browse_by_genre: Browse by genre +reviews_and_counting: + one: "1 review and counting" + other: "{{ .Count }} reviews and counting" +reviews: + one: "1 review" + other: "{{ .Count }} reviews" +books: + one: "1 book" + other: "{{ .Count }} books" +rated: "Rated {{ .Count }} out of 5" +status_reading: Reading +status_read: Read +status_want: Want to read +status_dnf: Did not finish +status_dnf_short: DNF +progress_through: "Progress through {{ .Name }}" +page_of: "Page {{ .Count }} of {{ .Total }}" +stopped_at: "Stopped at page {{ .Count }}" +stopped_at_of: "Stopped at page {{ .Count }} of {{ .Total }}" +cover_of: "Cover of {{ .Name }}" +no_cover: "No cover image yet: {{ .Name }}" +shelf_read: Read +shelf_read_year: "Read in {{ .Year }}" +shelf_read_note: Most recently finished first +shelf_want: Want to read +shelf_dnf: Did not finish +scrollable_shelf: "{{ .Name }}, scrollable shelf" +stats_label: "{{ .Year }} reading statistics" +stats_label_all: Reading statistics +stat_books: Books read +stat_pages: Pages read +stat_rating: Average rating +stat_dnf: Did not finish +genres_and_tags: Genres and tags +related_genres: Related genres +series: Series +pages: Pages +published: Published +my_rating: My rating +status: Status +finished_on: "finished {{ .Date }}" +my_verdict: My verdict +what_worked: What worked +less_so: Less so +reviewed_by: Reviewed by +more_about: "More about {{ .Name }}" +portrait_of: "Portrait of {{ .Name }}" +you_might_also_like: You might also like +more_in: "More {{ .Name }}" +review: review +email_address: Email address +subscribe: Subscribe +new_release: New release +buy_the_book: Buy the book +learn_more: Learn more +learn_more_about: "about {{ .Name }}" +buy: Buy +where_to_buy: Where to buy +my_books: My books +kind_words: Kind words +events: Events +event_details: Details +about_author: "About {{ .Name }}" +genre: Genre +genres: Genres +tag: Tag +tags: Tags +archive: Archive +you_searched_for: You searched for +match_none: No reviews match. +match_one: 1 review matches. +match_many: "%n reviews match." +not_found_title: This page has wandered off the shelf +not_found_lead: The link may be old, or the page may have been moved or renamed. Try a search, or start again from the front page. +not_found_lead_no_search: The link may be old, or the page may have been moved or renamed. Start again from the front page. +back_to_front: Back to the front page +pick_something: Or pick something to read +recent_favourites: Recent favourites +reviews_noun: + one: review + other: reviews diff --git a/hugo/theme/images/screenshot.png b/hugo/theme/images/screenshot.png new file mode 100644 index 0000000..6d4a43b Binary files /dev/null and b/hugo/theme/images/screenshot.png differ diff --git a/hugo/theme/images/tn.png b/hugo/theme/images/tn.png new file mode 100644 index 0000000..e3a81b6 Binary files /dev/null and b/hugo/theme/images/tn.png differ diff --git a/hugo/theme/layouts/404.html b/hugo/theme/layouts/404.html new file mode 100644 index 0000000..2b0e7b8 --- /dev/null +++ b/hugo/theme/layouts/404.html @@ -0,0 +1,32 @@ +{{ define "main" }} +{{- $archive := partial "readerly/archive-page.html" . -}} +{{- $picks := first 5 (where (partial "readerly/reviews.html" .) "Params.rating" ">=" 4) -}} +
+
+ +

{{ T "not_found_title" }}

+

{{ if $archive }}{{ T "not_found_lead" }}{{ else }}{{ T "not_found_lead_no_search" }}{{ end }}

+ {{- with $archive }} + + {{- end }} +
+ {{ T "back_to_front" }} + {{- with $archive }} + {{ T "browse_all_reviews" }} + {{- end }} +
+
+ {{- with $picks }} + +
+ {{ partial "readerly/section-head.html" (dict "id" "suggest-title" "heading" (T "pick_something") "note" (T "recent_favourites")) }} + {{- $entries := slice }}{{ range . }}{{ $entries = $entries | append (partial "readerly/entry.html" .) }}{{ end }} + {{ partial "readerly/shelf.html" (dict "entries" $entries "label" (T "recent_favourites")) }} +
+ {{- end }} +
+{{ end }} diff --git a/hugo/theme/layouts/_partials/comments.html b/hugo/theme/layouts/_partials/comments.html new file mode 100644 index 0000000..e69de29 diff --git a/hugo/theme/layouts/_partials/credit.html b/hugo/theme/layouts/_partials/credit.html new file mode 100644 index 0000000..b38f2da --- /dev/null +++ b/hugo/theme/layouts/_partials/credit.html @@ -0,0 +1 @@ +

Theme by List of Books

diff --git a/hugo/theme/layouts/_partials/footer.html b/hugo/theme/layouts/_partials/footer.html new file mode 100644 index 0000000..9014c57 --- /dev/null +++ b/hugo/theme/layouts/_partials/footer.html @@ -0,0 +1,31 @@ +{{- $copyright := site.Copyright -}} +
+
+ + +
+
diff --git a/hugo/theme/layouts/_partials/head-custom.html b/hugo/theme/layouts/_partials/head-custom.html new file mode 100644 index 0000000..e69de29 diff --git a/hugo/theme/layouts/_partials/head.html b/hugo/theme/layouts/_partials/head.html new file mode 100644 index 0000000..0c473d5 --- /dev/null +++ b/hugo/theme/layouts/_partials/head.html @@ -0,0 +1,59 @@ +{{- $isReview := partial "readerly/is-review.html" . -}} +{{- $pager := partial "readerly/paginator.html" . -}} +{{- $style := site.Params.readerly.style | default "auto" -}} +{{- $title := site.Title -}} +{{- if and $isReview .Params.book_author -}} + {{- $title = printf "%s %s: %s · %s" (.Params.book_title | default .Title) (T "by" (dict "Name" .Params.book_author)) (T "review") site.Title -}} +{{- else if and .Title (not .IsHome) -}} + {{- $title = printf "%s · %s" (partial "readerly/term-name.html" .) site.Title -}} +{{- else if site.Params.tagline -}} + {{- $title = printf "%s: %s" site.Title site.Params.tagline -}} +{{- end -}} +{{- with $pager }}{{ if gt .PageNumber 1 }}{{ $title = printf "%s · %s" $title (T "page_n" (dict "Count" .PageNumber)) }}{{ end }}{{ end -}} +{{- $intro := .Params.intro | default dict -}} +{{- $description := "" -}} +{{- with .Description | default .Params.lead | default $intro.lead -}} + {{- $description = . | markdownify | plainify -}} +{{- else -}} + {{- $description = .Summary | plainify | default site.Params.description | default "" -}} +{{- end -}} +{{- $description = $description | htmlUnescape | strings.TrimSpace | truncate 200 "…" -}} +{{- $url := .Permalink -}} +{{- with $pager }}{{ $url = absURL .URL }}{{ end -}} + + + {{ $title }} + {{- with $description }} + + {{- end }} + + + + + + + {{- with $description }} + + {{- end }} + {{- if $isReview }}{{ with (partial "readerly/entry.html" .).cover }} + + {{- end }}{{ end }} + {{- with site.Params.readerly.favicon }} + + {{- end }} + {{- with resources.Get "readerly/css/readerly.css" | fingerprint }} + + {{- end }} + {{- with site.Params.readerly.customCSS }} + + {{- end }} + {{- with .OutputFormats.Get "rss" }} + + {{- end }} + {{- if ne site.Params.readerly.styleToggle false }}{{ with resources.Get "readerly/js/theme.js" | fingerprint }} + + {{- end }}{{ end }} + {{- if $isReview }} + {{ partial "readerly/review-jsonld.html" . }} + {{- end }} + {{- partial "head-custom.html" . }} diff --git a/hugo/theme/layouts/_partials/header.html b/hugo/theme/layouts/_partials/header.html new file mode 100644 index 0000000..edb0523 --- /dev/null +++ b/hugo/theme/layouts/_partials/header.html @@ -0,0 +1,42 @@ +{{- $archive := partial "readerly/archive-page.html" . -}} +{{- $toggle := ne site.Params.readerly.styleToggle false -}} + diff --git a/hugo/theme/layouts/_partials/readerly/archive-page.html b/hugo/theme/layouts/_partials/readerly/archive-page.html new file mode 100644 index 0000000..9bf778f --- /dev/null +++ b/hugo/theme/layouts/_partials/readerly/archive-page.html @@ -0,0 +1,8 @@ +{{- /* The page that lists every review: the list page of the first main section, when it has posts. The header and 404 search forms post to it. */ -}} +{{- $archive := false -}} +{{- with site.MainSections -}} + {{- with site.GetPage (printf "/%s" (index . 0)) -}} + {{- if .RegularPagesRecursive }}{{ $archive = . }}{{ end -}} + {{- end -}} +{{- end -}} +{{- return $archive -}} diff --git a/hugo/theme/layouts/_partials/readerly/archive.html b/hugo/theme/layouts/_partials/readerly/archive.html new file mode 100644 index 0000000..2bb3be3 --- /dev/null +++ b/hugo/theme/layouts/_partials/readerly/archive.html @@ -0,0 +1,62 @@ +{{- /* +An archive: a section's posts (every one, with search) or a term's posts (paginated). + .page, .posts, .count, .search (the list filters by ?s=), .pager (print the pager) +filter.js hides the cards that do not match ?s= in the browser. +*/ -}} +{{- $p := .page -}} +{{- $eyebrow := $p.Params.eyebrow -}} +{{- if not $eyebrow -}} + {{- if eq $p.Kind "term" }}{{ $eyebrow = T (cond (eq $p.Data.Plural "categories") "genre" "tag") }}{{ else }}{{ $eyebrow = T "archive" }}{{ end -}} +{{- end -}} +{{- $related := slice -}} +{{- if eq $p.Kind "term" -}} + {{- range $p.Pages -}} + {{- range (.GetTerms "categories") | append (.GetTerms "tags") -}} + {{- if and (ne .RelPermalink $p.RelPermalink) (not (in $related .)) }}{{ $related = $related | append . }}{{ end -}} + {{- end -}} + {{- end -}} +{{- end -}} +
+
+ {{ $eyebrow }} +

{{ partial "readerly/term-name.html" $p | default (T "archive") }}

+ {{- with $p.Params.lead }} +

{{ . }}

+ {{- end }} +

{{ T "reviews" .count }}

+ {{- with $related }} +
    + {{- range . }} +
  • {{ partial "readerly/term-link.html" (dict "term" . "class" "tag") }}
  • + {{- end }} +
+ {{- end }} +
+ {{- with $p.Content }} +
+{{ . }} +
+ {{- end }} + {{- if .search }} + + + {{- end }} + {{- with .posts }} + +
    + {{- range . }} + {{- $e := partial "readerly/entry.html" . }} + {{- $terms := slice }}{{ range (.GetTerms "categories") | append (.GetTerms "tags") }}{{ $terms = $terms | append (partial "readerly/term-name.html" .) }}{{ end }} + + {{ partial "readerly/book-card.html" (dict "entry" $e "variant" "list" "heading" "h2" "excerpt" "full") }} + + {{- end }} +
+ {{- if $.search }}{{ with resources.Get "readerly/js/filter.js" | fingerprint }} + + {{- end }}{{ end }} + {{- end }} + {{- if .pager }} + {{ partial "readerly/pagination.html" $p }} + {{- end }} +
diff --git a/hugo/theme/layouts/_partials/readerly/badge.html b/hugo/theme/layouts/_partials/readerly/badge.html new file mode 100644 index 0000000..09a051d --- /dev/null +++ b/hugo/theme/layouts/_partials/readerly/badge.html @@ -0,0 +1,6 @@ +{{- /* The status badge. Nothing for an unknown status. */ -}} +{{- if eq . "reading" }}{{ T "status_reading" }} +{{- else if eq . "read" }}{{ T "status_read" }} +{{- else if eq . "want" }}{{ T "status_want" }} +{{- else if eq . "dnf" }}{{ T "status_dnf_short" }} +{{- end -}} diff --git a/hugo/theme/layouts/_partials/readerly/book-card.html b/hugo/theme/layouts/_partials/readerly/book-card.html new file mode 100644 index 0000000..a1258ee --- /dev/null +++ b/hugo/theme/layouts/_partials/readerly/book-card.html @@ -0,0 +1,82 @@ +{{- /* +One book card. Every card on every page comes from here, with every degrade rule for cards. + .entry a book entry (readerly/entry.html) or an own book (data/books.yaml) + .variant "grid" (default), "list", "compact" or "own" + .excerpt "clamp", "full" or empty for none (grid and list) + .heading "h2" or "h3" (default) +*/ -}} +{{- $e := .entry -}} +{{- $variant := .variant | default "grid" -}} +{{- $heading := .heading | default "h3" -}} +{{- if eq $variant "own" }}{{ $e = merge $e (dict "title" .entry.title "url" (partial "readerly/url.html" .entry.url) "cover" (partial "readerly/url.html" .entry.cover)) }}{{ end -}} +{{- $href := $e.url -}} +{{- $cover := "" -}} +{{- if or $e.cover $e.book_author $e.rated $e.status (eq $variant "own") -}} + {{- $cover = partial "readerly/card-cover.html" (dict "entry" $e) -}} +{{- end -}} +{{- $title := partial "readerly/card-title.html" (dict "entry" $e "heading" $heading) -}} +{{- if eq $variant "compact" -}} +
+ {{ $cover }} +
+ {{ $title }} + {{- with $e.book_author }} +

{{ . }}

+ {{- end }} + {{- if or $e.rated (in (slice "reading" "read" "want" "dnf") $e.status) }} +
{{ partial "readerly/rating.html" (dict "value" $e.rating) }}{{ partial "readerly/badge.html" $e.status }}
+ {{- end }} + {{- if and (eq $e.status "reading") $e.pages $e.current_page }} + {{- $percent := math.Round (div (mul (float $e.current_page) 100) $e.pages) }} +
{{ $percent }}%

{{ T "page_of" (dict "Count" $e.current_page "Total" $e.pages) }}{{ $percent }}%

+ {{- else if and (eq $e.status "dnf") $e.current_page }} +

{{ if $e.pages }}{{ T "stopped_at_of" (dict "Count" $e.current_page "Total" $e.pages) }}{{ else }}{{ T "stopped_at" (dict "Count" $e.current_page) }}{{ end }}

+ {{- end }} +
+
+{{- else if eq $variant "own" -}} + +{{- else -}} +
+ {{ $cover }} +
+ {{- with $e.genre }} + {{ . }} + {{- end }} + {{ $title }} + {{- with $e.book_author }} +

{{ T "by" (dict "Name" .) }}

+ {{- end }} + {{- if $e.rated }} +
{{ partial "readerly/rating.html" (dict "value" $e.rating) }}
+ {{- end }} + {{- if $.excerpt }}{{ with $e.summary }} +

{{ . }}

+ {{- end }}{{ end }} + {{- with $e.date }} +

{{ partial "readerly/date.html" (dict "date" .) }}

+ {{- end }} +
+
+{{- end -}} diff --git a/hugo/theme/layouts/_partials/readerly/card-cover.html b/hugo/theme/layouts/_partials/readerly/card-cover.html new file mode 100644 index 0000000..40371ae --- /dev/null +++ b/hugo/theme/layouts/_partials/readerly/card-cover.html @@ -0,0 +1,6 @@ +{{- /* A card's cover: linked and decorative when the card has a link, else described. */ -}} +{{- with .entry.url -}} + +{{- else -}} +
{{ partial "readerly/cover.html" (dict "entry" $.entry "described" true) }}
+{{- end -}} diff --git a/hugo/theme/layouts/_partials/readerly/card-title.html b/hugo/theme/layouts/_partials/readerly/card-title.html new file mode 100644 index 0000000..8872918 --- /dev/null +++ b/hugo/theme/layouts/_partials/readerly/card-title.html @@ -0,0 +1,7 @@ +{{- /* A card's title in .heading (h2 or h3), linked when the entry has a URL. */ -}} +{{- $inner := .entry.title -}} +{{- if eq .heading "h2" -}} +

{{ with .entry.url }}{{ $inner }}{{ else }}{{ $inner }}{{ end }}

+{{- else -}} +

{{ with .entry.url }}{{ $inner }}{{ else }}{{ $inner }}{{ end }}

+{{- end -}} diff --git a/hugo/theme/layouts/_partials/readerly/cover.html b/hugo/theme/layouts/_partials/readerly/cover.html new file mode 100644 index 0000000..69c6012 --- /dev/null +++ b/hugo/theme/layouts/_partials/readerly/cover.html @@ -0,0 +1,9 @@ +{{- /* A cover for the entry .entry: its image, or the typeset placeholder. .described gives the image alt text; without it the cover sits in a link that repeats the title. */ -}} +{{- $e := .entry -}} +{{- $name := $e.title -}} +{{- with $e.book_author }}{{ $name = printf "%s %s" $name (T "by" (dict "Name" .)) }}{{ end -}} +{{- with $e.cover -}} +{{ if $.described }}{{ T +{{- else -}} + +{{- end -}} diff --git a/hugo/theme/layouts/_partials/readerly/data.html b/hugo/theme/layouts/_partials/readerly/data.html new file mode 100644 index 0000000..d46c3de --- /dev/null +++ b/hugo/theme/layouts/_partials/readerly/data.html @@ -0,0 +1,8 @@ +{{- /* The site's data files. hugo.Data replaced site.Data in Hugo 0.156; the branch keeps both versions free of deprecation warnings. */ -}} +{{- $data := dict -}} +{{- if ge hugo.Version "0.156.0" -}} + {{- $data = hugo.Data -}} +{{- else -}} + {{- $data = site.Data -}} +{{- end -}} +{{- return $data -}} diff --git a/hugo/theme/layouts/_partials/readerly/date.html b/hugo/theme/layouts/_partials/readerly/date.html new file mode 100644 index 0000000..9cb65fa --- /dev/null +++ b/hugo/theme/layouts/_partials/readerly/date.html @@ -0,0 +1,3 @@ +{{- /* A