From 38f2e5178827c593824e15d44016c20a8e2dd138 Mon Sep 17 00:00:00 2001 From: Davide Scaini Date: Wed, 13 May 2026 19:29:39 +0200 Subject: [PATCH] ideas: add Ideas page, nav link; remove feedback button from About New /ideas/ page with Svelte component: card list sorted by votes, inline submit form, optimistic vote toggling, delete for own/admin. Bug report link moved to bottom of Ideas page. Feedback button removed from About page. --- site/src/components/IdeasPage.svelte | 217 +++++++++++++++++++++++++++ site/src/layouts/Base.astro | 1 + site/src/pages/about/index.astro | 10 -- site/src/pages/ideas/index.astro | 7 + 4 files changed, 225 insertions(+), 10 deletions(-) create mode 100644 site/src/components/IdeasPage.svelte create mode 100644 site/src/pages/ideas/index.astro diff --git a/site/src/components/IdeasPage.svelte b/site/src/components/IdeasPage.svelte new file mode 100644 index 0000000..c0f95d7 --- /dev/null +++ b/site/src/components/IdeasPage.svelte @@ -0,0 +1,217 @@ + + +
+
+

Ideas

+ +
+ + {#if showForm} +
+ + + {#if formError} +

{formError}

+ {/if} + +
+ {/if} + + {#if loading} +

Loading…

+ {:else if ideas.length === 0} +

No ideas yet. Be the first!

+ {:else} + + {/if} + +
+ Found a bug? Report it here → +
+
diff --git a/site/src/layouts/Base.astro b/site/src/layouts/Base.astro index b1d5297..969d411 100644 --- a/site/src/layouts/Base.astro +++ b/site/src/layouts/Base.astro @@ -221,6 +221,7 @@ try { Convert )} Segments + Ideas About {wikiUrl && ( -
@@ -152,8 +144,6 @@ const labels = { try { const me = await fetch('/api/me', { credentials: 'include' }); if (!me.ok) return; // not logged in — hide community section - const feedbackBtn = document.getElementById('feedback-btn'); - if (feedbackBtn) feedbackBtn.style.display = ''; } catch { return; } let data; try { diff --git a/site/src/pages/ideas/index.astro b/site/src/pages/ideas/index.astro new file mode 100644 index 0000000..4411d06 --- /dev/null +++ b/site/src/pages/ideas/index.astro @@ -0,0 +1,7 @@ +--- +import Base from '../../layouts/Base.astro'; +import IdeasPage from '../../components/IdeasPage.svelte'; +--- + + +