diff --git a/assets/css/custom.css b/assets/css/custom.css index f7377ca..30518da 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -424,12 +424,27 @@ a:hover { a.byline-author, a.journal-author { color: inherit; text-decoration: none; } a.byline-author:hover, a.journal-author:hover { color: var(--accent); } -/* ── Dialog (Diskussion pro Beitrag) ─────────────────────────────────────── */ -.dialog { - max-width: var(--container-width); - margin: var(--spacing-xl) auto; - padding: 0 var(--spacing-md); +/* ── Dialog ───────────────────────────────────────────────────────────────── */ +/* Link am Ende des Beitrags (der Beitrag selbst bleibt sauber) */ +.dialog-link { + display: inline-block; + margin-top: var(--spacing-lg); + font-family: var(--font-family-display); + font-weight: 500; + color: var(--accent); + text-decoration: none; + border: 1px solid var(--accent); + border-radius: 999px; + padding: 0.45em 1.2em; } +.dialog-link:hover { background: var(--accent); color: #fff; } + +/* Eigene Dialog-Seite (/dialog/?thread=…) */ +.dialog-page { max-width: var(--container-width); margin: 0 auto; padding: var(--spacing-lg) var(--spacing-md); } +.dialog-back { margin: 0 0 var(--spacing-sm); } +.dialog-back a { color: var(--color-text-muted); text-decoration: none; } +.dialog-back a:hover { color: var(--accent); } + .dialog-title { font-family: var(--font-family-serif); border-top: 1px solid var(--color-border); diff --git a/content/dialog.md b/content/dialog.md new file mode 100644 index 0000000..5244631 --- /dev/null +++ b/content/dialog.md @@ -0,0 +1,5 @@ +--- +title: Dialog +layout: dialog +toc: false +--- diff --git a/layouts/_default/dialog.html b/layouts/_default/dialog.html new file mode 100644 index 0000000..eaf5c91 --- /dev/null +++ b/layouts/_default/dialog.html @@ -0,0 +1,19 @@ +{{ define "main" }} +
+

+
+
+ + +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 37a88da..58a200f 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -62,10 +62,9 @@ {{- range . -}}
  • {{ . }}
  • {{- end -}} {{- end }} + + {{/* Dialog liegt auf eigener Seite — der Beitrag bleibt sauber */}} + → Dialog - {{/* Dialog — jeder Beitrag ist ein Diskussionsstart */}} -
    - - {{ end }} diff --git a/static/dialog.js b/static/dialog.js index 541806a..b6db82d 100644 --- a/static/dialog.js +++ b/static/dialog.js @@ -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 = '

    Kein Thema gewählt.

    '; return; } const TKEY = 'ob_dialog_token', NKEY = 'ob_dialog_name'; let token = localStorage.getItem(TKEY); let myName = localStorage.getItem(NKEY);