-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
69 changed files
with
605 additions
and
337 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,52 @@ | ||
'use client'; | ||
|
||
import React from 'react'; | ||
import React, { useMemo } from 'react'; | ||
import Image from 'next/image'; | ||
import { Parallax, ParallaxProvider } from 'react-scroll-parallax'; | ||
import classNames from 'classnames'; | ||
import { useTheme } from 'next-themes'; | ||
|
||
export const HomepageBanner = () => ( | ||
<ParallaxProvider> | ||
<div className="relative h-screen overflow-hidden"> | ||
<Parallax speed={-30}> | ||
<div className="h-screen"> | ||
<Image | ||
className="-z-10 object-cover" | ||
src="/img/homepage-bg.jpg" | ||
alt="Homepage banner background" | ||
fill | ||
/> | ||
export const HomepageBanner = () => { | ||
const { resolvedTheme } = useTheme(); | ||
|
||
const src = useMemo(() => { | ||
switch (resolvedTheme) { | ||
case 'light': return '/img/homepage-bg.jpg'; | ||
case 'dark': return '/img/homepage-bg-dark.jpg'; | ||
// Empty image for hydration step | ||
default: return 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='; | ||
} | ||
}, [resolvedTheme]); | ||
|
||
return ( | ||
<ParallaxProvider> | ||
<div className="relative h-screen overflow-hidden"> | ||
<Parallax speed={-50}> | ||
<div className="relative h-screen"> | ||
<Image | ||
className="-z-10 object-cover" | ||
src={src} | ||
alt="Homepage banner background" | ||
fill | ||
/> | ||
</div> | ||
</Parallax> | ||
<div | ||
className={classNames( | ||
'absolute top-0 flex h-screen w-screen flex-col items-center justify-center backdrop-blur-sm', | ||
'mix-blend-overlay dark:mix-blend-normal', | ||
)} | ||
> | ||
<h2 className="mb-5 text-3xl font-medium text-white"> | ||
From longhorns to space ships, we've got it all! | ||
</h2> | ||
<h1 className="text-center text-8xl font-semibold text-white"> | ||
Welcome to | ||
<br /> | ||
Houston | ||
</h1> | ||
</div> | ||
</Parallax> | ||
<div className="absolute top-0 flex h-screen w-screen flex-col items-center justify-center mix-blend-overlay backdrop-blur-sm"> | ||
<h2 className="mb-5 text-3xl font-medium text-white"> | ||
From longhorns to space ships, we've got it all! | ||
</h2> | ||
<h1 className="text-center text-8xl font-semibold text-white"> | ||
Welcome to | ||
<br /> | ||
Houston | ||
</h1> | ||
</div> | ||
</div> | ||
</ParallaxProvider> | ||
); | ||
</ParallaxProvider> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.