blog: nice comment tweaks

This commit is contained in:
ari melody 2025-05-21 18:39:33 +01:00
parent fece0f5da6
commit 0596edc4b2
Signed by: ari
GPG key ID: CF99829C92678188
3 changed files with 28 additions and 5 deletions

View file

@ -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';
});
});

View file

@ -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;