diff --git a/app/static/js/scripts.js b/app/static/js/scripts.js index ebc772bf..ae9bac26 100644 --- a/app/static/js/scripts.js +++ b/app/static/js/scripts.js @@ -39,7 +39,7 @@ document.addEventListener("DOMContentLoaded", function () { function setupPostTeaserHandler() { document.querySelectorAll('.post_teaser_clickable').forEach(div => { div.onclick = function() { - const firstAnchor = this.querySelector('a'); + const firstAnchor = this.parentElement.querySelector('a'); if (firstAnchor) { window.location.href = firstAnchor.href; } diff --git a/app/static/styles.css b/app/static/styles.css index 057ec4ba..cfe92b65 100644 --- a/app/static/styles.css +++ b/app/static/styles.css @@ -867,6 +867,9 @@ div.navbar { .post_list .post_teaser.blocked .voting_buttons .upvote_button, .post_list .post_teaser.blocked .voting_buttons .downvote_button { font-size: 80%; } +.post_list .post_teaser .post_teaser_clickable { + cursor: pointer; +} .post_teaser_body { position: relative; diff --git a/app/static/styles.scss b/app/static/styles.scss index 8c3bff6f..7b17739f 100644 --- a/app/static/styles.scss +++ b/app/static/styles.scss @@ -460,6 +460,10 @@ div.navbar { } } } + + .post_teaser_clickable { + cursor: pointer; + } } } diff --git a/app/templates/post/post_teaser/_article.html b/app/templates/post/post_teaser/_article.html index ba363f1e..70f3fc55 100644 --- a/app/templates/post/post_teaser/_article.html +++ b/app/templates/post/post_teaser/_article.html @@ -1,4 +1,4 @@ -
+

{% if post.sticky -%}{% endif -%} {% if post.nsfw -%}nsfw{% endif -%} {% if post.nsfl -%}nsfl{% endif -%} @@ -13,7 +13,7 @@ c/{{ post.community.name }}{% endif -%} by {{ render_username(post.author) }} {% if post.body_html -%} -