dialog: eigene Diskussion pro Beitrag (MVP, flach, eingeladene-only)

- DB: public.comments (thread, parent_id, user_id, author_name/-avatar, body, deleted)
- API: GET /api/comments (öffentlich lesen), POST/DELETE (eingeloggt),
  POST /api/auth/login (Token fürs Widget)
- Vanilla-Widget static/dialog.js: Karten mit Name+Bild, flacher Dialog mit
  optionalem Bezug (↳ Antwort auf), Inline-Login, Löschen (eigene/Admin)
- eingebettet in single.html (thread = Beitrags-Pfad), Styling im Theme-Look
- Autorname/-bild kommen aus dem Profil (data/authors.json)

Realtime (Supabase) folgt als nächster Schritt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 14:02:59 +02:00
parent 132503fc8b
commit e787961059
6 changed files with 293 additions and 1 deletions
+4
View File
@@ -64,4 +64,8 @@
{{- end }}
</article>
{{/* Dialog — jeder Beitrag ist ein Diskussionsstart */}}
<section class="dialog" id="ob-dialog" data-thread="{{ .RelPermalink }}"></section>
<script defer src="/dialog.js"></script>
{{ end }}