diff --git a/public/script/blog.js b/public/script/blog.js index e69de29..6b9fee4 100644 --- a/public/script/blog.js +++ b/public/script/blog.js @@ -0,0 +1,19 @@ +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 ee637bb..19d87b4 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-date { +.comment .comment-footer { margin: 0; font-size: .8em; opacity: .5; diff --git a/view/blog.html b/view/blog.html index a5f8130..eb8c4a1 100644 --- a/view/blog.html +++ b/view/blog.html @@ -38,8 +38,10 @@ join the conversation on Bluesky 🦋 - or - Mastodon 🐘 +