Add multiplex ads to the homepage and update ad component

Add a new `MultiplexAd` component and integrate it into the homepage, also update the `AdSense` component's `AdFormat` type to include "autorelaxed".

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 517dfa7b-26ac-463d-a6e1-a58c6df97188
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 9ce7cd4f-67b5-4818-8402-89bb8a6d543d
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/517dfa7b-26ac-463d-a6e1-a58c6df97188/ls5p9ni
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
sebastjanartic 2026-03-01 09:46:44 +00:00
parent 5a5a5c9737
commit 52bcf48496
2 changed files with 17 additions and 2 deletions

View File

@ -1,6 +1,6 @@
import { useEffect, useRef } from "react";
type AdFormat = "auto" | "fluid" | "rectangle" | "horizontal" | "vertical";
type AdFormat = "auto" | "fluid" | "rectangle" | "horizontal" | "vertical" | "autorelaxed";
interface AdSenseProps {
slot: string;
@ -77,6 +77,19 @@ export function InArticleAd() {
);
}
export function MultiplexAd() {
return (
<div className="bg-card rounded-md border border-card-border overflow-hidden">
<AdSense
slot="4593001335"
format="autorelaxed"
style={{ display: "block" }}
className="w-full min-h-[250px]"
/>
</div>
);
}
export function SidebarAd() {
return (
<div className="bg-card rounded-md border border-card-border p-4 mt-6">

View File

@ -7,7 +7,7 @@ import { Eye, Play, Images } from "lucide-react";
import { Skeleton } from "@/components/ui/skeleton";
import Header from "@/components/header";
import Footer from "@/components/footer";
import AdSense, { ArticleCardAd } from "@/components/adsense";
import AdSense, { ArticleCardAd, MultiplexAd } from "@/components/adsense";
import { PhotoGalleryWidget } from "@/components/photo-gallery";
import { HoroscopeWidget } from "@/components/horoscope-widget";
import { RecipeWidget } from "@/components/recipe-widget";
@ -606,6 +606,8 @@ export default function Home() {
))}
</div>
<MultiplexAd />
</main>
<Footer />
</div>