From 66c23c166efba8699742790f2f1f15c61f0922bb Mon Sep 17 00:00:00 2001 From: Chandraprakash Darji Date: Sun, 6 Aug 2023 00:53:20 +0530 Subject: [PATCH] fix: hackathon (#727) * Added a Feature * Deleated /idea file * Added Devops Playlist link to the links that does not have video yet * feat: Metabob Hackathon content * Update: Added hackathon title * feat: prizes and judges in metabob hackathon * Revert "Added a Feature" This reverts commit 76e5550e510c064cd609b074162c2f5d6d7bb33e. * Revert "Deleated /idea file" This reverts commit 54b09e4b0780af111644cb8a6a7ae9f95f84a245. * Revert "Revert "Deleated /idea file"" This reverts commit 2c9ed139407e5b9d682d3184cbe45befe2d58252. * remove: metabob content * fix: import sort * remove: backup file --------- Co-authored-by: Aman Co-authored-by: Siddhant Khisty --- src/App.jsx | 16 +++- .../PageComp/HackathonsPage/OngoingEvents.jsx | 18 +++- .../PageComp/HackathonsPage/PastEvents.jsx | 49 +++------- .../PageComp/HashnodePage/Tracks.jsx | 6 -- .../ParticularHackathonPageContent.js | 70 ++++++++++++++ src/content/Hackathons/index.js | 94 ++++++------------- src/content/Hackathons/napptive.js | 16 +++- src/pages/PerticularhackathonPage.jsx | 93 +++++------------- 8 files changed, 181 insertions(+), 181 deletions(-) create mode 100644 src/content/Hackathons/ParticularHackathonPageContent.js diff --git a/src/App.jsx b/src/App.jsx index baece3c5..cbb7e2ee 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -12,7 +12,7 @@ import { } from '@/content/courses'; import { CoursesPageContent } from '@/content/courses/CoursesPageContent'; import OpenSourcePageContent from '@/content/courses/opensource'; -import NapptiveHackathon from '@/content/Hackathons/napptive'; +import { hackathonDataList } from '@/content/Hackathons'; import { MeetupPageContent } from '@/content/Meetup'; import Delhi2023 from '@/content/Meetup/delhi-may-2023'; import { OpensourcePageContent } from '@/content/opensource'; @@ -101,11 +101,21 @@ const App = () => { {/* Hackathon */} } /> - hack.hasContent) + .map((hack) => ( + } + /> + ))} + {/* } - /> + /> */} {/* Meetup */} { return (
@@ -5,7 +9,19 @@ const OngoingEvents = () => {

Ongoing events


-

There no upcoming hackathons right now

+ {hackathonDataList.filter( + (hack) => new Date().getTime() < new Date(hack.date).getTime() + ).length > 0 ? ( + hackathonDataList + .filter( + (web) => new Date().getTime() < new Date(web.date).getTime() + ) + .map((hack) => { + return ; + }) + ) : ( +

There no upcoming hackathons right now

+ )}
diff --git a/src/components/PageComp/HackathonsPage/PastEvents.jsx b/src/components/PageComp/HackathonsPage/PastEvents.jsx index dd9745cd..0a6f465c 100644 --- a/src/components/PageComp/HackathonsPage/PastEvents.jsx +++ b/src/components/PageComp/HackathonsPage/PastEvents.jsx @@ -1,6 +1,4 @@ -import PastEvent2 from 'assets/events/past-event-2.jpeg'; -import PastEvent8 from 'assets/events/past-event-8.jpeg'; -import NapptiveBanner from 'assets/hackathon/napptive/Banner.jpg'; +import { hackathonDataList } from '@/content/Hackathons'; import DetailCard from '@/components/Cards/DetailCard'; @@ -11,9 +9,19 @@ const PastEvents = () => {

Past events


- {eventsData.map((event) => ( - - ))} + {hackathonDataList.filter( + (hack) => new Date().getTime() > new Date(hack.date).getTime() + ).length > 0 ? ( + hackathonDataList + .filter( + (web) => new Date().getTime() > new Date(web.date).getTime() + ) + .map((hack) => { + return ; + }) + ) : ( +

There no past hackathons right now

+ )}
@@ -21,32 +29,3 @@ const PastEvents = () => { }; export default PastEvents; - -// Data Section - -const eventsData = [ - { - title: 'Napptive hackathon', - description: - 'Do you want to learn new skills, discover how to build and deploy cloud native apps and meet like-minded people? Find this and much more by participating in our hackathon!', - image: NapptiveBanner, - url: '/events/hackathons/napptive', - btnText: 'Learn more', - }, - { - title: 'Stream hackathon', - description: - 'WeMakeDevs <> Stream Hackathon : Hey if you are looking to learn new skills, meet interesting people, and push yourself to create something truly innovative, then you should definitely taking part in our hackathon!', - image: PastEvent2, - url: 'https://wemakedevs-stream.devpost.com/resources', - btnText: 'Learn more', - }, - { - title: 'Cloud Native hackathon', - description: - 'Cloud Native Hackathon is an initiative to bring together students, professionals, and even beginners from around the world to innovate and build projects in the domain of DevOps.', - image: PastEvent8, - url: 'https://cloudnativehack21.devpost.com/', - btnText: 'Learn more', - }, -]; diff --git a/src/components/PageComp/HashnodePage/Tracks.jsx b/src/components/PageComp/HashnodePage/Tracks.jsx index e3780165..08694e0a 100644 --- a/src/components/PageComp/HashnodePage/Tracks.jsx +++ b/src/components/PageComp/HashnodePage/Tracks.jsx @@ -2,7 +2,6 @@ import Special from 'assets/hashnode/Special-Track-2022.png'; import Track1 from 'assets/hashnode/Track-1.png'; import Track2 from 'assets/hashnode/Track-2.png'; import Track3 from 'assets/hashnode/Track-3.png'; -// import Track4 from 'assets/hashnode/Track-4.png'; import TrackCard from '@/components/Cards/TrackCard'; @@ -40,11 +39,6 @@ const hashnodeData = [ 'Write a blog on the topic Soft Skills, share about some soft skills you have developed, and what techniques you used', image: Track3, }, - //{ - // description: - // 'Write a blog sharing some of your takeaways from hackathons. If you want to participate in one, check out AWS Amplify by Hashnode', - // image: Track4, - //}, { description: "It is important to look back at things you have acheived to stay motivated to do even more amazing things. Half of 2023 is over, and now it's time to look back at all your acomplishments so far. Write about them and you can win a Mechanical Keyboard.", diff --git a/src/content/Hackathons/ParticularHackathonPageContent.js b/src/content/Hackathons/ParticularHackathonPageContent.js new file mode 100644 index 00000000..235f9663 --- /dev/null +++ b/src/content/Hackathons/ParticularHackathonPageContent.js @@ -0,0 +1,70 @@ +export const ParticularHackthonPageFAQ = [ + { + id: 'FAQ1', + question: 'What is a hackathon?', + answer: + 'A hackathon is a collaborative coding competition where programmers, designers, and developers compete for monetary bonuses for creating innovative solutions. It is a mix of a celebration and an all-night struggle against the clock and the opposition.', + }, + { + id: 'FAQ2', + question: 'Why would someone participate in a hackathon?', + answer: + 'People take part in hackathons for a variety of reasons, including the challenge, the opportunity for creative expression, the chance to collaboration, networking opportunities, swag, and much more.', + }, + { + id: 'FAQ3', + question: 'Is the event open to all ages?', + answer: + 'You can participate in this hackathon as long as you are of legal age in your respective country, or have permission for a parent or guardian in case you are a minor.', + }, + { + id: 'FAQ4', + question: 'What is the mode of this hackathon?', + answer: + 'This is a virtual hackathon, so you can create hacks from the comfort of your home, or anywhere in the world.', + }, + { + id: 'FAQ5', + question: 'Do we sign up as individuals or as a team?', + answer: + 'You can either participate as a individual or with a team of 1-4 folks i.e the maximum strength of the team should not exceed 4', + }, + { + id: 'FAQ6', + question: 'Is it a paid event?', + answer: + 'This is a completely free-to-join event i.e anyone above the legal age can participate in the event for free.', + }, +]; + +const HackthonPageContent = { + header: [ + { + name: 'About', + href: '#about', + }, + { + name: 'Tracks', + href: '#tracks', + }, + { + name: 'Judges', + href: '#judges', + }, + { + name: 'Criteria', + href: '#criteria', + }, + { + name: 'Rules', + href: '#rules', + }, + ], + CTA: { + name: 'Register', + href: '#register', + }, + faq: ParticularHackthonPageFAQ, +}; + +export default HackthonPageContent; diff --git a/src/content/Hackathons/index.js b/src/content/Hackathons/index.js index 235f9663..54a928b4 100644 --- a/src/content/Hackathons/index.js +++ b/src/content/Hackathons/index.js @@ -1,70 +1,38 @@ -export const ParticularHackthonPageFAQ = [ - { - id: 'FAQ1', - question: 'What is a hackathon?', - answer: - 'A hackathon is a collaborative coding competition where programmers, designers, and developers compete for monetary bonuses for creating innovative solutions. It is a mix of a celebration and an all-night struggle against the clock and the opposition.', - }, - { - id: 'FAQ2', - question: 'Why would someone participate in a hackathon?', - answer: - 'People take part in hackathons for a variety of reasons, including the challenge, the opportunity for creative expression, the chance to collaboration, networking opportunities, swag, and much more.', - }, - { - id: 'FAQ3', - question: 'Is the event open to all ages?', - answer: - 'You can participate in this hackathon as long as you are of legal age in your respective country, or have permission for a parent or guardian in case you are a minor.', - }, +import PastEvent2 from 'assets/events/past-event-2.jpeg'; +import PastEvent8 from 'assets/events/past-event-8.jpeg'; +import NapptiveBanner from 'assets/hackathon/napptive/Banner.jpg'; + +import NapptiveHackathonContent from '@/content/Hackathons/napptive'; + +export const hackathonDataList = [ { - id: 'FAQ4', - question: 'What is the mode of this hackathon?', - answer: - 'This is a virtual hackathon, so you can create hacks from the comfort of your home, or anywhere in the world.', + title: NapptiveHackathonContent.title, + description: NapptiveHackathonContent.description, + image: NapptiveBanner, + url: `/events/hackathons/${NapptiveHackathonContent.slug}`, + btnText: 'Learn more', + content: NapptiveHackathonContent, + hasContent: true, + date: NapptiveHackathonContent.to, }, { - id: 'FAQ5', - question: 'Do we sign up as individuals or as a team?', - answer: - 'You can either participate as a individual or with a team of 1-4 folks i.e the maximum strength of the team should not exceed 4', + title: 'Stream hackathon', + description: + 'WeMakeDevs <> Stream Hackathon : Hey if you are looking to learn new skills, meet interesting people, and push yourself to create something truly innovative, then you should definitely taking part in our hackathon!', + image: PastEvent2, + url: 'https://wemakedevs-stream.devpost.com/resources', + btnText: 'Learn more', + hasContent: false, + date: 'Sun, 18 Dec 2022 14:30:00 GMT', }, { - id: 'FAQ6', - question: 'Is it a paid event?', - answer: - 'This is a completely free-to-join event i.e anyone above the legal age can participate in the event for free.', + title: 'Cloud Native hackathon', + description: + 'Cloud Native Hackathon is an initiative to bring together students, professionals, and even beginners from around the world to innovate and build projects in the domain of DevOps.', + image: PastEvent8, + url: 'https://cloudnativehack21.devpost.com/', + btnText: 'Learn more', + hasContent: false, + date: 'Mon, 12 Dec 2022 14:30:00 GMT', }, ]; - -const HackthonPageContent = { - header: [ - { - name: 'About', - href: '#about', - }, - { - name: 'Tracks', - href: '#tracks', - }, - { - name: 'Judges', - href: '#judges', - }, - { - name: 'Criteria', - href: '#criteria', - }, - { - name: 'Rules', - href: '#rules', - }, - ], - CTA: { - name: 'Register', - href: '#register', - }, - faq: ParticularHackthonPageFAQ, -}; - -export default HackthonPageContent; diff --git a/src/content/Hackathons/napptive.js b/src/content/Hackathons/napptive.js index 0cfa6458..5f39e746 100644 --- a/src/content/Hackathons/napptive.js +++ b/src/content/Hackathons/napptive.js @@ -1,18 +1,26 @@ -import HackthonPageContent from '@/content/Hackathons'; +import HackthonPageContent from '@/content/Hackathons/ParticularHackathonPageContent'; import Steve from '@/assets/hackathon/napptive/Steve.jpeg'; import HeroImg from '@/assets/hackathon/napptive/theme.png'; -const NapptiveHackathon = { +const NapptiveHackathonContent = { header: HackthonPageContent.header, faq: HackthonPageContent.faq, CTA: HackthonPageContent.CTA, slug: 'napptive', title: 'Build cloud-native apps', - description: 'Powered by Napptive', + by: 'Powered by Napptive', + description: + 'Do you want to learn new skills, discover how to build and deploy cloud native apps and meet like-minded people? Find this and much more by participating in our hackathon!', hero: HeroImg, videoUrl: 'https://www.youtube.com/embed/DwEXh-wq1TI', liveUrl: 'https://www.youtube.com/watch?v=sST7JGLq2as', + about: [ + 'Do you want to learn new skills, discover how to build and deploy cloud native apps and meet like-minded people? Find this and much more and take part in our hackathon!', + 'If you want to learn new skills, discover how to build and deploy cloud native apps and meet like-minded people, this is your chance to collaborate with other talented developers and work together to build', + 'You will have access to a cutting-edge platform, based on the most advanced cloud-native technology and get the opportunity to learn from experts and gain valuable experience working on real applications.', + 'The WeMakeDevs <> Napptive Hackathon is the right place for you if you are a passionate, hands-on dev. The will to push yourself to new limits and learn along the way is all you need to begin!', + ], rules: [ 'The theme is open-ended, but using Napptive is mandatory. Submissions made without using Napptive will NOT be considered.', 'You can submit to as many prize categories as you want.', @@ -193,4 +201,4 @@ const NapptiveHackathon = { to: 'Sun, 16 Apr 2023 14:30:00 GMT', winnerAnnouc: 'Mon, 17 Apr 2023 11:30:00 GMT', }; -export default NapptiveHackathon; +export default NapptiveHackathonContent; diff --git a/src/pages/PerticularhackathonPage.jsx b/src/pages/PerticularhackathonPage.jsx index a3d29317..8b19bb9d 100644 --- a/src/pages/PerticularhackathonPage.jsx +++ b/src/pages/PerticularhackathonPage.jsx @@ -5,6 +5,8 @@ import { HiOutlineArrowRight } from 'react-icons/hi'; import { MdOutlineLabelImportant } from 'react-icons/md'; import { VscDebugBreakpointLogUnverified } from 'react-icons/vsc'; +import { getDateTime } from '@/lib/utils'; + import SpeakerCard from '@/components/Cards/SpeakerCard'; import TimeLineCard from '@/components/Cards/TimeLineCard'; import { ColumnSection, FAQ, Footer, Navbar } from '@/components/layout'; @@ -18,7 +20,7 @@ const PerticularhackathonPage = ({ content }) => {

{content.title}

-

{content.description}

+

{content.by}

Start: - {new Date(content.from).toLocaleDateString('en-US', { - dateStyle: 'medium', - })}{' '} - {new Date(content.from).toLocaleTimeString('en-US', { - timeStyle: 'short', - })}{' '} - {/\((.*)\)/ - .exec(new Date(content.from).toString())[1] - .split(' ') - .map((i) => i[0].toUpperCase()) - .join('')} + {getDateTime(content.from)}
- End: {' '} - {new Date(content.to).toLocaleDateString('en-US', { - dateStyle: 'medium', - })}{' '} - {new Date(content.to).toLocaleTimeString('en-US', { - timeStyle: 'short', - })}{' '} - {/\((.*)\)/ - .exec(new Date(content.to).toString())[1] - .split(' ') - .map((i) => i[0].toUpperCase()) - .join('')} + End: + {getDateTime(content.to)}
- Winnner announcement{' '} - {new Date(content.winnerAnnouc).toLocaleDateString('en-US', { - dateStyle: 'medium', - })}{' '} - {new Date(content.winnerAnnouc).toLocaleTimeString('en-US', { - timeStyle: 'short', - })}{' '} - {/\((.*)\)/ - .exec(new Date(content.winnerAnnouc).toString())[1] - .split(' ') - .map((i) => i[0].toUpperCase()) - .join('')} + Winnner announcement {getDateTime(content.winnerAnnouc)}
{new Date().getTime() < new Date(content.from).getTime() ? ( @@ -84,40 +55,24 @@ const PerticularhackathonPage = ({ content }) => {
{/* Theme section */} - - Do you want to learn new skills, discover how to build and deploy - cloud native apps and meet like-minded people? Find this and much more - and take part in our hackathon! - - - If you want to learn new skills, discover how to build and deploy - cloud native apps and meet like-minded people, this is your chance to - collaborate with other talented developers and work together to build - something amazing. - - - You will have access to a cutting-edge platform, based on the most - advanced cloud-native technology and get the opportunity to learn from - experts and gain valuable experience working on real applications. - - - The WeMakeDevs {'<>'} Napptive Hackathon is the right place for you if - you are a passionate, hands-on dev. The will to push yourself to new - limits and learn along the way is all you need to begin! - + {content.about.map((item) => ( + {item} + ))} {/* timeline section */} -
-
-

Timeline

-
-
    - {content.timeline.map((timeline) => { - return ; - })} -
-
-
+ {content.timeline.length > 0 && ( +
+
+

Timeline

+
+
    + {content.timeline.map((timeline) => { + return ; + })} +
+
+
+ )} {/* Prizes section */}
@@ -142,7 +97,7 @@ const PerticularhackathonPage = ({ content }) => { />

{item.title}

- {item.guide !== '' && ( + {item.guide !== '' && item.guide && ( <> Using the{' '}