Skip to content
Closed
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions src/components/HeroParallax.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@


const Hero = () => {
const navigate = useNavigate();

Check failure on line 30 in src/components/HeroParallax.jsx

View workflow job for this annotation

GitHub Actions / Lint Code

'navigate' is assigned a value but never used
// const location = useLocation();
// const [menuOpen, setMenuOpen] = useState(false);

Expand Down Expand Up @@ -382,7 +382,7 @@
<div className="flex flex-col items-center gap-5 mt-1">
<div className="flex flex-col sm:flex-row gap-4">
<button
onClick={() => navigate("/register")}
// onClick={() => navigate("/register")}
className="relative inline-block p-px font-semibold leading-6 text-white-100 bg-tertiary shadow-2xl cursor-pointer shadow-zinc-900
transition-transform duration-300 ease-in-out hover:scale-105 active:scale-95 z-10 group/canvas-card"
>
Expand All @@ -393,10 +393,10 @@
<span className="relative z-10 block px-4 py-2 bg-gray-950 ">
<div className="relative z-10 flex items-center space-x-2">
<span className="transition-all duration-500 group-hover/canvas-card:translate-x-1">
Register Now
Registeration Closed
</span>

<svg
{/* <svg
className="w-6 h-6 transition-transform duration-500 group-hover/canvas-card:translate-x-1"
aria-hidden="true"
fill="currentColor"
Expand All @@ -407,7 +407,7 @@
fillRule="evenodd"
d="M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z"
/>
</svg>
</svg> */}
</div>
</span>
</button>
Expand Down
7 changes: 5 additions & 2 deletions src/components/RegisterHome.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ const RegisterHome = () => {
<section className='py-24 h-full flex flex-col gap-y-8 p-2'>
{Object.keys(eventsData).map((key) => {
const event = eventsData[key]
const isRegistrationOpen = event.registrations?.isRegistrationOpen ?? true
const isRegistrationOpen =
event.registrations?.isRegistrationOpen ??
event.isRegistrationOpen ??
true
return <FormsBanner
key={key}
className={`hover:scale-[1.02] duration-300 ${isRegistrationOpen ? 'cursor-pointer' : 'cursor-not-allowed opacity-80'} max-sm:min-h-[300px] max-sm:flex items-strech`}
Expand All @@ -30,4 +33,4 @@ const RegisterHome = () => {
)
}

export default RegisterHome
export default RegisterHome
132 changes: 87 additions & 45 deletions src/components/sponsors.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { sponsors } from "../constants";
// import { styles } from "../styles";
import { sponsors } from "../constants";
import { cn } from "../lib/utils";
import {
createContext,
Expand All @@ -12,14 +11,22 @@ import {
/* -------------------- SPONSORS SECTION -------------------- */

const Sponsors = () => {
const logoClassMap = {
cloudhedge: "p-1 scale-[1.28]",
fold_health: "p-2 scale-[1.08]",
gfg: "p-2 scale-[1.06]",
josh: "p-3",
agribid: "p-3",
intangles: "p-2",
imocha: "p-3",
eq: "p-3",
zetakode: "p-3",
};

return (
<section className="w-full flex flex-col items-center pt-4 pb-24 relative overflow-hidden">
<section className="w-full flex flex-col items-center pt-4 pb-24 relative overflow-hidden">
{/* <h2 className={`${styles.sectionHeadText} text-center`}>Our Sponsors.</h2> */}
<div className="w-full flex items-center justify-center py-16">
<p className="text-base sm:text-lg font-light text-white/60 tracking-wide">
Sponsors revealing soon.
</p>
</div> <div
<div
className="pointer-events-none absolute inset-0 opacity-[0.22] -z-10"
style={{
backgroundImage: `
Expand All @@ -29,69 +36,104 @@ const Sponsors = () => {
backgroundSize: "46px 46px",
}}
/>
<div className="flex flex-col w-full items-center gap-14 sm:py-16 py-8">
<div className="flex flex-col w-full items-center gap-14 sm:py-16 py-8">
{Object.keys(sponsors).map((key) => {
const heading =
key === "association"
? "In Association With"
: key === "co"
? "Co-sponsors"
: key + (sponsors[key].length > 1 ? " sponsors" : " sponsor");
? "Co-sponsors"
: key + (sponsors[key].length > 1 ? " sponsors" : " sponsor");

return (
<div key={key} className="flex flex-col gap-8 items-center">
<div key={key} className="flex flex-col gap-8 items-center w-full px-4">
<h3 className="text-center text-3xl font-bold capitalize pb-2 border-b-2 border-orange-200">
{heading}
</h3>

<div className="flex flex-wrap items-center justify-center gap-10 max-w-6xl">
{/* {sponsors[key].map((s) => (
<SponsorCard
key={s.name}
width={key === "title" ? 300 : 230}
height={key === "title" ? 200 : 150}
>
<img
loading="lazy"
<div className="flex flex-wrap items-center justify-center gap-10 max-w-6xl w-full">
{sponsors[key].map((s) => (
<SponsorCard key={s.name} width={300} height={120}>
<SponsorLogo
src={s.src}
alt={s.name}
className="w-full h-full object-contain select-none"
className={cn(
"w-full h-full object-contain select-none transition-transform duration-300",
logoClassMap[s.name] ?? "p-3"
)}
/>
</SponsorCard>
))} */}
))}
</div>
</div>
);
})}
</div>

</div>
</section>
);
};

export default Sponsors;

const getDriveFileId = (url) => {
if (!url) return null;
const fromPath = url.match(/\/d\/([a-zA-Z0-9_-]+)/);
if (fromPath?.[1]) return fromPath[1];
const fromQuery = url.match(/[?&]id=([a-zA-Z0-9_-]+)/);
if (fromQuery?.[1]) return fromQuery[1];
return null;
};

const buildDriveCandidates = (src) => {
const fileId = getDriveFileId(src);
if (!fileId) return [src];
return [
`https://drive.google.com/thumbnail?id=${fileId}&sz=w1200`,
`https://drive.google.com/uc?export=view&id=${fileId}`,
`https://drive.google.com/uc?export=download&id=${fileId}`,
];
};

const SponsorLogo = ({ src, alt, className }) => {
const candidates = buildDriveCandidates(src);
const [idx, setIdx] = useState(0);

return (
<img
loading="lazy"
src={candidates[idx]}
alt={alt}
referrerPolicy="no-referrer"
decoding="async"
className={className}
onError={() => {
if (idx < candidates.length - 1) setIdx((prev) => prev + 1);
}}
/>
);
};

/* -------------------- SPONSOR CARD -------------------- */

// const SponsorCard = ({ children, width, height }) => {
// return (
// <CardContainer
// containerClassName="bg-gradient-to-br from-[#173B78] via-[#5F9DF7] to-[#E89A35] rounded-xl"
// >
// <CardBody
// className="relative group/card shadow-xl shadow-orange-200/40 bg-white border border-primary p-4 rounded-xl"
// style={{ width, height }}
// >
// <CardItem
// translateZ={70}
// className="w-full h-full group-hover/card:shadow-2xl group-hover/card:shadow-blue-300/50 rounded-xl"
// >
// {children}
// </CardItem>
// </CardBody>
// </CardContainer>
// );
// };
const SponsorCard = ({ children, width, height }) => {
return (
<CardContainer
containerClassName="bg-gradient-to-br from-[#173B78] via-[#5F9DF7] to-[#E89A35] rounded-xl"
>
<CardBody
className="relative group/card shadow-xl shadow-orange-200/40 bg-white/5 backdrop-blur-sm border border-white/10 p-2 rounded-xl"
style={{ width, height }}
>
<CardItem
translateZ={50}
className="w-full h-full group-hover/card:shadow-2xl group-hover/card:shadow-blue-300/50 rounded-xl flex items-center justify-center"
>
{children}
</CardItem>
</CardBody>
</CardContainer>
);
};

/* -------------------- TILT 3D ENGINE -------------------- */

Expand Down Expand Up @@ -122,7 +164,7 @@ export const CardContainer = ({ children, className, containerClassName }) => {
<MouseEnterContext.Provider value={[isMouseEntered, setIsMouseEntered]}>
<div
className={cn(
"p-[2px] flex items-center justify-center rounded-xl",
"p-0 flex items-center justify-center rounded-xl",
containerClassName
)}
style={{ perspective: "1200px" }}
Expand Down
Loading
Loading