diff --git a/overrides/components/home-hero/component.tsx b/overrides/components/home-hero/component.tsx index 950e8947b..ad6023fa4 100644 --- a/overrides/components/home-hero/component.tsx +++ b/overrides/components/home-hero/component.tsx @@ -1,6 +1,6 @@ import React from "$veda-ui/react"; import styled from "$veda-ui/styled-components"; -import { glsp, themeVal } from "$veda-ui/@devseed-ui/theme-provider"; +import { glsp, themeVal, media } from "$veda-ui/@devseed-ui/theme-provider"; import Constrainer from "$veda-ui-scripts/styles/constrainer"; import { VarHeading } from "$veda-ui-scripts/styles/variable-components"; @@ -12,7 +12,10 @@ import { } from "$veda-ui-scripts/components/common/figure"; import Partners from "../../home/partners"; -import coverSrc from "./earth.png"; +import { useMediaQuery } from "$veda-ui-scripts/utils/use-media-query"; + +import coverImgSrc from "./earth.png"; +import coverVideoSrc from "url:./earth-gas.mp4"; const Hero = styled.div` background: ${themeVal("color.primary")}; @@ -40,12 +43,22 @@ const HeroHeadline = styled.div` } `; - const PageHeroCover = styled(Figure)` - height: 20rem; + height: 16rem; width: 100%; - img { + ${media.mediumUp` + margin-top: -4rem; + height: 23rem; + `} + + ${media.largeUp` + height: 28rem; + margin-top: -6rem; + `} + + img, + video { height: 100%; width: 100%; object-fit: cover; @@ -55,6 +68,8 @@ const PageHeroCover = styled(Figure)` `; export default function HomeHero(props) { + const { isMediumUp } = useMediaQuery(); + return ( @@ -70,7 +85,23 @@ export default function HomeHero(props) { - image of northern hemisphere of earth with gas in atmosphere shown in red hues + {isMediumUp ? ( + + ) : ( + Image of northern hemisphere of earth with gas in atmosphere shown in red hues + )}