mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-06-06 18:31:00 +00:00
Style fix for super wide screens
This commit is contained in:
parent
5c9bcc95e3
commit
db6824d864
@ -19,6 +19,8 @@ const HeroBanner = () => {
|
|||||||
const { returnImageProxy } = useImageProxy();
|
const { returnImageProxy } = useImageProxy();
|
||||||
|
|
||||||
const isMobile = windowWidth <= 800;
|
const isMobile = windowWidth <= 800;
|
||||||
|
const isWideScreen = windowWidth >= 2200;
|
||||||
|
const isSuperWideScreen = windowWidth >= 2600;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
@ -44,8 +46,15 @@ const HeroBanner = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getHeroHeight = () => {
|
||||||
|
if (isSuperWideScreen) return 'h-[900px]';
|
||||||
|
if (isWideScreen) return 'h-[700px]';
|
||||||
|
if (isMobile) return 'h-[450px]';
|
||||||
|
return 'h-[600px]';
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`${isMobile ? 'h-[450px]' : 'h-[600px]'} ${isTabView ? 'mx-0' : 'm-14'} relative flex justify-center items-center overflow-hidden drop-shadow-2xl`}>
|
<div className={`${getHeroHeight()} ${isTabView ? 'mx-0' : 'm-14'} relative flex justify-center items-center overflow-hidden drop-shadow-2xl`}>
|
||||||
<Image
|
<Image
|
||||||
src={HeroImage}
|
src={HeroImage}
|
||||||
alt="Banner"
|
alt="Banner"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user