From 3bb27e2e0abee065f3c7b5cf173c23a02e8d3d92 Mon Sep 17 00:00:00 2001 From: Ryan Salazar Date: Wed, 20 May 2026 05:07:49 +0000 Subject: [PATCH] ads/chrome: banners on /search and /reading-list; wrap /contributor with site chrome - /search and /reading-list already had Header + Footer; add a single in-content 728x90 banner at the bottom of each main column (gated on ADS_728X90.length > 0, hidden on mobile). - /contributor was a bare dashboard with sidebar + main, no site chrome at all. Wrap it in the standard Header + Footer; drop the inner sidebar/main wrapper from min-h-screen to a natural-height flex so the dashboard sits below the header instead of competing with it for full viewport. Header brings the site-wide 728x90 leaderboard with it, so contributors see the same ad inventory as the public site without a second in-content banner cluttering the dashboard panes. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/app/contributor/page.tsx | 6 +++++- src/app/reading-list/page.tsx | 9 +++++++++ src/app/search/page.tsx | 9 +++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/app/contributor/page.tsx b/src/app/contributor/page.tsx index 7590207..82819f6 100644 --- a/src/app/contributor/page.tsx +++ b/src/app/contributor/page.tsx @@ -5,6 +5,8 @@ import React, { useState, useEffect, useCallback } from 'react'; import { useAuth } from '@/contexts/AuthContext'; import { useRouter } from 'next/navigation'; import { createClient } from '@/lib/supabase/client'; +import Header from '@/components/Header'; +import Footer from '@/components/Footer'; // ─── Types ──────────────────────────────────────────────────────────────────── @@ -246,6 +248,7 @@ export default function ContributorDashboard() { return (
+
{notification && (
)} -
+
{/* Sidebar */}
); } diff --git a/src/app/reading-list/page.tsx b/src/app/reading-list/page.tsx index 701f2f6..350864d 100644 --- a/src/app/reading-list/page.tsx +++ b/src/app/reading-list/page.tsx @@ -4,6 +4,8 @@ import Link from "next/link"; import AppImage from "@/components/ui/AppImage"; import Header from "@/components/Header"; import Footer from "@/components/Footer"; +import AdImage from "@/components/AdImage"; +import { ADS_728X90, shuffle } from "@/lib/ads"; import { createClient } from "@/lib/supabase/client"; interface SavedArticle { @@ -309,6 +311,13 @@ export default function ReadingListPage() {
)}
+ + {/* In-content 728x90 banner */} + {ADS_728X90.length > 0 && ( +
+ +
+ )}
diff --git a/src/app/search/page.tsx b/src/app/search/page.tsx index 79954bc..2d7d8d1 100644 --- a/src/app/search/page.tsx +++ b/src/app/search/page.tsx @@ -3,6 +3,8 @@ import Link from "next/link"; import Header from "@/components/Header"; import Footer from "@/components/Footer"; import AppImage from "@/components/ui/AppImage"; +import AdImage from "@/components/AdImage"; +import { ADS_728X90, shuffle } from "@/lib/ads"; import { searchLegacyArticles } from "@/lib/articles/legacy-source"; export const revalidate = 60; @@ -93,6 +95,13 @@ export default async function SearchPage({ searchParams }: SearchPageProps) { ); })}
+ + {/* In-content 728x90 banner */} + {ADS_728X90.length > 0 && ( +
+ +
+ )}