From 78dec9d5c742de22750821c22a989070bbe38de7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nu=C5=A1a=20Puk=C5=A1i=C4=8D?= Date: Thu, 6 Nov 2025 14:50:42 +0100 Subject: [PATCH] Layout fixes --- .../controllers/nostr_publish_controller.js | 2 +- assets/styles/02-layout/layout.css | 5 +++ .../components/Molecules/ZapButton.html.twig | 32 ++++++++++++++++++- templates/pages/editor.html.twig | 6 ++-- 4 files changed, 40 insertions(+), 5 deletions(-) diff --git a/assets/controllers/nostr_publish_controller.js b/assets/controllers/nostr_publish_controller.js index 0646170..0096310 100644 --- a/assets/controllers/nostr_publish_controller.js +++ b/assets/controllers/nostr_publish_controller.js @@ -482,7 +482,7 @@ export default class extends Controller { // Escape "_" inside display math $$...$$ and inline math $...$ markdown = markdown.replace(/\$\$([\s\S]*?)\$\$/g, (m, g1) => `$$${g1.replace(/_/g, (u, i, s) => (i>0 && s[i-1]==='\\') ? '\\_' : '\\_')}$$`); - markdown = markdown.replace(/$([^$]*?)$/g, (m, g1) => `$${g1.replace(/_/g, (u, i, s) => (i>0 && s[i-1]==='\\') ? '\\_' : '\\_')}$`); + markdown = markdown.replace(/\$([^$]*?)\$/g, (m, g1) => `$${g1.replace(/_/g, (u, i, s) => (i>0 && s[i-1]==='\\') ? '\\_' : '\\_')}$`); // Clean up HTML entities and remaining tags markdown = markdown.replace(/ /g, ' '); diff --git a/assets/styles/02-layout/layout.css b/assets/styles/02-layout/layout.css index 01b7047..f175d26 100644 --- a/assets/styles/02-layout/layout.css +++ b/assets/styles/02-layout/layout.css @@ -285,3 +285,8 @@ p.measure { } section{ position: relative; padding: var(--section-spacing) var(--spacing-3); } + +.katex-display>.katex { + line-height: 2; + white-space: normal !important; +} diff --git a/templates/components/Molecules/ZapButton.html.twig b/templates/components/Molecules/ZapButton.html.twig index 4483684..81ed062 100644 --- a/templates/components/Molecules/ZapButton.html.twig +++ b/templates/components/Molecules/ZapButton.html.twig @@ -42,7 +42,37 @@ required autofocus /> - Suggested: 21, 210, 2100 sats +
+ + + + +
+ Click a suggested amount or enter custom value
diff --git a/templates/pages/editor.html.twig b/templates/pages/editor.html.twig index 47a65a0..2ac4d5b 100644 --- a/templates/pages/editor.html.twig +++ b/templates/pages/editor.html.twig @@ -25,9 +25,6 @@ csrfToken: csrf_token('nostr_publish') }) }} data-nostr-publish-target="form" data-slug="{{ article.slug|default('') }}"> - -
- {{ form_start(form) }} {{ form_row(form.slug) }} {{ form_row(form.title) }} @@ -108,6 +105,9 @@ Edits here override the form when publishing. Keep required fields: kind, created_at, tags, content, pubkey.
+ +
+