From 3460baa8b997840731295a47627b4a2071b897cb Mon Sep 17 00:00:00 2001 From: Ryan Salazar Date: Wed, 27 May 2026 14:52:08 +0000 Subject: [PATCH] ux: dark-theme conversion + forum hero + ticker cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - /manufacturers index + DirectoryClient: convert white/light-ink theme to BB dark theme so it stops standing out against the rest of the site - /manufacturers/[slug]: same conversion, includes the new executives card grid and Headquarters block - /nab-2026: same conversion, including hero gradient and sponsor tile borders (amber on dark instead of amber on white) - Forum: remove "Top Performing Threads" widget from both /forum and /forum/[slug] (display only — TopThreadsWidget component preserved in case admins want to re-enable later) - Forum hero: vertical padding py-10 → py-5, tagline reduced from three sentences to one. Adds a "Sign in to post" or "Start a thread" CTA in the hero's top-right depending on auth state. - Recent Forum Posts ticker: drop replies entirely, surface only thread titles so breadth of conversation shows instead of the loudest threads dominating with reply chatter. --- src/app/api/ticker/forum-posts/route.ts | 71 +++++------------ src/app/forum/[slug]/page.tsx | 3 - src/app/forum/page.tsx | 46 ++++++++--- src/app/manufacturers/DirectoryClient.tsx | 28 +++---- src/app/manufacturers/[slug]/page.tsx | 96 +++++++++++------------ src/app/manufacturers/page.tsx | 10 +-- src/app/nab-2026/page.tsx | 52 ++++++------ 7 files changed, 147 insertions(+), 159 deletions(-) diff --git a/src/app/api/ticker/forum-posts/route.ts b/src/app/api/ticker/forum-posts/route.ts index 929b0a4..6c50749 100644 --- a/src/app/api/ticker/forum-posts/route.ts +++ b/src/app/api/ticker/forum-posts/route.ts @@ -22,65 +22,32 @@ export async function GET() { auth: { persistSession: false }, }); - // Newest threads + newest replies, interleaved by timestamp. - const [threadsRes, repliesRes] = await Promise.all([ - sb - .from('forum_threads') - .select('id, title, author_name, created_at') - .order('created_at', { ascending: false }) - .limit(20), - sb - .from('forum_replies') - .select('id, body, thread_id, author_name, created_at, forum_threads(title)') - .order('created_at', { ascending: false }) - .limit(20), - ]); + // Threads only — per editorial direction we surface unique topics, not + // reply chatter, so the ticker shows breadth of discussion. + const threadsRes = await sb + .from('forum_threads') + .select('id, title, author_name, created_at') + .order('created_at', { ascending: false }) + .limit(40); - if (threadsRes.error && repliesRes.error) { + if (threadsRes.error) { return NextResponse.json( - { error: threadsRes.error?.message || repliesRes.error?.message, items: [] }, - { status: 500 } + { error: threadsRes.error.message, items: [] }, + { status: 500 }, ); } - const items: TickerItem[] = []; - - for (const t of threadsRes.data || []) { - items.push({ - id: t.id, - href: `/forum/thread/${t.id}`, - title: t.title, - kind: 'thread', - author_name: t.author_name, - created_at: t.created_at, - }); - } - - for (const r of (repliesRes.data || []) as Array<{ - id: string; - body: string; - thread_id: string; - author_name: string | null; - created_at: string; - forum_threads?: { title: string } | { title: string }[] | null; - }>) { - const parent = - Array.isArray(r.forum_threads) ? r.forum_threads[0] : r.forum_threads; - const parentTitle = parent?.title || 'forum reply'; - items.push({ - id: r.id, - href: `/forum/thread/${r.thread_id}`, - title: `Re: ${parentTitle}`, - kind: 'reply', - author_name: r.author_name, - created_at: r.created_at, - }); - } - - items.sort((a, b) => (a.created_at < b.created_at ? 1 : -1)); + const items: TickerItem[] = (threadsRes.data || []).map((t: any) => ({ + id: t.id, + href: `/forum/thread/${t.id}`, + title: t.title, + kind: 'thread', + author_name: t.author_name, + created_at: t.created_at, + })); return NextResponse.json( - { items: items.slice(0, 30) }, + { items: items.slice(0, 40) }, { headers: { 'Cache-Control': 'public, s-maxage=300, stale-while-revalidate=600', diff --git a/src/app/forum/[slug]/page.tsx b/src/app/forum/[slug]/page.tsx index 732388e..6a81b7c 100644 --- a/src/app/forum/[slug]/page.tsx +++ b/src/app/forum/[slug]/page.tsx @@ -361,9 +361,6 @@ export default function ForumCategoryPage() { )} - {/* Top Performing Threads Widget (shown when category is loaded) */} - {!loading && category && } - {/* Search + Sort Bar */}
{/* Search */} diff --git a/src/app/forum/page.tsx b/src/app/forum/page.tsx index 2ddecf7..a6f8bc6 100644 --- a/src/app/forum/page.tsx +++ b/src/app/forum/page.tsx @@ -264,14 +264,41 @@ export default function ForumIndexPage() {
{/* Hero — width-aligned with content below + featured-box pattern */}
-
-
- The Crew Lounge -

The Crew Lounge

+
+
+
+
+ The Crew Lounge +

The Crew Lounge

+
+

+ Connect with broadcast, motion picture, and post production pros worldwide. +

+
+
+ {currentUserId ? ( + + + Start a thread + + ) : ( + + + Sign in to post + + )} +
-

- The Crew Lounge: connect with broadcast, motion picture and post production professionals worldwide. Ask questions, share expertise, and discuss the technology shaping the industry. -

@@ -505,12 +532,9 @@ export default function ForumIndexPage() {
)} - {/* Default view: Top Threads + Category Grid */} + {/* Default view: Category Grid */} {!isSearchMode && ( <> - {/* Top Performing Threads Widget */} - {!loading && } - {loading && (
{[...Array(8)].map((_, i) => ( diff --git a/src/app/manufacturers/DirectoryClient.tsx b/src/app/manufacturers/DirectoryClient.tsx index 07500d8..d049e60 100644 --- a/src/app/manufacturers/DirectoryClient.tsx +++ b/src/app/manufacturers/DirectoryClient.tsx @@ -53,24 +53,24 @@ export default function ManufacturerDirectoryClient({ return (
-
+
setQ(e.target.value)} placeholder="Search by company or product…" - className="w-full bg-white border border-ink/15 rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-brand-primary/40" + className="w-full bg-[#0d0d0d] border border-[#2a2a2a] rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-[#3b82f6]/40" />
-
+
{SHOW_FILTERS.map((f) => (