Center advertisements on the page for better visibility
Center adsense ad components horizontally using flexbox and 'mx-auto' utility classes within AdSenseAd.tsx. 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/ZmOc3Lp
This commit is contained in:
parent
07e01ee29d
commit
7aee6eaac8
4
.replit
4
.replit
@ -23,6 +23,10 @@ externalPort = 3001
|
|||||||
localPort = 35637
|
localPort = 35637
|
||||||
externalPort = 3000
|
externalPort = 3000
|
||||||
|
|
||||||
|
[[ports]]
|
||||||
|
localPort = 39711
|
||||||
|
externalPort = 3002
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
PORT = "5000"
|
PORT = "5000"
|
||||||
|
|
||||||
|
|||||||
@ -68,7 +68,7 @@ export default function AdSenseAd({
|
|||||||
// Responsive ads with different sizes for desktop/mobile
|
// Responsive ads with different sizes for desktop/mobile
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`adsense-wrapper w-full ${className}`}
|
className={`adsense-wrapper w-full flex justify-center ${className}`}
|
||||||
ref={adRef}
|
ref={adRef}
|
||||||
style={{ width: '100%', minWidth: '320px' }}
|
style={{ width: '100%', minWidth: '320px' }}
|
||||||
>
|
>
|
||||||
@ -85,7 +85,7 @@ export default function AdSenseAd({
|
|||||||
/>
|
/>
|
||||||
{/* Mobile ad */}
|
{/* Mobile ad */}
|
||||||
<ins
|
<ins
|
||||||
className="adsbygoogle block md:hidden"
|
className="adsbygoogle block md:hidden mx-auto"
|
||||||
style={{
|
style={{
|
||||||
display: 'inline-block',
|
display: 'inline-block',
|
||||||
width: mobileWidth ? `${mobileWidth}px` : '300px',
|
width: mobileWidth ? `${mobileWidth}px` : '300px',
|
||||||
@ -114,7 +114,7 @@ export default function AdSenseAd({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`adsense-wrapper w-full ${className}`}
|
className={`adsense-wrapper w-full flex justify-center ${className}`}
|
||||||
ref={adRef}
|
ref={adRef}
|
||||||
style={{ width: '100%', minWidth: '320px' }}
|
style={{ width: '100%', minWidth: '320px' }}
|
||||||
>
|
>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user