Add a mobile-specific sticky ad banner at the bottom of the screen
Introduces a new `MobileStickyAd` component that displays a 320x50px ad banner at the bottom of the screen on mobile devices only. The ad appears after a 2-second delay and can be dismissed by the user for the session. The footer dynamically adjusts its padding to prevent content overlap with the sticky ad. The `replit.md` file is updated to reflect this new feature. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 23852c00-4779-460a-9e0c-d09fee4b6c92 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: db8604a4-d491-44c8-b0ac-b67d779b436a Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/23852c00-4779-460a-9e0c-d09fee4b6c92/tdiozLO Replit-Helium-Checkpoint-Created: true
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Link } from "wouter";
|
||||
import { SiFacebook, SiInstagram, SiYoutube, SiTiktok } from "react-icons/si";
|
||||
import { useIsMobile } from "@/hooks/use-mobile";
|
||||
|
||||
const SOCIAL_LINKS = [
|
||||
{ href: "https://www.facebook.com/folxtv/", icon: SiFacebook, label: "Facebook", testId: "link-social-facebook" },
|
||||
@@ -8,7 +9,13 @@ const SOCIAL_LINKS = [
|
||||
{ href: "https://www.tiktok.com/@folxtv", icon: SiTiktok, label: "TikTok", testId: "link-social-tiktok" },
|
||||
];
|
||||
|
||||
const STICKY_AD_DISMISS_KEY = "folx-sticky-ad-dismissed";
|
||||
|
||||
export default function Footer({ narrow }: { narrow?: boolean }) {
|
||||
const isMobile = useIsMobile();
|
||||
const stickyAdDismissed = typeof window !== "undefined" && sessionStorage.getItem(STICKY_AD_DISMISS_KEY);
|
||||
const showStickyPadding = isMobile && !stickyAdDismissed;
|
||||
|
||||
return (
|
||||
<footer className="border-t border-border mt-10" data-testid="footer">
|
||||
<div className={`${narrow ? "max-w-4xl" : "max-w-7xl"} mx-auto px-4 sm:px-6 lg:px-8 py-8 relative z-20`}>
|
||||
@@ -113,6 +120,7 @@ export default function Footer({ narrow }: { narrow?: boolean }) {
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{showStickyPadding && <div className="h-20" aria-hidden="true" />}
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user