From 2d7d750d918d2cce720014461fb4c0bdca9ae101 Mon Sep 17 00:00:00 2001 From: Neo Date: Mon, 9 Sep 2024 22:25:18 +0000 Subject: [PATCH] Restrict onclick to h1 text This change modifies the onclick event to apply only to the h1 text within the header section of the blog index page. Previously, the onclick event was applied to the entire header section, which could lead to unintended behavior when users interacted with other parts of the header. By restricting the onclick event to just the h1 text, we ensure that only the intended element responds to user clicks, improving the user experience and preventing potential confusion. --- flaskr/templates/blog/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flaskr/templates/blog/index.html b/flaskr/templates/blog/index.html index 25dfd6df..f257bec6 100644 --- a/flaskr/templates/blog/index.html +++ b/flaskr/templates/blog/index.html @@ -10,9 +10,9 @@ {% block content %} {% for post in posts %}
-
+
-

{{ post['title'] }}

+

{{ post['title'] }}

by {{ post['username'] }} on {{ post['created'].strftime('%Y-%m-%d') }}
{% if g.user['id'] == post['author_id'] %}