diff --git a/.gitignore b/.gitignore index cc78e2c..7ed11b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,131 +1,40 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* -.pnpm-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov +# dependencies +/node_modules +/.pnp +.pnp.js +.yarn/install-state.gz -# nyc test coverage -.nyc_output +# testing +/coverage -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt +# next.js +/.next/ +/out/ -# Bower dependency directory (https://bower.io/) -bower_components +# production +/build -# node-waf configuration -.lock-wscript +# misc +.DS_Store +*.pem -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* -# Dependency directories -node_modules/ -jspm_packages/ +# local env files +.env*.local -# Snowpack dependency directory (https://snowpack.dev/) -web_modules/ +# vercel +.vercel -# TypeScript cache +# typescript *.tsbuildinfo +next-env.d.ts -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional stylelint cache -.stylelintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz +package-lock.json -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variable files -.env -.env.development.local -.env.test.local -.env.production.local -.env.local - -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache - -# Next.js build output -.next -out - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and not Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# vuepress v2.x temp and cache directory -.temp -.cache - -# Docusaurus cache and generated files -.docusaurus - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -# Stores VSCode versions used for testing VSCode extensions -.vscode-test - -# yarn v2 -.yarn/cache -.yarn/unplugged -.yarn/build-state.yml -.yarn/install-state.gz -.pnp.* -node_modules +.vscode/ \ No newline at end of file diff --git a/@types/calenderState.types.ts b/@types/calenderState.types.ts deleted file mode 100644 index f23e59c..0000000 --- a/@types/calenderState.types.ts +++ /dev/null @@ -1,29 +0,0 @@ -export interface EventType { - title: string; - timings: string; - content: string; - image?: string; - ended: boolean; - previousYoutubeRecording?: string; // If event ended provide recording - organizer?: string; - role?:string; - company?:string; - } - - export interface EventArrayType { - day: number; - event: boolean; - events: EventType[]; - dumpDay:boolean; - } - - -// This is Global state types (i.e store type for calender global store) - export interface CalenderStateTypes { - index: number; - selectedData: EventType[]; - selectedEvent:EventType, - month: number; - year: number; - dates: EventArrayType[]; - } \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 1d126e7..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 Developer Student Club DDU - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index e69de29..c403366 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,36 @@ +This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). + +## Getting Started + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +# or +pnpm dev +# or +bun dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. + +This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. + +## Learn More + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! + +## Deploy on Vercel + +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/app/layout.tsx b/app/layout.tsx new file mode 100644 index 0000000..a049f58 --- /dev/null +++ b/app/layout.tsx @@ -0,0 +1,30 @@ +import type { Metadata } from "next"; +import { Inter } from "next/font/google"; +import "@/styles/globals.css"; +import { Analytics } from '@vercel/analytics/react'; +import { SpeedInsights } from "@vercel/speed-insights/next" +const inter = Inter({ subsets: ["latin"] }); + +export const metadata: Metadata = { + title: "DUHacks 3.0", + description: "DUHacks 3.0", + icons: "/assets/images/duhacks.png", +}; + +export default function RootLayout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + + + {children} + + + + + + + ); +} diff --git a/app/page.tsx b/app/page.tsx new file mode 100644 index 0000000..b7cc108 --- /dev/null +++ b/app/page.tsx @@ -0,0 +1,151 @@ +"use client"; +import React, { useEffect, useState } from "react"; +import Image from "next/image"; +import Navbar from "../components/Navbar"; +import Timeline from "@/components/Timeline/Timeline"; +import Footer from "@/components/Footer"; +import HeroSection from "@/components/HeroSection/HeroSection"; +import BackGround from "@/components/BackGround"; +import PrizeSection from "@/components/PrizeSection/PrizeSection"; +import Faq from "@/components/Faq/Faq"; +import FlareCursor from "@/components/FlareCursor"; +import Themes from "@/components/ThemesSection/Themes"; +import PreLoader from "@/components/PreLoader"; +import TeamSection from "@/components/TeamSection/TeamSection"; +import SponsorsSection from "@/components/SponsorsSection/SponsorsSection"; +import Timeline2 from "@/components/Timeline/Timeline2"; +import TweetFeed from "@/components/Tweets/TweetFeed"; +import About from "@/components/About/About"; +import LoadingScreen from "@/components/LoadingScreen"; +import SponsorsSection2 from "@/components/SponsorsSection/SponsorsSection2"; + +export default function Home() { + const [activeSection, setActiveSection] = useState("home"); + + const handleScrollSection = ( + about: number, + themes: number, + schedule: number, + sponsors: number, + prizes: number, + team: number, + faq: number + ) => { + const scrollPosition = window.scrollY; + + if (scrollPosition >= 0 && scrollPosition < about) { + setActiveSection("home"); + } else if (scrollPosition >= about && scrollPosition < themes) { + setActiveSection("about"); + } else if (scrollPosition >= themes && scrollPosition < schedule) { + setActiveSection("themes"); + } else if (scrollPosition >= schedule && scrollPosition < sponsors) { + setActiveSection("schedule"); + } else if (scrollPosition >= sponsors && scrollPosition < prizes) { + setActiveSection("sponsors"); + } else if (scrollPosition >= prizes && scrollPosition < team) { + setActiveSection("prizes"); + } else if (scrollPosition >= team && scrollPosition < faq) { + setActiveSection("team"); + } else if (scrollPosition >= faq) { + setActiveSection("faq"); + } else { + setActiveSection(""); + } + + // console.log(scrollPosition, about, themes, schedule, sponsors, prizes, team, faq); + }; + + useEffect(() => { + const handleScroll = () => { + const about = document.getElementById("about"); + const themes = document.getElementById("themes"); + const schedule = document.getElementById("schedule"); + const sponsors = document.getElementById("sponsors"); + const prizes = document.getElementById("prizes"); + const team = document.getElementById("team"); + const faq = document.getElementById("faq"); + + if (about && themes && schedule && sponsors && prizes && team && faq) { + const aboutOffset = about.offsetTop; + const themesOffset = themes.offsetTop; + const scheduleOffset = schedule.offsetTop; + const sponsersOffset = sponsors.offsetTop; + const prizesOffset = prizes.offsetTop; + const teamOffset = team.offsetTop; + const faqOffset = faq.offsetTop; + + // console.log(aboutOffset, themesOffset, scheduleOffset, sponsersOffset, prizesOffset, teamOffset, faqOffset); + handleScrollSection( + aboutOffset, + themesOffset, + scheduleOffset, + sponsersOffset, + prizesOffset, + teamOffset, + faqOffset + ); + } + }; + + window.addEventListener("scroll", handleScroll); + + return () => { + window.removeEventListener("scroll", handleScroll); + }; + }, [activeSection]); + + return ( +
+ {/* */} + + {/*
*/} + {/* */} + {/* */} + + {/* */} + + + +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ {/* */} + +
+ +
+

+ +
+ +
+
+ +
+ + + +
+
+ +
+ +
+
+ ); +} diff --git a/app/swag/layout.tsx b/app/swag/layout.tsx new file mode 100644 index 0000000..f34f026 --- /dev/null +++ b/app/swag/layout.tsx @@ -0,0 +1,33 @@ +import type { Metadata } from "next"; +import { Inter } from "next/font/google"; +import "@/styles/globals.css"; +const inter = Inter({ subsets: ["latin"] }); +import Navbar2 from "@/components/Navbar2"; +import Footer from "@/components/Footer"; + +export const metadata: Metadata = { + title: "DIgital Swag", + description: "Get your digital swag here and post it on social media!", + icons: "/assets/images/duhacks.png", +}; + +export default function RootLayout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + + + + {/* */} + +
+ {children} +
+ +