Skip to content

Commit 2efbf07

Browse files
committed
first commit
1 parent f473c40 commit 2efbf07

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3173
-161
lines changed

package-lock.json

+901-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+11-4
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,26 @@
99
"lint": "next lint"
1010
},
1111
"dependencies": {
12+
"@coffeeandfun/google-profanity-words": "^2.1.0",
13+
"@types/uuid": "^9.0.8",
14+
"firebase": "^10.10.0",
15+
"next": "14.1.4",
1216
"react": "^18",
1317
"react-dom": "^18",
14-
"next": "14.1.4"
18+
"react-firebase-hooks": "^5.1.1",
19+
"react-hot-toast": "^2.4.1",
20+
"react-icons": "^5.0.1",
21+
"uuid": "^9.0.1"
1522
},
1623
"devDependencies": {
17-
"typescript": "^5",
1824
"@types/node": "^20",
1925
"@types/react": "^18",
2026
"@types/react-dom": "^18",
2127
"autoprefixer": "^10.0.1",
28+
"eslint": "^8",
29+
"eslint-config-next": "14.1.4",
2230
"postcss": "^8",
2331
"tailwindcss": "^3.3.0",
24-
"eslint": "^8",
25-
"eslint-config-next": "14.1.4"
32+
"typescript": "^5"
2633
}
2734
}

public/Images/INIT3.png

334 KB
Loading

public/Images/NDC.png

11.8 KB
Loading

public/Images/abt.jpg

242 KB
Loading

public/Images/abt_bg.png

63.1 KB
Loading

public/Images/bg.png

967 KB
Loading

public/Images/cBot.png

56.9 KB
Loading

public/Images/imgP.png

22.5 KB
Loading

public/Images/nditc.png

55.3 KB
Loading

public/Images/nditcT.png

47.1 KB
Loading

public/Images/schedule.svg

+66
Loading

public/Images/setters/Adnan-Toky.jpg

51.6 KB
Loading
13.4 KB
Loading
Loading
102 KB
Loading

public/Images/setters/placeholder.jpg

33.8 KB
Loading

src/Components/CommonPage.tsx

+150
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
'use client';
2+
import React, { useEffect, useRef, useState } from 'react';
3+
4+
interface Section {
5+
heading: string;
6+
content: React.ReactNode;
7+
subSections?: Section[];
8+
}
9+
10+
interface CommonPageProps {
11+
heading: string;
12+
sections: Section[];
13+
icon: React.ReactNode;
14+
hasTableOfContent?: boolean;
15+
}
16+
17+
const Sections = ({ sections, subNumber }: { sections: Section[]; subNumber?: string }) => {
18+
const subNum = subNumber ? subNumber : '';
19+
return (
20+
<>
21+
{sections.map(({ heading, content, subSections }, index) => {
22+
return (
23+
<>
24+
<div className="section" id={subNum + index.toString()} key={index}>
25+
<h2
26+
className={
27+
(subNum ? 'text-xl font-Nunito font-bold ' : 'text-4xl ') +
28+
(index !== 0 && !subNum ? 'mt-12 ' : '') +
29+
(subNum ? 'mt-4 ' : '')
30+
}
31+
>
32+
{heading}
33+
</h2>
34+
<div className="text-justify">{content}</div>
35+
</div>
36+
{subSections?.length ? (
37+
<Sections sections={subSections} subNumber={subNum + index.toString()} />
38+
) : null}
39+
</>
40+
);
41+
})}
42+
</>
43+
);
44+
};
45+
46+
const TOCList = ({
47+
sections,
48+
subNumber,
49+
scrollPos,
50+
}: {
51+
sections: Section[];
52+
subNumber?: string;
53+
scrollPos?: number;
54+
}) => {
55+
const subNum = subNumber ? subNumber : '';
56+
const ref = useRef<HTMLUListElement | null>(null);
57+
useEffect(() => {
58+
// ref.current?.scrollTo({
59+
// top: (ref.current?.scrollHeight - ref?.current.clientHeight || 0) * (scrollPos || 0),
60+
// });
61+
}, [scrollPos]);
62+
return (
63+
<ul
64+
ref={ref}
65+
style={{
66+
overscrollBehavior: 'contain',
67+
height: subNum ? 'auto' : 'calc(65vh - 36px - 5rem)',
68+
}}
69+
className={
70+
'flex flex-col gap-2 mt-2 ' +
71+
(subNum
72+
? ' overflow-visible border-l scroll '
73+
: ' overflow-y-auto overflow-x-visible pl-2 pb-5 ')
74+
}
75+
>
76+
{sections.map(({ heading, content, subSections }, index) => {
77+
return (
78+
<li key={index} className={'list-disc cursor-pointer ml-[0.9rem] '}>
79+
<a href={'#' + subNum + index}>
80+
<p
81+
className={'text-base hover:underline' + (subNum ? ' font-light' : ' font-medium')}
82+
>
83+
{heading}
84+
</p>
85+
</a>
86+
{subSections?.length ? (
87+
<TOCList sections={subSections} subNumber={subNum + index.toString()} />
88+
) : null}
89+
</li>
90+
);
91+
})}
92+
</ul>
93+
);
94+
};
95+
const CommonPage = ({ heading, icon, sections, hasTableOfContent }: CommonPageProps) => {
96+
const headingArray = heading.split(' ');
97+
const firstWord = headingArray.splice(0, 1) + ' ';
98+
const restWord = headingArray.join(' ');
99+
const [scrollPos, setScrollPos] = useState<number>(0);
100+
useEffect(() => {
101+
const handler = () => {
102+
setScrollPos(
103+
document.documentElement.scrollTop /
104+
(document.documentElement.scrollHeight - window.innerHeight)
105+
);
106+
};
107+
document.addEventListener('scroll', handler);
108+
109+
return () => {
110+
document.removeEventListener('scroll', handler);
111+
};
112+
}, []);
113+
return (
114+
<div className="mt-[81px] bg-[#F6F6F6]">
115+
<div
116+
style={{
117+
transform: `scaleX(${scrollPos})`,
118+
transformOrigin: 'left',
119+
}}
120+
className="fixed top-[80px] left-0 h-1 z-30 bg-primary transition ease-linear w-screen "
121+
></div>
122+
<div className="container pt-5 pb-16">
123+
<div className={'flex gap-5 items-center sm:justify-start'}>
124+
<span className="p-5 shadow-2xl rounded-full bg-white ">{icon}</span>
125+
<h1 className="text-6xl">
126+
<span className="text-primary ">{firstWord}</span>
127+
<span>{restWord}</span>
128+
</h1>
129+
</div>
130+
<div className="flex flex-col md:flex-row gap-12 pt-8">
131+
{hasTableOfContent ? (
132+
<div className="bg-white shadow-2xl rounded-xl p-8 basis-[310px] md:sticky top-[96px] h-[65vh]">
133+
<h2 className="text-3xl">
134+
<span className="text-primary">Table</span> of contents
135+
</h2>
136+
<div className="mt-4">
137+
<TOCList sections={sections} scrollPos={scrollPos} />
138+
</div>
139+
</div>
140+
) : null}
141+
<div className={'flex-1' + (!hasTableOfContent ? ' md:mr-0 cont' : '')}>
142+
<Sections sections={sections} />{' '}
143+
</div>
144+
</div>
145+
</div>
146+
</div>
147+
);
148+
};
149+
150+
export default CommonPage;

src/Components/CurrentYear.tsx

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
'use client';
2+
3+
const CurrentYear = () => {
4+
let currentDate = new Date();
5+
let currentYear = currentDate.getFullYear();
6+
7+
return (
8+
<span className="md:text-xs text-zinc-700 text-xs sm:text-center mt-7 dark:text-zinc-400 absolute bottom-3 left-3">
9+
© {currentYear}{' '}
10+
<a href="/" className="hover:underline">
11+
NDITC™
12+
</a>
13+
. All Rights Reserved.
14+
</span>
15+
);
16+
};
17+
18+
export default CurrentYear;

src/Components/Field.tsx

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import React, { HTMLInputTypeAttribute } from 'react';
2+
import { regDataInit, regDataType } from '@/db/registerData';
3+
4+
type props = {
5+
name: string;
6+
label: string;
7+
type: HTMLInputTypeAttribute;
8+
state: string | number;
9+
setValue: (name: string, data: string | number) => void;
10+
notRequired?: boolean;
11+
};
12+
13+
const Field = ({ name, label, type, state, setValue, notRequired }: props) => {
14+
return (
15+
<div className="flex flex-col gap-1">
16+
<label className="text-gray-500 ml-2 font-medium" htmlFor={name}>
17+
{label}
18+
{notRequired ? ' (Optional)' : ''}:
19+
</label>
20+
<input
21+
className="px-5 py-3 border-gray-200 rounded-xl border focus:border-primary focus:outline-none"
22+
onChange={(e) => setValue(name, e.target.value)}
23+
value={state}
24+
type={type}
25+
name={name}
26+
required={!notRequired}
27+
placeholder={label}
28+
/>
29+
</div>
30+
);
31+
};
32+
33+
export default Field;

src/Components/File.tsx

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from 'react';
2+
3+
const File = () => {
4+
return (
5+
<div>
6+
<input type={'file'} />
7+
</div>
8+
);
9+
};
10+
11+
export default File;

src/Components/Home/About.tsx

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
import React from 'react';
2+
import Image from 'next/image';
3+
4+
const About = () => {
5+
return (
6+
<section className="w-screen bg-no-repeat bg-cover bg-bottom relative my-auto" id="about">
7+
<section className="w-screen bg-image bg-no-repeat bg-cover bg-bottom relative my-auto">
8+
{' '}
9+
<section className="flex flex-col container items-center my-auto">
10+
<div className="flex flex-col-reverse md:flex-row gap-8 text-[#ffffffbe] text-base 2xl:text-lg Nunito pt-12 pb-8 items-center">
11+
<div className="flex-1 pb-5">
12+
<h1 className="text-[2.55rem] pt-5 md:text-5xl mb-5 text-white">
13+
ABOUT <span className="text-secondary">FTMPC 4.0</span>
14+
</h1>
15+
<p className="flex-1">
16+
NDITC INIT 4.0 is set to blow your mind with a lineup of thrilling events designed
17+
to challenge and inspire. Whether you&apos;re into the high-energy action of Robo
18+
Wars or the brain-teasing puzzles of Programming Contests, there&apos;s something
19+
here for every tech enthusiast. And if sports are more your style, we&apos;ve got
20+
unique twists like Spot N Go and Soccer Wheels to get your heart pumping and your
21+
competitive spirit soaring. But wait, there&apos;s more! We&apos;ve pulled out all
22+
the stops to make NDITC INIT 4.0 an unforgettable experience. Get ready for amazing
23+
prizes that&apos;ll leave you speechless and bragging rights that&apos;ll make your
24+
friends jealous. So, mark May 2–May 4, 2023, on your calendars, as NDITC INIT 4.0 is
25+
set to deliver to you one of the county&apos;s top college-level technology-based
26+
festivals, and it&apos;s going to be epic.
27+
</p>
28+
</div>
29+
<div className="w-full flex-1 md:w-1/2 rounded-xl h-full shadow">
30+
<Image
31+
width={750}
32+
height={750}
33+
className="w-full object-cover md:min-h-[410px] max-h-[50vh] rounded-xl h-full"
34+
src="/Images/abt.jpg"
35+
alt=""
36+
></Image>
37+
</div>
38+
</div>
39+
<div className="flex flex-col md:flex-row gap-8 text-[#ffffffbe] text-base 2xl:text-lg Nunito pb-12 pt-8 items-center">
40+
<div className="w-full flex-1 md:w-1/2 rounded-xl h-full shadow">
41+
<Image
42+
width={750}
43+
height={750}
44+
className="w-full object-cover md:min-h-[410px] max-h-[50vh] rounded-xl h-full"
45+
src="/Images/abt.jpg"
46+
alt=""
47+
></Image>
48+
</div>
49+
<div className="flex-1 pb-5">
50+
<h1 className="text-[2.55rem] pt-5 md:text-5xl mb-5 text-white">
51+
ABOUT <span className="text-secondary">FTMPC 4.0</span>
52+
</h1>
53+
<p className="flex-1">
54+
NDITC INIT 4.0 is set to blow your mind with a lineup of thrilling events designed
55+
to challenge and inspire. Whether you&apos;re into the high-energy action of Robo
56+
Wars or the brain-teasing puzzles of Programming Contests, there&apos;s something
57+
here for every tech enthusiast. And if sports are more your style, we&apos;ve got
58+
unique twists like Spot N Go and Soccer Wheels to get your heart pumping and your
59+
competitive spirit soaring. But wait, there&apos;s more! We&apos;ve pulled out all
60+
the stops to make NDITC INIT 4.0 an unforgettable experience. Get ready for amazing
61+
prizes that&apos;ll leave you speechless and bragging rights that&apos;ll make your
62+
friends jealous. So, mark May 2–May 4, 2023, on your calendars, as NDITC INIT 4.0 is
63+
set to deliver to you one of the county&apos;s top college-level technology-based
64+
festivals, and it&apos;s going to be epic.
65+
</p>
66+
</div>
67+
</div>
68+
</section>
69+
</section>
70+
</section>
71+
);
72+
};
73+
74+
export default About;

src/Components/Home/Hero.tsx

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import React from 'react';
2+
import Image from 'next/image';
3+
4+
const Hero = () => {
5+
return (
6+
<section className="relative w-full min-h-screen mb-8 flex flex-col md:flex-row justify-center md:justify-between items-center pt-[90px] over">
7+
<h1 className="md:hidden tracking-wide lg:tracking-widest text-2xl 2xl:text-3xl w-fit font-medium text-center md:text-left">
8+
Welcome to
9+
</h1>
10+
<div className=" flex flex-col md:max-w-[40vw] lg:max-w-[35vw] items-center md:items-start md:gap-1 order-2 md:order-1">
11+
<h1 className="md:block hidden tracking-wide lg:tracking-widest text-2xl 2xl:text-3xl w-fit font-medium text-center md:text-left">
12+
Welcome to
13+
</h1>
14+
<h1 className="md:block hidden tracking-wide lg:tracking-widest text-5xl 2xl:text-7xl font-medium text-center md:text-left text-black">
15+
<span className="text-primary">FTMPC</span> 4.0
16+
</h1>
17+
<Image
18+
width={450}
19+
height={100}
20+
src={'/Images/schedule.svg'}
21+
alt={'Image'}
22+
className="relative w-full max-w-[95%] md:max-w-[450px] mt-3 mb-2"
23+
/>
24+
<p className="mt-3 text-base 2xl:text-[1.375rem] 2xl:leading-8 break-words w-[85vw] md:w-fit text-center md:text-left Nunito">
25+
Get ready to shake off the ordinary and dive into an exciting new world with INIT 4.0!
26+
Brought to you by the Notre Dame Information Technology Club.
27+
</p>
28+
29+
<a
30+
href="/about"
31+
className="hover:border-secondary_light before:ease relative flex items-center justify-center overflow-hidden shadow-2xl transition-all before:absolute before:top-1/2 before:h-0 before:w-64 before:origin-center before:-translate-x-20 before:rotate-45 before:bg-secondary_light before:duration-300 hover:shadow-secondary_light hover:text-primary_dark hover:before:h-64 hover:before:-translate-y-32 Bebas text-xl mt-5 py-2 font-Bebas px-7 me-2 mb-2 font-medium text-whiterounded-lg border focus:z-10 focus:ring-4 focus:ring-primary bg-primary text-white border-primary hover:bg-zinc-700 rounded-lg"
32+
>
33+
<span className="relative z-10">REGISTER NOW</span>
34+
</a>
35+
</div>
36+
<Image
37+
src={'/Images/bg.png'}
38+
alt={'Image'}
39+
className="relative w-[80%] xsm:w-[65%] mb-4 md:mb-0 md:w-[45%] max-w-[500px] md:max-h-[70vh] object-contain order-1 md:order-2"
40+
width={850}
41+
height={850}
42+
/>
43+
{/* <img src="/Images/bg.png" className="absolute bottom-[-4vh] right-0 -z-10" alt="" /> */}
44+
</section>
45+
);
46+
};
47+
48+
export default Hero;

0 commit comments

Comments
 (0)