Improve ad display logic and integrate ads into more pages

Refactor AdSenseAd component to use ResizeObserver for more reliable initialization and add the component to FolxStadlPage, GeschichteLiedPage, and GipfelstammtischPage.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 45a1dcfc-f8a2-475a-a6b9-96fbb841dc27
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/60d372ff-2c10-46c7-b01b-10c3435136b0/45a1dcfc-f8a2-475a-a6b9-96fbb841dc27/fmm3fpm
This commit is contained in:
sebastjanartic
2025-09-26 17:02:56 +00:00
parent b08ce97c9d
commit 2f55f7458c
6 changed files with 54 additions and 14 deletions
+1
View File
@@ -8,6 +8,7 @@ import { useState, useEffect } from 'react';
import type { Video } from '@shared/schema';
import { Input } from '@/components/ui/input';
import { Search } from 'lucide-react';
import AdSenseAd from '@/components/adsense-ad';
export default function FolxStadlPage() {
const [selectedVideo, setSelectedVideo] = useState<Video | null>(null);
+1
View File
@@ -8,6 +8,7 @@ import { useState, useEffect } from 'react';
import type { Video } from '@shared/schema';
import { Input } from '@/components/ui/input';
import { Search } from 'lucide-react';
import AdSenseAd from '@/components/adsense-ad';
export default function GeschichteLiedPage() {
const [selectedVideo, setSelectedVideo] = useState<Video | null>(null);
@@ -8,6 +8,7 @@ import { useState, useEffect } from 'react';
import type { Video } from '@shared/schema';
import { Input } from '@/components/ui/input';
import { Search } from 'lucide-react';
import AdSenseAd from '@/components/adsense-ad';
export default function GipfelstammtischPage() {
const [selectedVideo, setSelectedVideo] = useState<Video | null>(null);
+3 -3
View File
@@ -210,7 +210,7 @@ export default function Home() {
{/* Header Banner Ad */}
<div className="container py-4 border-b border-white/10">
<div className="flex justify-center">
<div className="w-full flex justify-center">
<AdSenseAd
adSlot="1023820241"
adFormat="auto"
@@ -227,7 +227,7 @@ export default function Home() {
/>
{/* Mid-content Rectangle Ad */}
<div className="flex justify-center my-8 py-4">
<div className="w-full flex justify-center my-8 py-4">
<AdSenseAd
adSlot="6088444663"
adFormat="auto"
@@ -238,7 +238,7 @@ export default function Home() {
{/* Bottom Banner Ad */}
<div className="container py-4 border-t border-white/10">
<div className="flex justify-center">
<div className="w-full flex justify-center">
<AdSenseAd
adSlot="8519166886"
adFormat="auto"