From 06b417f9a16cccd22d9e0e7cb5d42eb834cebeb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lera=20Elvo=C3=A9?= Date: Fri, 29 May 2026 00:26:23 +0300 Subject: [PATCH] add quoting posts --- app/templates/common/macros.html | 4 ++-- app/templates/threads/thread.html | 2 +- data/static/js/bits/ui.js | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/templates/common/macros.html b/app/templates/common/macros.html index 17e15b9..84af04d 100644 --- a/app/templates/common/macros.html +++ b/app/templates/common/macros.html @@ -112,7 +112,7 @@ stub: char count - + {%- if banned_tags -%}
Forbidden tags: @@ -186,7 +186,7 @@ Edit {%- endif -%} {%- if can_reply -%} - + {%- endif -%} {%- if can_delete -%} Delete diff --git a/app/templates/threads/thread.html b/app/templates/threads/thread.html index 794d33b..d094694 100644 --- a/app/templates/threads/thread.html +++ b/app/templates/threads/thread.html @@ -29,7 +29,7 @@ - + {%- endif -%} Subscribe via RSS diff --git a/data/static/js/bits/ui.js b/data/static/js/bits/ui.js index 0e1637e..ca27762 100644 --- a/data/static/js/bits/ui.js +++ b/data/static/js/bits/ui.js @@ -162,3 +162,11 @@ export function showBabycodePreview(payload, _, el) { el.innerHTML = payload.html; } } + +export function babycodeEditorQuote(ev, sender, el) { + console.log(sender.dataset.quote); + const newline = el.value.length === 0 ? '' : '\n' + el.value += `${newline}[quote=${sender.dataset.posterName}]\n${sender.dataset.quote}\n[/quote]\n\n` + b.send({ sender: el }, 'babycodeEditorCharCount'); + el.focus(); +}