dialog: auf eigene Seite auslagern — Beitrag bleibt sauber
- single.html: eingebetteter Dialog raus, stattdessen „→ Dialog"-Link - neue /dialog/-Seite (content/dialog.md + layouts/_default/dialog.html) mit Thread aus ?thread=, Rücklink zum Beitrag - dialog.js liest Thread aus data-thread ODER ?thread= - Styling: Pill-Link am Beitragsende, zentrierte Dialog-Seite Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -3,7 +3,8 @@
|
||||
(function () {
|
||||
const root = document.getElementById('ob-dialog');
|
||||
if (!root) return;
|
||||
const thread = root.dataset.thread;
|
||||
const thread = root.dataset.thread || new URLSearchParams(location.search).get('thread') || '';
|
||||
if (!thread) { root.innerHTML = '<p class="dialog-empty">Kein Thema gewählt.</p>'; return; }
|
||||
const TKEY = 'ob_dialog_token', NKEY = 'ob_dialog_name';
|
||||
let token = localStorage.getItem(TKEY);
|
||||
let myName = localStorage.getItem(NKEY);
|
||||
|
||||
Reference in New Issue
Block a user