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:
parent
5a5a5c9737
commit
52bcf48496
@ -1,6 +1,6 @@
|
|||||||
import { useEffect, useRef } from "react";
|
import { useEffect, useRef } from "react";
|
||||||
|
|
||||||
type AdFormat = "auto" | "fluid" | "rectangle" | "horizontal" | "vertical";
|
type AdFormat = "auto" | "fluid" | "rectangle" | "horizontal" | "vertical" | "autorelaxed";
|
||||||
|
|
||||||
interface AdSenseProps {
|
interface AdSenseProps {
|
||||||
slot: string;
|
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() {
|
export function SidebarAd() {
|
||||||
return (
|
return (
|
||||||
<div className="bg-card rounded-md border border-card-border p-4 mt-6">
|
<div className="bg-card rounded-md border border-card-border p-4 mt-6">
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import { Eye, Play, Images } from "lucide-react";
|
|||||||
import { Skeleton } from "@/components/ui/skeleton";
|
import { Skeleton } from "@/components/ui/skeleton";
|
||||||
import Header from "@/components/header";
|
import Header from "@/components/header";
|
||||||
import Footer from "@/components/footer";
|
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 { PhotoGalleryWidget } from "@/components/photo-gallery";
|
||||||
import { HoroscopeWidget } from "@/components/horoscope-widget";
|
import { HoroscopeWidget } from "@/components/horoscope-widget";
|
||||||
import { RecipeWidget } from "@/components/recipe-widget";
|
import { RecipeWidget } from "@/components/recipe-widget";
|
||||||
@ -606,6 +606,8 @@ export default function Home() {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<MultiplexAd />
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
<Footer />
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user