Adjust ad sizes for better display on various screen sizes
Update AdSenseAd component to use responsive ad sizes (max-width: 728px, max-height: 90px) and set a fixed height of 90px for auto-sized ads, improving layout consistency. 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/Kj4UD9U
This commit is contained in:
parent
2579fd8236
commit
f80683c8a3
2
.replit
2
.replit
@ -16,7 +16,7 @@ localPort = 5000
|
|||||||
externalPort = 80
|
externalPort = 80
|
||||||
|
|
||||||
[[ports]]
|
[[ports]]
|
||||||
localPort = 35163
|
localPort = 41645
|
||||||
externalPort = 3000
|
externalPort = 3000
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
|
|||||||
BIN
attached_assets/image_1758102583207.png
Normal file
BIN
attached_assets/image_1758102583207.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 404 KiB |
@ -31,8 +31,8 @@ export default function AdSenseAd({
|
|||||||
|
|
||||||
const adStyle: React.CSSProperties = {
|
const adStyle: React.CSSProperties = {
|
||||||
display: 'block',
|
display: 'block',
|
||||||
minWidth: '300px',
|
maxWidth: '728px',
|
||||||
minHeight: '250px'
|
maxHeight: '90px'
|
||||||
};
|
};
|
||||||
|
|
||||||
if (adFormat !== 'auto' && width && height) {
|
if (adFormat !== 'auto' && width && height) {
|
||||||
@ -40,7 +40,7 @@ export default function AdSenseAd({
|
|||||||
adStyle.height = `${height}px`;
|
adStyle.height = `${height}px`;
|
||||||
} else {
|
} else {
|
||||||
adStyle.width = '100%';
|
adStyle.width = '100%';
|
||||||
adStyle.height = 'auto';
|
adStyle.height = '90px';
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user