/Discussions
-Decentralized discussion board on Nostr. Brought to you by Silberengel.
-diff --git a/src/app.css b/src/app.css index 5207a78..b18deab 100644 --- a/src/app.css +++ b/src/app.css @@ -70,6 +70,66 @@ body { font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', 'Source Code Pro', monospace; } +/* Responsive font sizing based on screen size */ +@media (max-width: 640px) { + :root { + --text-size: clamp(14px, 4vw, 16px); + } +} + +@media (min-width: 641px) and (max-width: 1024px) { + :root { + --text-size: clamp(15px, 1.5vw, 18px); + } +} + +@media (min-width: 1025px) { + :root { + --text-size: clamp(16px, 1.2vw, 20px); + } +} + +/* Paragraph spacing - increased for better readability */ +p { + margin-bottom: 1.25em; + margin-top: 0; +} + +/* Markdown content paragraph spacing */ +:global(.markdown-content) p { + margin-bottom: 1.25em; + margin-top: 0; +} + +/* Consistent heading sizes relative to base font size */ +h1 { + font-size: clamp(1.5rem, 4vw, 2rem); + line-height: 1.2; + margin-bottom: 1rem; + margin-top: 0; +} + +h2 { + font-size: clamp(1.25rem, 3vw, 1.5rem); + line-height: 1.3; + margin-bottom: 0.875rem; + margin-top: 0; +} + +h3 { + font-size: clamp(1.125rem, 2.5vw, 1.25rem); + line-height: 1.4; + margin-bottom: 0.75rem; + margin-top: 0; +} + +h4, h5, h6 { + font-size: clamp(1rem, 2vw, 1.125rem); + line-height: 1.4; + margin-bottom: 0.625rem; + margin-top: 0; +} + /* Apply monospace font to all elements globally */ * { font-family: inherit; diff --git a/src/lib/components/content/EmbeddedEvent.svelte b/src/lib/components/content/EmbeddedEvent.svelte index f932226..ff8152d 100644 --- a/src/lib/components/content/EmbeddedEvent.svelte +++ b/src/lib/components/content/EmbeddedEvent.svelte @@ -199,7 +199,7 @@ if (!event) return; // Dispatch custom event on window to open in side-panel - // Parent components (like FeedPage, ThreadList) listen for this event on window + // Parent components (like FeedPage, DiscussionList) listen for this event on window const openEvent = new CustomEvent('openEventInDrawer', { detail: { event }, bubbles: true, diff --git a/src/lib/components/content/MarkdownRenderer.svelte b/src/lib/components/content/MarkdownRenderer.svelte index 9146f7c..bbe42d0 100644 --- a/src/lib/components/content/MarkdownRenderer.svelte +++ b/src/lib/components/content/MarkdownRenderer.svelte @@ -846,6 +846,24 @@ overflow-wrap: break-word; } + /* Increased paragraph spacing for better readability */ + :global(.markdown-content p) { + margin-bottom: 1.25em; + margin-top: 0; + } + + /* Ensure consistent spacing between paragraphs and other elements */ + :global(.markdown-content p + p) { + margin-top: 0; + } + + :global(.markdown-content p + ul), + :global(.markdown-content p + ol), + :global(.markdown-content p + blockquote), + :global(.markdown-content p + pre) { + margin-top: 1em; + } + :global(.markdown-content img) { max-width: 100%; height: auto; diff --git a/src/lib/components/content/VoteCount.svelte b/src/lib/components/content/VoteCount.svelte new file mode 100644 index 0000000..2e9a1ad --- /dev/null +++ b/src/lib/components/content/VoteCount.svelte @@ -0,0 +1,127 @@ + + + + {#if !votesCalculated} + + ⬆️ 0 + ⬇️ 0 + Calculating votes + + {:else} + + + + + {/if} + + + diff --git a/src/lib/components/layout/Header.svelte b/src/lib/components/layout/Header.svelte index 4cb96ff..305015b 100644 --- a/src/lib/components/layout/Header.svelte +++ b/src/lib/components/layout/Header.svelte @@ -37,7 +37,7 @@
Loading thread...
+{:else if rootEvent} +Thread not found
+{/if} + + diff --git a/src/lib/modules/discussions/DiscussionVoteButtons.svelte b/src/lib/modules/discussions/DiscussionVoteButtons.svelte new file mode 100644 index 0000000..31301f7 --- /dev/null +++ b/src/lib/modules/discussions/DiscussionVoteButtons.svelte @@ -0,0 +1,450 @@ + + + + + diff --git a/src/lib/modules/threads/ThreadView.svelte b/src/lib/modules/events/EventView.svelte similarity index 77% rename from src/lib/modules/threads/ThreadView.svelte rename to src/lib/modules/events/EventView.svelte index ef27dd8..22d1b21 100644 --- a/src/lib/modules/threads/ThreadView.svelte +++ b/src/lib/modules/events/EventView.svelte @@ -1,12 +1,19 @@ {#if loading} -Loading thread...
+Loading event...
+{:else if error} + {:else if rootEvent} -Thread not found
+Event not found
{/if} diff --git a/src/lib/modules/reactions/ReactionButtons.svelte b/src/lib/modules/reactions/ReactionButtons.svelte deleted file mode 100644 index 69079bd..0000000 --- a/src/lib/modules/reactions/ReactionButtons.svelte +++ /dev/null @@ -1,257 +0,0 @@ - - -{#if isLoggedIn} - -{/if} - - diff --git a/src/lib/types/kind-lookup.ts b/src/lib/types/kind-lookup.ts index 13565ea..843d952 100644 --- a/src/lib/types/kind-lookup.ts +++ b/src/lib/types/kind-lookup.ts @@ -111,8 +111,8 @@ export const KIND_LOOKUP: RecordDecentralized discussion board on Nostr. Brought to you by Silberengel.
-Decentralized discussion board on Nostr.
+