diff --git a/public/script/blog.js b/public/script/blog.js index 6b9fee4..e69de29 100644 --- a/public/script/blog.js +++ b/public/script/blog.js @@ -1,19 +0,0 @@ -document.addEventListener('DOMContentLoaded', () => { - document.querySelectorAll('.comment-hover').forEach((/** @type {HTMLDivElement} */ comment) => { - /** @type {HTMLLinkElement} */ - const commentBody = comment.querySelector('a.comment-body'); - - comment.querySelectorAll('a').forEach((/** @type {HTMLLinkElement} */ element) => { - element.addEventListener('click', event => { - event.stopPropagation(); - }); - }); - - comment.addEventListener('click', () => { - commentBody.click(); - }); - - comment.style.cursor = 'pointer'; - comment.role = 'link'; - }); -}); diff --git a/public/style/blog.css b/public/style/blog.css index 19d87b4..ee637bb 100644 --- a/public/style/blog.css +++ b/public/style/blog.css @@ -204,7 +204,7 @@ article.blog { white-space: break-spaces; } -.comment .comment-footer { +.comment .comment-footer .comment-date { margin: 0; font-size: .8em; opacity: .5; diff --git a/view/blog.go b/view/blog.go index 1f3bb1d..9ab52d2 100644 --- a/view/blog.go +++ b/view/blog.go @@ -16,15 +16,6 @@ import ( "github.com/gomarkdown/markdown/parser" ) -type BlogView struct { - *model.Blog - Comments []*model.ThreadViewPost - Likes int - Reposts int - BlueskyURL string - MastodonURL string -} - var mdRenderer = html.NewRenderer(html.RendererOptions{ Flags: html.CommonFlags | html.HrefTargetBlank, }) @@ -118,11 +109,20 @@ this is `+"`"+`aridoodle`+"`"+`. please take care of her. comments = append(comments, blueskyPost.Replies...) } + type BlogView struct { + *model.Blog + Comments []*model.ThreadViewPost + Likes int + Reposts int + BlueskyURL string + MastodonURL string + } + err = templates.BlogTemplate.Execute(w, BlogView{ Blog: &blog, Comments: blueskyPost.Replies, - Likes: blueskyPost.Post.LikeCount, - Reposts: blueskyPost.Post.RepostCount, + Likes: 10, + Reposts: 10, BlueskyURL: fmt.Sprintf("https://bsky.app/profile/%s/post/%s", blog.BlueskyActorID, blog.BlueskyPostID), MastodonURL: "#", }) diff --git a/view/blog.html b/view/blog.html index eb8c4a1..a5f8130 100644 --- a/view/blog.html +++ b/view/blog.html @@ -38,10 +38,8 @@ join the conversation on Bluesky 🦋 - + or + Mastodon 🐘