Add an advertisement to the bottom of the top stories section

Integrate an AdSense ad component into the TopStoriesList component in client/src/pages/home.tsx, placing it at the bottom of the sidebar with dynamic sizing.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 517dfa7b-26ac-463d-a6e1-a58c6df97188
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 40270915-8e25-4bc4-b07c-e47a007b4cd5
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/517dfa7b-26ac-463d-a6e1-a58c6df97188/0ZGabQy
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
sebastjanartic 2026-02-28 21:46:10 +00:00
parent 81892e4360
commit e3c818f8c0
3 changed files with 10 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 KiB

View File

@ -229,7 +229,7 @@ function NativeAdCard() {
function TopStoriesList({ articles }: { articles: Article[] }) { function TopStoriesList({ articles }: { articles: Article[] }) {
return ( return (
<div className="bg-card rounded-lg border border-card-border p-3 h-full" data-testid="sidebar-top-stories"> <div className="bg-card rounded-lg border border-card-border p-3 h-full flex flex-col" data-testid="sidebar-top-stories">
<h3 className="font-bold text-card-foreground text-xs mb-2 flex items-center gap-2"> <h3 className="font-bold text-card-foreground text-xs mb-2 flex items-center gap-2">
<span className="w-1 h-3.5 bg-primary rounded-full" /> <span className="w-1 h-3.5 bg-primary rounded-full" />
Top-Storys Top-Storys
@ -247,6 +247,15 @@ function TopStoriesList({ articles }: { articles: Article[] }) {
</Link> </Link>
))} ))}
</div> </div>
<div className="mt-auto pt-3 border-t border-card-border">
<AdSense
slot="auto"
format="fluid"
layoutKey="-6t+ed+2i-1n-4w"
style={{ display: "block" }}
className="w-full min-h-[120px]"
/>
</div>
</div> </div>
); );
} }