homepage feed: remove duplicate category+date in advanced panel (kept author/source only); article page: render SidebarAdStack instead of placeholder
This commit is contained in:
@@ -4,6 +4,7 @@ import Link from "next/link";
|
|||||||
import AppImage from "@/components/ui/AppImage";
|
import AppImage from "@/components/ui/AppImage";
|
||||||
import Header from "@/components/Header";
|
import Header from "@/components/Header";
|
||||||
import Footer from "@/components/Footer";
|
import Footer from "@/components/Footer";
|
||||||
|
import SidebarAdStack from "@/components/SidebarAdStack";
|
||||||
import { createClient } from "@/lib/supabase/client";
|
import { createClient } from "@/lib/supabase/client";
|
||||||
import type { Article } from "@/lib/articles/types";
|
import type { Article } from "@/lib/articles/types";
|
||||||
|
|
||||||
@@ -436,13 +437,8 @@ export default function ArticleDetailClient({ article, relatedArticles }: Articl
|
|||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Ad placeholder */}
|
{/* Sidebar ad stack — 300x600 + 300x250 rotating */}
|
||||||
<div className="ad-placeholder w-full h-[250px] flex items-center justify-center">
|
<SidebarAdStack />
|
||||||
<div className="text-center">
|
|
||||||
<p className="text-[#444] text-xs font-body">Advertisement</p>
|
|
||||||
<p className="text-[#333] text-[10px] font-body mt-1">300×250</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</aside>
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
|||||||
@@ -437,7 +437,7 @@ export default function ArticleFeed() {
|
|||||||
role="group"
|
role="group"
|
||||||
aria-label="Advanced filters">
|
aria-label="Advanced filters">
|
||||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-3">
|
<div className="grid grid-cols-1 sm:grid-cols-2 gap-3">
|
||||||
{/* Author filter */}
|
{/* Author filter (category + date moved out to the always-visible row) */}
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<label htmlFor={`${feedId}-author`} className="font-body text-[10px] text-[#555] uppercase tracking-wide block">
|
<label htmlFor={`${feedId}-author`} className="font-body text-[10px] text-[#555] uppercase tracking-wide block">
|
||||||
Author
|
Author
|
||||||
@@ -459,60 +459,6 @@ export default function ArticleFeed() {
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Category filter (moved into advanced panel as well) */}
|
|
||||||
<div className="space-y-1">
|
|
||||||
<label htmlFor={`${feedId}-category-select`} className="font-body text-[10px] text-[#555] uppercase tracking-wide block">
|
|
||||||
Category
|
|
||||||
</label>
|
|
||||||
<div className="relative">
|
|
||||||
<select
|
|
||||||
id={`${feedId}-category-select`}
|
|
||||||
value={activeCategory}
|
|
||||||
onChange={(e) => { setActiveCategory(e.target.value); setPage(1); }}
|
|
||||||
className="w-full bg-[#111] border border-[#2a2a2a] text-[#ccc] font-body text-sm rounded-sm px-3 py-1.5 pr-8 appearance-none focus:outline-none focus:border-[#3b82f6] focus:ring-1 focus:ring-[#3b82f6]/30 transition-colors [color-scheme:dark]"
|
|
||||||
aria-label="Filter by category">
|
|
||||||
{ALL_CATEGORIES.map((cat) => (
|
|
||||||
<option key={cat} value={cat}>{cat === "All" ? "All Categories" : cat}</option>
|
|
||||||
))}
|
|
||||||
</select>
|
|
||||||
<svg className="absolute right-2.5 top-1/2 -translate-y-1/2 pointer-events-none text-[#555]" width="10" height="10" viewBox="0 0 10 10" fill="none" aria-hidden="true">
|
|
||||||
<path d="M2 3.5L5 6.5L8 3.5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Date From */}
|
|
||||||
<div className="space-y-1">
|
|
||||||
<label htmlFor={`${feedId}-date-from`} className="font-body text-[10px] text-[#555] uppercase tracking-wide block">
|
|
||||||
Date From
|
|
||||||
</label>
|
|
||||||
<input
|
|
||||||
id={`${feedId}-date-from`}
|
|
||||||
type="date"
|
|
||||||
value={dateFrom}
|
|
||||||
onChange={(e) => { setDateFrom(e.target.value); setPage(1); }}
|
|
||||||
max={dateTo || undefined}
|
|
||||||
className="w-full bg-[#111] border border-[#2a2a2a] text-[#ccc] font-body text-sm rounded-sm px-3 py-1.5 focus:outline-none focus:border-[#3b82f6] focus:ring-1 focus:ring-[#3b82f6]/30 transition-colors [color-scheme:dark]"
|
|
||||||
aria-label="Filter articles from date"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Date To */}
|
|
||||||
<div className="space-y-1">
|
|
||||||
<label htmlFor={`${feedId}-date-to`} className="font-body text-[10px] text-[#555] uppercase tracking-wide block">
|
|
||||||
Date To
|
|
||||||
</label>
|
|
||||||
<input
|
|
||||||
id={`${feedId}-date-to`}
|
|
||||||
type="date"
|
|
||||||
value={dateTo}
|
|
||||||
onChange={(e) => { setDateTo(e.target.value); setPage(1); }}
|
|
||||||
min={dateFrom || undefined}
|
|
||||||
className="w-full bg-[#111] border border-[#2a2a2a] text-[#ccc] font-body text-sm rounded-sm px-3 py-1.5 focus:outline-none focus:border-[#3b82f6] focus:ring-1 focus:ring-[#3b82f6]/30 transition-colors [color-scheme:dark]"
|
|
||||||
aria-label="Filter articles to date"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Source filter inside advanced panel */}
|
{/* Source filter inside advanced panel */}
|
||||||
|
|||||||
Reference in New Issue
Block a user