diff --git a/CHANGELOG.md b/CHANGELOG.md index 3302ec8..286692f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [0.15.7] - 2024-12-03 +### Added +- Comments from Bluesky. + +### Fixed +- Improved comments responsiveness. +- Title of the 404 page. + ## [0.15.6] - 2024-10-17 ### Fixed - Updated CMS to the latest version [#27]. @@ -239,6 +247,7 @@ First version [#24]: https://github.com/lumeland/theme-simple-blog/issues/24 [#27]: https://github.com/lumeland/theme-simple-blog/issues/27 +[0.15.7]: https://github.com/lumeland/theme-simple-blog/compare/v0.15.6...v0.15.7 [0.15.6]: https://github.com/lumeland/theme-simple-blog/compare/v0.15.5...v0.15.6 [0.15.5]: https://github.com/lumeland/theme-simple-blog/compare/v0.15.4...v0.15.5 [0.15.4]: https://github.com/lumeland/theme-simple-blog/compare/v0.15.3...v0.15.4 diff --git a/_cms.ts b/_cms.ts index ecc0ff6..19fe88d 100644 --- a/_cms.ts +++ b/_cms.ts @@ -109,7 +109,12 @@ cms.collection( fields: [ { name: "src", - label: "Link to mastodon post", + label: "Link to Mastodon post", + type: "url", + }, + { + name: "bluesky", + label: "Link to Bluesky post", type: "url", }, ], diff --git a/deno.json b/deno.json index f41a81f..a31597b 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "imports": { - "lume/": "https://deno.land/x/lume@v2.3.3/", + "lume/": "https://deno.land/x/lume@v2.4.2/", "lume/cms/": "https://cdn.jsdelivr.net/gh/lumeland/cms@v0.7.0/" }, "tasks": { diff --git a/plugins.ts b/plugins.ts index cbd5c7f..9e16da6 100644 --- a/plugins.ts +++ b/plugins.ts @@ -78,7 +78,7 @@ export default function (userOptions?: Options) { // Mastodon comment system site.remoteFile( "/js/comments.js", - "https://unpkg.com/@oom/mastodon-comments@0.2.2/src/comments.js", + "https://cdn.jsdelivr.net/npm/@oom/mastodon-comments@0.3.1/src/comments.js", ); }; } diff --git a/src/404.md b/src/404.md index 47ef601..c1dba90 100644 --- a/src/404.md +++ b/src/404.md @@ -1,4 +1,5 @@ --- +title: Content not found layout: layouts/base.vto url: /404.html --- diff --git a/src/_data/i18n.yml b/src/_data/i18n.yml index 81ee44c..af33458 100644 --- a/src/_data/i18n.yml +++ b/src/_data/i18n.yml @@ -20,4 +20,8 @@ comments: title: Comments description: | You can leave a comment by replying to this Mastodon post from your own account on Mastodon or any other ActivityPub-capable social network that can exchange replies with Mastodon. + description_bluesky: | + You can leave a comment by replying to this Bluesky post from your own account. + description_all: | + You can leave a comment by replying to this Mastodon post or this Bluesky post from your own account. empty: No comments yet \ No newline at end of file diff --git a/src/_includes/css/comments.css b/src/_includes/css/comments.css index 9699917..1a2529b 100644 --- a/src/_includes/css/comments.css +++ b/src/_includes/css/comments.css @@ -23,7 +23,6 @@ border: solid 1px var(--color-line); color: var(--color-dim); font: var(--font-small); - container-type: inline-size; @media (max-width: 450px) { margin-left: calc(-15vw / 2); @@ -43,6 +42,18 @@ margin: 0; padding: 0; } + + & li { + container-type: inline-size; + + ul { + margin-top: 2em; + padding-top: 2em; + border-top: solid 1px var(--color-line); + margin-left: min(var(--indent), 10cqw); + } + } + & li + li { margin-top: 2em; padding-top: 2em; @@ -51,15 +62,9 @@ & article { max-width: 600px; } - & ul ul { - margin-top: 2em; - padding-top: 2em; - border-top: solid 1px var(--color-line); - margin-left: var(--indent); - } > ul { --avatar-size: clamp(32px, 10cqw, 50px); - --indent: min(10cqw, var(--avatar-size) + 15px); + --indent: calc(var(--avatar-size) + 15px); } .comment-avatar { @@ -97,12 +102,22 @@ } .comment-time { font-size: small; + display: flex; + column-gap: .3em; + align-items: center; + + svg { + width: 1em; + height: 1em; + fill: currentColor + } } .comment-address { color: currentColor; text-decoration: none; display: block; padding-left: var(--indent); + margin-top: .2em; } .comment-address:hover { text-decoration: underline; diff --git a/src/_includes/layouts/post.vto b/src/_includes/layouts/post.vto index 314d4b0..0c397c0 100644 --- a/src/_includes/layouts/post.vto +++ b/src/_includes/layouts/post.vto @@ -49,13 +49,19 @@ bodyClass: body-post {{ /if }} - {{ if it.comments?.src }} + {{ if comments?.src || comments?.bluesky }}