Skip to content

Commit

Permalink
Merge pull request #18 from capy-on-caffeine/hero
Browse files Browse the repository at this point in the history
Hero section created
  • Loading branch information
parteekcoder authored Jan 17, 2024
2 parents 257f5e2 + d6026e7 commit 3804cd2
Show file tree
Hide file tree
Showing 10 changed files with 331 additions and 0 deletions.
45 changes: 45 additions & 0 deletions public/images/HeroSection.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions public/images/HeroText.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions public/images/LinkArrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
94 changes: 94 additions & 0 deletions public/images/RegisterButton.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
94 changes: 94 additions & 0 deletions public/images/RegisterButtonHover.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/minecraft.ttf
Binary file not shown.
51 changes: 51 additions & 0 deletions src/components/Hero/HeroSection.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import React, {useState} from "react";
import heroText from "../../../public/images/HeroText.svg";
import linkArrow from "../../../public/images/LinkArrow.svg";
import regButton from "../../../public/images/RegisterButton.svg";
import regButtonHover from "../../../public/images/RegisterButtonHover.svg";

function HeroSection() {
const [isHovered, setIsHovered] = useState(false);

return (
<div
className="relative w-full h-[1972px] bg-cover overflow-y-auto"
style={{ backgroundImage: "url('/images/HeroSection.svg')" }}
>
<div className="flex flex-col justify-center items-center relative top-[6rem]">
<div className="flex relative py-8">
<img
src={heroText.src}
alt="#"
style={{ mixBlendMode: "hard-light" }}
className="w-[22rem] sm:w-[40rem] lg:w-[60rem]"
/>
</div>
<div className="font-Minecraft text-2xl sm:text-4xl lg:text-6xl font-normal flex relative py-8 flex-col justify-center items-center">
<div className="flex relative">THINK OUTSIDE THE BOX</div>
<div className="flex relative">HACK INSIDE IT</div>
</div>
<div className="flex relative flex-col justify-center items-center">
<div className="flex relative text-2xl font-bold font-Space-Grotesk">
Dig deeper
</div>
<div className="flex relative pb-6">
<img src={linkArrow.src} alt="#" />
</div>
<div className="flex relative"
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
>
{isHovered ? (
<img src={regButtonHover.src} alt="#" />
) : (
<img src={regButton.src} alt="#" />
)}
</div>
</div>
</div>
</div>
);
}

export default HeroSection;
2 changes: 2 additions & 0 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import FAQ from "../components/FAQ/FAQ";
import PrizeSection from "../components/PrizeSection";
import Track from "../components/track";
import Footer from "../components/Footer";
import HeroSection from "../components/Hero/HeroSection";



Expand Down Expand Up @@ -43,6 +44,7 @@ export default function Home() {
</div>

<NavBar/>
<HeroSection />
<PrizeSection />
<Testimonies />
<Rules />
Expand Down
5 changes: 5 additions & 0 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
/* // tailwind.css or your custom CSS file */
@import url('https://fonts.googleapis.com/css2?family=Caveat&family=VT323&display=swap');

@font-face {
font-family: "Minecraft";
src: url("../../public/minecraft.ttf");
}



html,
Expand Down
2 changes: 2 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ module.exports = {
"Space-Grotesk": ["Space Grotesk", "sans-serif"],
"Plus-Jakarta": ["Plus Jakarta Sans", "sans-serif"],
"Red-Hat-Display": ["Red Hat Display", "sans-serif"],
"Minecrafter": ["Minecrafter", "sans-serif"],
"Minecraft": ["Minecraft", "Minecrafter", "sans-serif"],
},
boxShadow: {
"2xl": "3px 3px black",
Expand Down

0 comments on commit 3804cd2

Please sign in to comment.