diff --git a/_includes/components/comments.njk b/_includes/components/comments.njk index 6943098..ddf074c 100644 --- a/_includes/components/comments.njk +++ b/_includes/components/comments.njk @@ -1,4 +1,5 @@ {# Comments section — shown on post pages before webmentions #} +{# Collapsed when empty, auto-opens when comments exist #} {% set absoluteUrl = site.url + page.url %} @@ -6,91 +7,103 @@ x-data="commentsSection('{{ absoluteUrl }}')" x-init="init()"> -

Comments

+
+ +

+ Comments + +

+ +
- {# Status messages #} -
- -
- - {# Sign-in form (shown when not authenticated) #} -
-

Sign in with your website to comment:

-
-
- - +
+ {# Status messages #} +
+
- - -
- {# Comment form (shown when authenticated) #} -
-
- Signed in as - - -
- -
- -
- - -
-
-
- - {# Comment list #} -
- - - - -
+ {# Comment form (shown when authenticated) #} +
+
+ Signed in as + + +
+ +
+ +
+ + +
+
+
+ + {# Comment list #} +
+ + + + + +
+
+
diff --git a/_includes/components/webmentions.njk b/_includes/components/webmentions.njk index 1ba4f96..971984b 100644 --- a/_includes/components/webmentions.njk +++ b/_includes/components/webmentions.njk @@ -175,27 +175,32 @@ {% endif %} -{# Webmention send form #} -
-

+{# Webmention send form — collapsed by default #} +
+ + Send a Webmention -

-

- Have you written a response to this post? Send a webmention by entering your post URL below. -

-
- - - -
-
+ +
+

+ Have you written a response to this post? Send a webmention by entering your post URL below. +

+
+ + + +
+
+ diff --git a/_includes/layouts/post.njk b/_includes/layouts/post.njk index 36492f9..6e11371 100644 --- a/_includes/layouts/post.njk +++ b/_includes/layouts/post.njk @@ -3,8 +3,20 @@ layout: layouts/base.njk withBlogSidebar: true ---
+ {# Support both camelCase (Indiekit Eleventy preset) and underscore (legacy) property names #} + {% set bookmarkedUrl = bookmarkOf or bookmark_of %} + {% set likedUrl = likeOf or like_of %} + {% set replyTo = inReplyTo or in_reply_to %} + {% set repostedUrl = repostOf or repost_of %} + {% if title %}

{{ title }}

+ {% else %} +
+ + {% if replyTo %}↩ Reply{% elif likedUrl %}♥ Like{% elif repostedUrl %}♻ Repost{% elif bookmarkedUrl %}🔖 Bookmark{% else %}✎ Note{% endif %} + +
{% endif %}
@@ -27,12 +39,6 @@ withBlogSidebar: true {# Bridgy syndication content - controls what gets posted to social networks #} {# For interaction types (bookmarks, likes, replies, reposts), include the target URL #} - {# Support both camelCase (Indiekit Eleventy preset) and underscore (legacy) property names #} - {% set bookmarkedUrl = bookmarkOf or bookmark_of %} - {% set likedUrl = likeOf or like_of %} - {% set replyTo = inReplyTo or in_reply_to %} - {% set repostedUrl = repostOf or repost_of %} - {% set bridgySummary = description or summary or (content | ogDescription(280)) %} {% set interactionUrl = bookmarkedUrl or likedUrl or replyTo or repostedUrl %} @@ -53,44 +59,31 @@ withBlogSidebar: true
{% endif %} -
+ {% set isInteraction = replyTo or likedUrl or repostedUrl or bookmarkedUrl %} + {% set hasContent = content and content | striptags | trim %} +
{{ content | safe }}
- {# AI usage disclosure #} + {# AI usage disclosure — collapsed by default #} {% set aiTextLevel = aiTextLevel or ai_text_level %} {% set aiCodeLevel = aiCodeLevel or ai_code_level %} {% set aiTools = aiTools or ai_tools %} {% set aiDescription = aiDescription or ai_description %} {% if aiTextLevel or aiCodeLevel or aiTools %} - + {% endif %} {# Rich reply context with h-cite microformat #} diff --git a/js/comments.js b/js/comments.js index afb8c46..11219e4 100644 --- a/js/comments.js +++ b/js/comments.js @@ -19,6 +19,7 @@ document.addEventListener("alpine:init", () => { statusMessage: "", statusType: "info", maxLength: 2000, + showForm: false, async init() { await this.checkSession();