diff --git a/src/features/TitleHero/TitleHero.css b/src/features/TitleHero/TitleHero.css new file mode 100644 index 0000000..b98fb28 --- /dev/null +++ b/src/features/TitleHero/TitleHero.css @@ -0,0 +1,75 @@ +.hero-container { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.hero-bigtext { + /* position: relative; */ + display: flex; + flex-direction: column; + justify-content: flex-end; + flex-basis: auto +} + +.hero-background { + z-index: -10; + color: transparent; + -webkit-text-stroke: 1px #767676; + font-weight: 900; + font-size: 9rem; + white-space: nowrap; + line-height: 1; + margin-bottom: -100px; + /* padding-bottom: 5rem; */ + -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%); + mask-image: linear-gradient(to bottom, black 50%, transparent 100%); +} + +@media (min-width: 768px) { + .hero-background { + font-size: 16rem; /* md:text-[256px] */ + } +} + +@media (min-width: 768px) { + .hero-content { + align-items: center; + gap: 1.25rem; + } +} + +.hero-title { + z-index: 1; + font-weight: 900; + font-size: 3rem; /* text-5xl */ + line-height: 1; + white-space: nowrap; + text-align: center; + /* position: absolute; + bottom: 5.5rem; */ +} + +@media (min-width: 768px) { + .hero-title { + font-size: 4.5rem; /* md:text-7xl */ + } +} + +@media (min-width: 1024px) { + .hero-title { + font-size: 6rem; /* lg:text-[96px] */ + } +} + +.hero-description { + max-width: 40%; + margin-top: 2rem; +} + +@media (max-width: 767px) { + .hero-description { + max-width: 100%; + } +} \ No newline at end of file diff --git a/src/features/TitleHero/TitleHero.tsx b/src/features/TitleHero/TitleHero.tsx index 42f65dd..ba07847 100644 --- a/src/features/TitleHero/TitleHero.tsx +++ b/src/features/TitleHero/TitleHero.tsx @@ -1,5 +1,6 @@ import { useEffect, useRef } from "react"; import { motion } from "framer-motion"; +import "./TitleHero.css"; interface PageHeader { pageTitle: string; @@ -10,44 +11,39 @@ const TitleHero = ({ pageTitle, pageDescription }: PageHeader) => { const ref = useRef(null); return ( -
- {/* Background */} -
+
+
+ {/* Background Text */} + viewport={{ once: true }} + > {pageTitle} + + {/* Foreground Content */} + +

{pageTitle}

+
- {/* Foreground */} -
-
- -

{pageTitle}

-
- -

{pageDescription}

-
-
-
+ + +

{pageDescription}

+
); }; diff --git a/src/layouts/Layout.tsx b/src/layouts/Layout.tsx index 38d24e9..19a6544 100644 --- a/src/layouts/Layout.tsx +++ b/src/layouts/Layout.tsx @@ -144,10 +144,10 @@ const Layout = () => { return ( <> -
- {isShowNavbar ? ( - - ) : null} + {isShowNavbar ? ( + + ) : null} +
{isShowFooter ?