Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 64 additions & 21 deletions frontend/src/app/sections/home/Hero.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
"use client";
import DiscordHero from "@/app/assets/icons/DiscordHero";
import Devfolio from "@/app/assets/icons/Devfolio";
import styles from "./styles.module.css";
import DeerHack26Logo from "@/app/assets/icons/Deerhack26";
import { cabinetBold, cabinetExtraBold, cabinetMedium, satoshiBlack, satoshiBold } from "@/fonts";
import {
cabinetBold,
cabinetMedium,
satoshiBold,
} from "@/fonts";
import Link from "next/link";
// import { useState, useEffect } from "react";
import { useEffect, useState, useCallback } from "react";
import Flicker from "@/app/components/Flicker/flicker";
import { useState, useCallback } from "react";


const Hero = () => {
const [isGlowing, setIsGlowing] = useState(true);
Expand All @@ -17,6 +18,26 @@ const Hero = () => {
setIsGlowing(allGlowing);
}, []);

// Devfolio SDK integration
useEffect(() => {
const script = document.createElement("script");
script.src = "https://apply.devfolio.co/v2/sdk.js";
script.async = true;
script.defer = true;

script.onload = () => {
if ((window as any).Devfolio) {
(window as any).Devfolio.reload();
}
};

document.body.appendChild(script);

return () => {
document.body.removeChild(script);
};
}, []);

return (
<div
className={`${styles.hero_background_container} flex justify-center items-center w-full min-h-screen`}
Expand All @@ -34,32 +55,39 @@ const Hero = () => {
>
<Flicker onGlowChange={handleGlowChange} />

<p className={`text-2xl md:text-4xl lg:text-3xl font-bold text-center text-heropage-gradient ${cabinetBold.className}`}>
<p
className={`text-2xl md:text-4xl lg:text-3xl font-bold text-center text-heropage-gradient ${cabinetBold.className}`}
>
12th - 14th June
</p>

<DeerHack26Logo className="mt-3 h-auto w-full md:mt-6" width={309} height={130} />
<DeerHack26Logo
className="mt-3 h-auto w-full md:mt-6"
width={309}
height={130}
/>

<div className="flex flex-col justify-center items-center gap-4 md:gap-6 mx-auto mt-7 w-full">
<Link
href="https://deerhack26.devfolio.co/"
className="w-full flex justify-center items-center"
target="_blank"
>
<div className="opacity-100 hover:opacity-90 transition-bg duration-150 flex h-[48px] md:h-[48px] lg:w-[85%] w-[100%] justify-center items-center py-5 md:py-8 hover:scale-105 transition-transform bg-[#3670FF] rounded-lg">
<Devfolio className="w-6 h-6 lg:w-[30px] lg:h-[30px] shrink-0" />
<p className={`text-white ${cabinetMedium.className} text-sm md:text-2xl ml-2`}>
Apply with Devfolio
</p>
</div>
</Link>

{/* Devfolio Apply Button */}
<div
className="apply-button flex justify-center"
data-hackathon-slug="deerhack26"
data-button-theme="dark"
style={{ height: "44px", width: "100%" }}
></div>

{/* Discord Button */}
<Link
href="https://discord.com/invite/56PAU7sBgZ"
className="inline-block"
target="_blank"
>
<div className="flex flex-row w-[175px] h-[47px] md:w-[280px] md:h-[64px] lg:w-[238.30857849121094px] justify-center items-center gap-2 px-4 lg:px-6 py-3 border-[1px] border-magnolia bg-[#6633CCD9] transition-all duration-150 rounded-xl hover:bg-[#2F1B5FE6] text-white ">
<div className="flex flex-row w-[175px] h-[47px] md:w-[280px] md:h-[64px] lg:w-[238px] justify-center items-center gap-2 px-4 lg:px-6 py-3 border-[1px] border-magnolia bg-[#6633CCD9] transition-all duration-150 rounded-xl hover:bg-[#2F1B5FE6] text-white">
<DiscordHero className="w-6 h-6 lg:w-[30px] lg:h-[30px]" />
<p className={`text-white ${satoshiBold.className} text-xs md:text-xl lg:text-[17px]`}>
<p
className={`text-white ${satoshiBold.className} text-xs md:text-xl lg:text-[17px]`}
>
Join Our Discord
</p>
</div>
Expand All @@ -69,4 +97,19 @@ const Hero = () => {
</div>
);
};

export default Hero;


// <Link
// href="https://deerhack26.devfolio.co/"
// className="w-full flex justify-center items-center"
// target="_blank"
// >
// <div className="opacity-100 hover:opacity-90 transition-bg duration-150 flex h-[48px] md:h-[48px] lg:w-[85%] w-[100%] justify-center items-center py-5 md:py-8 hover:scale-105 transition-transform bg-[#3670FF] rounded-lg">
// <Devfolio className="w-6 h-6 lg:w-[30px] lg:h-[30px] shrink-0" />
// <p className={`text-white ${cabinetMedium.className} text-sm md:text-2xl ml-2`}>
// Apply with Devfolio
// </p>
// </div>
// </Link>
Loading