Skip to content

Commit

Permalink
Resolve merge Conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
kamini08 committed Aug 17, 2024
2 parents c9233d7 + 5355738 commit a3d41c3
Show file tree
Hide file tree
Showing 40 changed files with 980 additions and 299 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,10 @@ jobs:

- name: Build the project
run: npm run build
env:
NEXT_PUBLIC_FIREBASE_API_KEY: ${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }}
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: ${{ secrets.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN }}
NEXT_PUBLIC_FIREBASE_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_PROJECT_ID }}
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: ${{ secrets.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET }}
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID }}
NEXT_PUBLIC_FIREBASE_APP_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

# env
.env
.env.local
28 changes: 21 additions & 7 deletions app/(default)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,49 @@ export const metadata = {
import Hero from "@/components/hero";
import Domains from "@/components/domains";
import "../css/additional-styles/landing.css";
import Landing from "@/components/landing";
import Activities from "@/components/activities";
import Image from "next/image";
import Link from "next/link";
import SparklesText from "@/components/magicui/sparkles-text";
import EventComponent from "@/components/eventcards";
import Leads from "@/components/leads";
import Achievements from '@/components/achievements';
import Founder from "@/components/founder";


export default function Home() {
return (
<>
<Hero />
<div className="flex flex-col justify-center items-center py-10 px-5 mb-20">
<div className="text-4xl font-bold text-center text-gray-200 mb-4">
Upcoming Events
</div>
<SparklesText text="Upcoming Events" className="text-4xl font-bold text-center text-gray-200 mb-4" />
<Link href="/sihregistration">
<Image
src={"/images/sih.png"}
alt="sih"
height={400}
width={1100}
className="rounded-3xl border-2 border-slate-500"
className="rounded-3xl mt-20"
/>
</Link>
<Link href="/sihregistration">
<button className="btn-sm text-xl text-black bg-green-500 mx-3 rounded-xl mt-10">
<button className="btn-sm px-5 py-3 text-xl font-bold text-white bg-green-600 mx-3 rounded-xl mt-10">
Register for SIH
</button>
</Link>
{/* Add a download button */}
<a href="/Shortlisted.pdf" download>
<button className="btn-sm px-5 py-3 text-xl font-bold text-white bg-green-600 mx-3 rounded-xl mt-10">
Download Shortlisted Problem Statements
</button>
</a>
</div>
<Domains />
<Landing />
<Activities />
<Founder />
<Achievements/>
<EventComponent />
<Leads />
</>
);
}
10 changes: 4 additions & 6 deletions app/(default)/sihregistration/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,18 @@ import { cn } from "@/lib/utils";
const RegisterPage = () => {
return (
<FormProvider>
<div className="w-50 mt-16 mx-auto flex flex-col items-center justify-center">
<div className="mt-16 mx-auto flex flex-col items-center justify-center">
<div className="container">
<div className="box">
<div className="title">
<div className="title items-center justify-center mt-8">
<span className="block"></span>
<h1 className="h1">
Register for Smart India Hackathon!<span></span>
Register for Smart India Hackathon!
</h1>
</div>
</div>
</div>

<div className="form-container my-2">
<SIHRegistrationForm />
<SIHRegistrationForm data-aos="zoom-y-out" data-aos-delay="350" />
</div>
<DotPattern
width={20}
Expand Down
20 changes: 3 additions & 17 deletions app/css/additional-styles/form.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
background: transparent;
}

.h1,
.h2 {
font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
}
.form-container select {
background-color: black;
}
Expand All @@ -29,31 +25,21 @@
justify-content: center;
align-items: center;
}
.container .box {
margin-top: 3rem;
text-align: center;
position: relative;
display: flex;
justify-content: center;
flex-direction: column;
}
.container .box .title {
.container .title {
width: 100%;
position: relative;
display: flex;
align-items: center;
height: 50px;
}
.container .box .title .block {
width: 0%;
.container .title .block {
height: inherit;
background: #52c264;
position: absolute;
animation: mainBlock 2s cubic-bezier(0.74, 0.06, 0.4, 0.92) forwards;
display: flex;
}
.container .box .title h1 {
font-family: "Poppins";
.container .title h1 {
color: #fff;
-webkit-animation: mainFadeIn 2s forwards;
-o-animation: mainFadeIn 2s forwards;
Expand Down
3 changes: 2 additions & 1 deletion app/css/additional-styles/landing.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.div-class {
background-image: url("../../../public/images/pbimage3.jpeg");
background-image: url("../../../public/images/google_logo.png");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
Expand All @@ -8,6 +8,7 @@
}
};


h1{
width: 100%;
height: 100vh;
Expand Down
Binary file removed app/favicon.ico
Binary file not shown.
70 changes: 41 additions & 29 deletions components/Members.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Card from '@/components/ui/Card';
import CollapsibleSection from '@/components/ui/CollapsibleSection';
import { db } from "@/Firebase";
import { collection, query, where, getDocs } from "firebase/firestore";
import ClipLoader from "react-spinners/ClipLoader";

interface Member {
id: string;
Expand All @@ -17,16 +18,17 @@ interface Member {
const headings = ["Alumni", "Fourth Year", "Third Year", "Second Year", "First Year"];

export default function Members() {
// Set default open index to the index of "Alumni"
const [openIndex, setOpenIndex] = useState<number>(headings.indexOf("Alumni"));
const [data, setData] = useState<{ [key: string]: Member[] }>({});
const [loading, setLoading] = useState<boolean>(true);

const handleToggle = (index: number) => {
setOpenIndex(openIndex === index ? -1 : index);
};

useEffect(() => {
const fetchData = async () => {
setLoading(true);
try {
const fetchedData: { [key: string]: Member[] } = {};

Expand All @@ -35,13 +37,11 @@ export default function Members() {
const q = query(membersCollection, where("year", "==", heading));
const querySnapshot = await getDocs(q);

// Collect all documents
const allMembers = querySnapshot.docs.map(doc => ({
id: doc.id,
...(doc.data() as Omit<Member, 'id'>)
})) as Member[];

// Remove duplicates based on name, domain, and year
const uniqueMembers = Array.from(
new Map(
allMembers.map(member => [
Expand All @@ -51,7 +51,6 @@ export default function Members() {
).values()
);

// Sort members alphabetically by name
const sortedMembers = uniqueMembers.sort((a, b) => a.name.localeCompare(b.name));

fetchedData[heading] = sortedMembers;
Expand All @@ -60,39 +59,52 @@ export default function Members() {
setData(fetchedData);
} catch (error) {
console.error("Error fetching data: ", error);
} finally {
setLoading(false);
}
};
fetchData();
}, []);

return (
<div className="flex flex-col justify-center items-center w-full space-y-4 mt-20 pb-8 bg-black">
<h1 className="text-center font-bold text-4xl text-white"></h1>
<div className="flex flex-col justify-center items-center w-full space-y-4 mt-24 bg-black">
<h1 className="text-center font-bold text-4xl text-white">PB Members</h1>
<div className="w-full max-w-6xl px-2 ">
<div className="space-y-2">
{headings.map((heading, index) => (
<CollapsibleSection
key={index}
heading={heading}
content={
<div className='flex justify-center'>
<div className="grid grid-cols-1 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-16">
{data[heading]?.map((profile, cardIndex) => (
<Card
key={cardIndex}
name={profile.name}
domain={profile.domain}
company={profile.company || ""}
/>
))}
{loading ? (
<div className="flex justify-center py-10">
<ClipLoader color={"#00C853"} loading={loading} size={50} />
</div>
) : (
<div className="space-y-2">
{headings.map((heading, index) => (
<CollapsibleSection
key={index}
heading={heading}
content={
<div className='flex justify-center'>
{heading === "First Year" && (
<p className="text-white lg:text-2xl text-xl mb-4">
Recruitment incoming soon
</p>
)}
<div className="grid grid-cols-1 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-16">
{data[heading]?.map((profile, cardIndex) => (
<Card
key={cardIndex}
name={profile.name}
domain={profile.domain}
company={profile.company || ""}
/>
))}
</div>
</div>
</div>
}
isOpen={openIndex === index}
onToggle={() => handleToggle(index)}
/>
))}
</div>
}
isOpen={openIndex === index}
onToggle={() => handleToggle(index)}
/>
))}
</div>
)}
</div>
</div>
);
Expand Down
23 changes: 23 additions & 0 deletions components/achievements.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"use client";

import Carousel from "./carousel.component";
import imageOne from "../public/images/pbach1.jpg";
import imageTwo from "../public/images/pbach2.jpg";
import imageThree from "../public/images/pbach3.jpg";

function Achievements() {
let slides = [imageOne, imageTwo, imageThree];

return (
<>
<div className="container place-items-center font-bold pt-20 pb-5">
<h2 className="text-5xl text-white-800 text-center">Achievements</h2>
</div>
<div className="w-[40%] m-auto pt-11">
<Carousel slides={slides} />
</div>
</>
);
}

export default Achievements;
Loading

0 comments on commit a3d41c3

Please sign in to comment.