diff --git a/CHANGELOG.md b/CHANGELOG.md index a124838..7293398 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.20.3] - 2026-11-27 + +### Changed + +- On an article's page the summary looked like the first paragraph of the body. It is now set as a subtitle under the title: sans font, a little larger, muted colour, with a line before the body. The homepage teaser is unchanged + ## [2.20.2] - 2026-11-13 ### Fixed diff --git a/starpunk/__init__.py b/starpunk/__init__.py index cce61ac..90a54c1 100644 --- a/starpunk/__init__.py +++ b/starpunk/__init__.py @@ -484,5 +484,5 @@ def create_app(config=None): # Package version (Semantic Versioning 2.0.0) # See docs/standards/versioning-strategy.md for details -__version__ = "2.20.2" -__version_info__ = (2, 20, 2) +__version__ = "2.20.3" +__version_info__ = (2, 20, 3) diff --git a/static/css/style.css b/static/css/style.css index bcc26f0..23670cc 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -89,6 +89,10 @@ main { flex: 1; margin-bottom: var(--spacing-xl); } .h-entry > .p-name a:hover { color: var(--color-link); } .e-content, .p-summary { font-family: var(--font-reading); font-size: 1.125rem; line-height: 1.65; overflow-wrap: anywhere; } .e-content > :last-child, .p-summary > :last-child { margin-bottom: 0; } +/* Article summary (v2.20.3): a subtitle under the title, not a first paragraph. + The homepage teaser keeps the reading style above, where it stands in for the body. */ +.p-summary.dek { font-family: var(--font-body); font-size: 1.25rem; line-height: 1.45; color: var(--color-text-light); + margin: calc(-1 * var(--spacing-sm)) 0 var(--spacing-lg); padding-bottom: var(--spacing-md); border-bottom: 1px solid var(--color-border); } .e-content a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); } .e-content a:hover { text-decoration-color: currentColor; } .e-content blockquote { margin: 0 0 var(--spacing-md); padding-left: var(--spacing-md); border-left: 3px solid var(--color-border); color: var(--color-text-light); } diff --git a/templates/note.html b/templates/note.html index 4a145a3..3482a92 100644 --- a/templates/note.html +++ b/templates/note.html @@ -13,7 +13,7 @@

{{ note.title }}

{% endif %} {% if note.summary %} -

{{ note.summary }}

+

{{ note.summary }}

{% endif %} {# Reply context (v1.6.0 Phase 4; card v2.19.0) - displayed if this is a reply post #} diff --git a/tests/test_articles.py b/tests/test_articles.py index f8d4c5b..dc539c1 100644 --- a/tests/test_articles.py +++ b/tests/test_articles.py @@ -76,6 +76,11 @@ class TestPages: assert props["summary"] == ["The gist."] assert not props["content"][0]["value"].startswith("An Article") + def test_summary_is_a_subtitle_only_on_the_article_page(self, app, client): + article, _ = make_both(app) + assert 'class="p-summary dek"' in client.get(f"/article/{article.slug}").data.decode() + assert "dek" not in client.get("/").data.decode() + def test_homepage_and_tag_page(self, app, client, h): photo = upload(client, h) url = micropub(client, h, name=["Trip"], content=["Day one of the trip."], photo=[photo],