""" + type_emoji + """
@@ -3514,7 +3514,7 @@ def public_frontend():
.then(function(data) {
if (!data.already) {
this.classList.add('liked');
- this.innerHTML = '
' + data.likes;
+ this.innerHTML = '
' + data.likes;
this.setAttribute('data-likes', data.likes);
likedPosts.push(parseInt(id));
localStorage.setItem('likedPosts', JSON.stringify(likedPosts));
@@ -4643,7 +4643,7 @@ def public_detail(sub_id: int):
# Comments
comment_rows = db.execute(
- "SELECT id, author_name, content, created_at, parent_id FROM comments WHERE submission_id = ? AND status='published' ORDER BY created_at ASC",
+ "SELECT id, author_name, content, created_at, parent_id, likes FROM comments WHERE submission_id = ? AND status='published' ORDER BY created_at ASC",
(sub_id,),
).fetchall()
@@ -4668,7 +4668,10 @@ def public_detail(sub_id: int):
html += f""""""
# Recursively render children
if c["id"] in children:
@@ -4736,6 +4739,11 @@ def public_detail(sub_id: int):
.comment-submit-btn:disabled {{ opacity:0.6; pointer-events:none; }}
.reply-btn {{ background:none; border:1px solid #ccc; border-radius:6px; padding:0.2rem 0.6rem; font-size:0.72rem; color:#666; cursor:pointer; margin-top:0.3rem; font-family:inherit; transition:all 0.15s; }}
.reply-btn:hover {{ border-color:#20228a; color:#20228a; background:rgba(32,34,138,0.04); }}
+ .comment-actions {{ display:flex; align-items:center; gap:0.4rem; margin-top:0.4rem; }}
+ .comment-like-btn {{ background:none; border:1.5px solid #e0dcd3; border-radius:999px; padding:0.15rem 0.5rem; font-size:0.68rem; cursor:pointer; color:#888; font-family:inherit; transition:all 0.15s; display:inline-flex; align-items:center; -webkit-tap-highlight-color:transparent; }}
+ .comment-like-btn:hover {{ border-color:#20228a; color:#20228a; background:rgba(32,34,138,0.05); }}
+ .comment-like-btn.liked {{ background:#20228a; color:#fff; border-color:#20228a; font-weight:600; }}
+ .comment-like-btn:active {{ transform:scale(0.94); }}
.reply-info {{ font-size:0.75rem; color:#20228a; margin-bottom:0.3rem; font-weight:600; display:none; }}
.comment-email, .comment-phone {{ padding:0.6rem 0.9rem; border:1.5px solid #ddd; border-radius:10px; font-size:0.85rem; font-family:inherit; }}
.comment-email:focus, .comment-phone:focus {{ outline:none; border-color:#20228a; }}
@@ -4775,7 +4783,7 @@ def public_detail(sub_id: int):
{"".join([f'
{content}
' if content else ''])}
{row['views'] or 0} Aufrufe
-
+
{c["content"]}
- +