diff --git a/.vscode/settings.json b/.vscode/settings.json index 223187e..cf53b08 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,5 +18,6 @@ }, "[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" - } + }, + "cSpell.words": ["USWDS"] } diff --git a/public/images/homepage-hero-bg.jpeg b/public/images/homepage-hero-bg.jpeg new file mode 100644 index 0000000..89d1a7c Binary files /dev/null and b/public/images/homepage-hero-bg.jpeg differ diff --git a/src/app/components/Header/Header.module.scss b/src/app/components/Header/Header.module.scss index 4aed8ce..1e6379e 100644 --- a/src/app/components/Header/Header.module.scss +++ b/src/app/components/Header/Header.module.scss @@ -9,3 +9,42 @@ font-size: 13px; } } + +.homepage-hero { + position: relative; + overflow: hidden; + + &::before { + content: ''; + position: absolute; + top: -20%; + left: -10%; + right: -10%; + bottom: 0; + background: linear-gradient( + 90deg, + rgba(76, 43, 100, 0.85) 12%, + rgba(0, 94, 162, 0.85) 50%, + rgba(0, 129, 161, 0.85) 98% + ), + url('/images/homepage-hero-bg.jpeg'); + background-size: cover; + background-position: center 40%; + transform: scale(1.2); + z-index: 0; + } + + .usa-nav-container, + .usa-header, + .usa-logo, + .usa-navbar { + position: relative; + z-index: 1; + } + section h1, + section p { + position: relative; + z-index: 1; + color: white !important; + } +} diff --git a/src/app/components/Header/Header.tsx b/src/app/components/Header/Header.tsx index c1b816c..a27e306 100644 --- a/src/app/components/Header/Header.tsx +++ b/src/app/components/Header/Header.tsx @@ -6,8 +6,33 @@ import classNames from 'classnames'; import { basePath } from '../../utils/constants'; import { NavigationLink } from '../NavigationLink/NavigationLink'; import styles from './Header.module.scss'; +import Hero from '../Hero/Hero'; +import { usePathname } from 'next/navigation'; export default function Header() { + interface HeroContent { + heroClass?: string; + heroHeader: string; + heroSubheader: string; + } + + type SpecialContent = { + [key: string]: HeroContent; + }; + + const specialContent: SpecialContent = { + '/': { + heroClass: 'homepage-hero', + heroHeader: `Improve the way your jurisdiction collects, processes, and + views public health data`, + heroSubheader: `Turn your jurisdiction's data into meaningful intelligence that drives + timely public health action using CDC's free, cloud-based products built + from Data Integration Building Blocks, or DIBBs.`, + }, + }; + const pathname = usePathname(); + const customContent = specialContent[pathname]; + const [expanded, setExpanded] = React.useState(false); const onClick = () => { if (window.innerWidth < 1024) setExpanded((prvExpanded) => !prvExpanded); @@ -26,7 +51,11 @@ export default function Header() { ]; return ( - <> +