Add decorative artist pattern background to desktop advertisements
Integrates an `ArtistPatternBg` component to wrap ad containers (`ArticleCardAd`, home page wide-picked ad section) with a decorative artist name pattern, enhancing visual appeal on desktop while leaving mobile unchanged. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 517dfa7b-26ac-463d-a6e1-a58c6df97188 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 7e26d45f-76ee-4e0c-8b18-8bffeb9e004b Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/517dfa7b-26ac-463d-a6e1-a58c6df97188/jdAEdU5 Replit-Helium-Checkpoint-Created: true
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { useEffect, useMemo, useRef, useState } from "react";
|
||||
import ArtistPatternBg from "./artist-pattern-bg";
|
||||
|
||||
type AdFormat = "auto" | "fluid" | "rectangle" | "horizontal" | "vertical" | "autorelaxed";
|
||||
|
||||
@@ -77,16 +78,19 @@ export default function AdSense({
|
||||
);
|
||||
}
|
||||
|
||||
let adSeedCounter = 1;
|
||||
|
||||
export function ArticleCardAd() {
|
||||
const seed = useMemo(() => adSeedCounter++, []);
|
||||
return (
|
||||
<div className="bg-card rounded-md border border-card-border overflow-hidden h-full">
|
||||
<ArtistPatternBg className="rounded-md border border-card-border h-full bg-card" seed={seed}>
|
||||
<AdSense
|
||||
slot="3854634730"
|
||||
format="fluid"
|
||||
layoutKey="-6r+cy-10+8a-3"
|
||||
style={{ display: "block" }}
|
||||
/>
|
||||
</div>
|
||||
</ArtistPatternBg>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user