├── .babelrc ├── .env ├── .eslintrc ├── .gitattributes ├── .github ├── .gitattributes ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── doc.yml │ └── feature.yml ├── advanced-issue-labeler.yml ├── pull_request_template.md └── workflows │ ├── CI.yml │ ├── Changelog.yml │ ├── add-label-issues.yml │ ├── add-label-prs.yml │ ├── close_old_issues.yaml │ ├── codeql.yml │ ├── comment-on-issues.yml │ ├── comment-on-prs.yml │ └── lint.yml ├── .gitignore ├── .husky └── commit-msg ├── .prettierignore ├── .prettierrc.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── commitlint.config.js ├── components ├── AddHackathon.js ├── AddInternship.js ├── Community │ └── CommunityCard.jsx ├── DarkModeToggle │ └── DarkModeToggle.jsx ├── Dashboard.js ├── FormModal.js ├── GalleryCard.js ├── JobCard.js ├── MentorFormSetupPW.js ├── MentorRegistration │ ├── MentorFormRegistration.js │ ├── MentorRegistrationForm.test.js │ ├── components │ │ ├── Card.js │ │ ├── ContactDetails.js │ │ ├── Input.js │ │ ├── MagicUrlPopUp.js │ │ ├── PersonDetails.js │ │ ├── ScheduleDetails.js │ │ └── SessionDetails.js │ └── services │ │ └── userAvailabilityService.js.js ├── UI │ ├── Button │ │ ├── Button.js │ │ ├── Button.module.css │ │ ├── Switch.js │ │ └── button.test.js │ ├── Card │ │ ├── IconCard.js │ │ ├── ImageCard.js │ │ └── ProfileCard.js │ ├── Form │ │ └── Input.js │ ├── GoogleBtn │ │ ├── GoogleBtn.js │ │ └── GoogleBtn.module.css │ ├── Links │ │ ├── ButtonLink.js │ │ ├── IconLink.js │ │ ├── Link.module.css │ │ └── TextLink.js │ ├── Loader.js │ ├── MainLoader.js │ ├── Section │ │ ├── Section.js │ │ └── SectionHeader.js │ └── index.js ├── basic │ ├── Alertbox.js │ ├── ComingSoon.js │ ├── ImageCropper.js │ ├── Input.js │ ├── LoginDropdown.js │ ├── MoveToTop.js │ ├── Overlay.js │ ├── ProfileImageInput.js │ ├── SimpleBanner.js │ ├── Slider.js │ ├── SvgMaker.js │ ├── Table.js │ ├── TableComponent.jsx │ ├── logout.js │ └── spinner.js ├── blog.js ├── dateAndTime │ ├── DayInput.js │ └── TimeZoneInput.js ├── eventLogin │ └── EventLogin.js ├── hackthons │ ├── Hackathons.js │ └── components │ │ └── Searchbar.js ├── homePage │ ├── About.js │ ├── Banner.js │ ├── Internship.js │ ├── MentorSection.js │ ├── Service.js │ ├── TeamProfile.js │ ├── Testimonial.js │ └── index.js ├── layout │ ├── Footer.js │ ├── FooterColumn.js │ ├── Header.js │ └── UserProfile.js ├── loader.js ├── mentor.js ├── mentorDashboard │ ├── Bookings.js │ ├── CalendarComponent │ │ └── card.js │ ├── ListedSessionComponent │ │ ├── AddForm.js │ │ └── EditForm.js │ ├── Payment.js │ ├── PaymentComponent │ │ └── Form.js │ ├── PreLoader.js │ ├── QueriesComponent │ │ └── ticketForm.js │ ├── SideBarComponent │ │ └── PublishProfile.js │ ├── calendar.js │ ├── home.js │ ├── profile.js │ ├── queries.js │ ├── sessions.js │ └── sidebar.js ├── mentorPage │ └── components │ │ ├── Company.js │ │ ├── FAQ.js │ │ ├── FAQList.js │ │ ├── IconCard.js │ │ ├── Section.js │ │ └── Testimonials.js ├── mentorProfile │ └── components │ │ ├── BookSessionModal.js │ │ ├── MentorCard.js │ │ └── SharePageModal.js ├── newMentorProfile │ ├── SessionCard.js │ └── mentorAbout.js ├── support │ └── SupportChat.js └── userDashboard │ ├── Bookings.js │ ├── application.js │ ├── home.js │ ├── profile.js │ └── sidebar.js ├── config └── errorCodes.js ├── context ├── AuthContext.js ├── JobContext.js └── ThemeContext.js ├── hook ├── encryptDecrypt.js ├── razorpay.js ├── use-theme.jsx └── useAPi.js ├── jest.config.json ├── next-sitemap.config.js ├── next.config.js ├── package.json ├── pages ├── .DS_Store ├── 404.page.js ├── Teams.js ├── [mentorUsername].page.js ├── [mentorUsername] │ └── bookSession │ │ └── index.page.js ├── _app.page.js ├── _document.page.js ├── _offline.js ├── alertbox.page.js ├── api │ └── welcome.js ├── auth │ ├── forgotpass.page.js │ ├── login.page.js │ ├── register.page.js │ └── resetpassword.page.js ├── blogDetail │ ├── [blogDetailId].page.js │ └── blogDetail.page.js ├── blogs.page.js ├── career.page.js ├── career │ ├── apply │ │ └── index.page.js │ └── thank-you.page.js ├── community.page.js ├── components.page.js ├── contact.page.js ├── dashboard │ ├── dashboardTour.js │ ├── mentor.page.js │ └── user.page.js ├── data │ ├── ServicesData.js │ ├── allCoursesData.js │ ├── coursesData.js │ ├── faq.js │ ├── hackathonsData.js │ ├── teamsData.js │ └── testiomialsData.js ├── hackathon.page.js ├── index.page.js ├── internship.page.js ├── mentor.page.js ├── mentor │ ├── list.page.js │ ├── register.page.js │ └── setpassword │ │ └── [mentorPWCode].page.js ├── privacy.page.js ├── refundandcancellation.page.js └── termsandcondition.page.js ├── postcss.config.js ├── public ├── 404.svg ├── Arrow.svg ├── Error.svg ├── Grabtern2.jpg ├── Grabtern2.png ├── GrabternLogo.svg ├── Hexagon.svg ├── NewLogo.png ├── assets │ ├── .DS_Store │ ├── Visibillity.jsx │ ├── VisibillityOff.jsx │ ├── css │ │ ├── bootstrap.min.css │ │ ├── gijgo.css │ │ ├── hamburgers.min.css │ │ ├── magnific-popup.css │ │ ├── main.css │ │ ├── nice-select.css │ │ ├── owl.carousel.min.css │ │ ├── price_rangs.css │ │ ├── progressbar_barfiller.css │ │ ├── responsive.css │ │ ├── style.css │ │ └── style.map │ ├── fonts │ │ ├── Flaticon.eot │ │ ├── Flaticon.svg │ │ ├── Flaticon.ttf │ │ ├── Flaticon.woff │ │ ├── Flaticon.woff2 │ │ ├── _flaticon.scss │ │ ├── fa-brands-400.eot │ │ ├── fa-brands-400.svg │ │ ├── fa-brands-400.ttf │ │ ├── fa-brands-400.woff │ │ ├── fa-brands-400.woff2 │ │ ├── fa-regular-400.eot │ │ ├── fa-regular-400.svg │ │ ├── fa-regular-400.ttf │ │ ├── fa-regular-400.woff │ │ ├── fa-regular-400.woff2 │ │ ├── fa-solid-900.eot │ │ ├── fa-solid-900.svg │ │ ├── fa-solid-900.ttf │ │ ├── fa-solid-900.woff │ │ ├── fa-solid-900.woff2 │ │ ├── flaticon.css │ │ ├── flaticon.html │ │ ├── gijgo-material.eot │ │ ├── gijgo-material.svg │ │ ├── gijgo-material.ttf │ │ ├── gijgo-material.woff │ │ ├── themify.eot │ │ ├── themify.svg │ │ ├── themify.ttf │ │ └── themify.woff │ ├── img │ │ ├── BecomeMentor.png │ │ ├── MentorImg.png │ │ ├── MentorImg.svg │ │ ├── QR.png │ │ ├── RequestState │ │ │ ├── error.png │ │ │ └── loading.png │ │ ├── chatSupport.gif │ │ ├── comingSoon.png │ │ ├── community_mentors │ │ │ ├── Aarib.webp │ │ │ ├── MyImage.webp │ │ │ ├── bhavy.webp │ │ │ ├── blank-profile-photo.webp │ │ │ ├── profile1.webp │ │ │ ├── profile2.webp │ │ │ ├── profile3.webp │ │ │ ├── profile4.webp │ │ │ ├── profile5.webp │ │ │ └── rafey_ahmad.webp │ │ ├── company │ │ │ ├── GSoC.svg │ │ │ ├── hackerRank.svg │ │ │ ├── microsoft.svg │ │ │ └── mlh.svg │ │ ├── elements │ │ │ ├── a.webp │ │ │ ├── a2.webp │ │ │ ├── d.webp │ │ │ ├── disabled-check.webp │ │ │ ├── disabled-radio.webp │ │ │ ├── f1.webp │ │ │ ├── f2.webp │ │ │ ├── f3.webp │ │ │ ├── f4.webp │ │ │ ├── f5.webp │ │ │ ├── f6.webp │ │ │ ├── f7.webp │ │ │ ├── f8.webp │ │ │ ├── g1.webp │ │ │ ├── g2.webp │ │ │ ├── g3.webp │ │ │ ├── g4.webp │ │ │ ├── g5.webp │ │ │ ├── g6.webp │ │ │ ├── g7.webp │ │ │ ├── g8.webp │ │ │ ├── primary-check.webp │ │ │ ├── primary-radio.webp │ │ │ ├── success-check.webp │ │ │ └── success-radio.webp │ │ ├── favicon.ico │ │ ├── favicon1.ico │ │ ├── gallery │ │ │ ├── 20944201.webp │ │ │ ├── Outreachysr.png │ │ │ ├── about2.webp │ │ │ ├── about3.webp │ │ │ ├── adobeshe.webp │ │ │ ├── engage.webp │ │ │ ├── featured1.webp │ │ │ ├── featured2.webp │ │ │ ├── featured3.webp │ │ │ ├── featured4.webp │ │ │ ├── featured5.webp │ │ │ ├── featured6.webp │ │ │ ├── footer-bg.webp │ │ │ ├── footer_bg.webp │ │ │ ├── form.webp │ │ │ ├── grid.webp │ │ │ ├── gsoc.webp │ │ │ ├── h1_hero2.webp │ │ │ ├── hackerrank.webp │ │ │ ├── heart1.webp │ │ │ ├── interngsoc.webp │ │ │ ├── isro.webp │ │ │ ├── kde.webp │ │ │ ├── logo2_footer.webp │ │ │ ├── mentors.avif │ │ │ ├── mitacs.webp │ │ │ ├── mlamazon.webp │ │ │ ├── mlhfellowship.webp │ │ │ ├── mlhprep.webp │ │ │ ├── qutaion.webp │ │ │ ├── screen.webp │ │ │ ├── section-bg3.webp │ │ │ ├── section_bg01.webp │ │ │ ├── section_bg02.webp │ │ │ ├── sn-boses.webp │ │ │ ├── sobs.webp │ │ │ ├── step.webp │ │ │ ├── topic1.webp │ │ │ ├── topic2.webp │ │ │ ├── topic3.webp │ │ │ ├── topic4.webp │ │ │ ├── topic5.webp │ │ │ ├── topic6.webp │ │ │ ├── topic7.webp │ │ │ ├── topic8.webp │ │ │ ├── video-bg.svg │ │ │ └── wow.webp │ │ ├── gif │ │ │ └── Spinner.gif │ │ ├── hackathons │ │ │ ├── 689.webp │ │ │ ├── 917.webp │ │ │ ├── Apple Swift Challenge.webp │ │ │ ├── Facebook Hacker Cup.webp │ │ │ ├── Hackoctoberfest.webp │ │ │ ├── Microsoft Image Cup.webp │ │ │ ├── Solve_for_Tomorrow_346x219_1_346x210_1_346x205_1_346x202_1_346x200.webp │ │ │ ├── codecrush.webp │ │ │ ├── gcccode.webp │ │ │ ├── girls3_384x219.webp │ │ │ ├── image.webp │ │ │ ├── magnifying-glass.png │ │ │ ├── north.webp │ │ │ ├── p_1178x720.webp │ │ │ ├── q5_2_1173x720.webp │ │ │ └── tata Imagination.webp │ │ ├── hero │ │ │ ├── h1_hero.webp │ │ │ ├── hero2.webp │ │ │ └── screen.webp │ │ ├── icon │ │ │ ├── about.svg │ │ │ ├── icon1.svg │ │ │ ├── icon2.svg │ │ │ ├── icon3.svg │ │ │ ├── no-profile-picture.webp │ │ │ └── right-icon.svg │ │ ├── login-bg.mp4 │ │ ├── logo │ │ │ ├── loder.svg │ │ │ ├── loder.webp │ │ │ ├── logo.webp │ │ │ └── logo2_footer.webp │ │ ├── noSupport.gif │ │ ├── post │ │ │ ├── next.webp │ │ │ ├── post_1.webp │ │ │ ├── post_10.webp │ │ │ ├── post_2.webp │ │ │ ├── post_3.webp │ │ │ ├── post_4.webp │ │ │ ├── post_5.webp │ │ │ ├── post_6.webp │ │ │ ├── post_7.webp │ │ │ ├── post_8.webp │ │ │ ├── post_9.webp │ │ │ └── preview.webp │ │ ├── support.gif │ │ ├── testimonials │ │ │ ├── ankit.webp │ │ │ ├── lubna.webp │ │ │ ├── talib.webp │ │ │ └── testimonial-profile1.webp │ │ ├── userIcon.png │ │ └── vector_images │ │ │ ├── image_1-removebg-preview.png │ │ │ └── vector-registration.svg │ ├── index.js │ └── sound │ │ └── greet.wav ├── blacklogo.png ├── blank-profile-photo.webp ├── discord.png ├── exampleMentorPhoto.webp ├── favicon.ico ├── faviconn.png ├── feed.xml ├── grabtern_meta_img.webp ├── hero.svg ├── icon-192x192.png ├── icon-256x256.png ├── icon-384x384.png ├── icon-512x512.png ├── iconMentorRegistrationPopup.webp ├── instagram.jpeg ├── linkedin.png ├── logo.png ├── manifest.json ├── robots.txt ├── scripts │ └── no-flash.js ├── sitemap-0.xml ├── sitemap.xml ├── spinner.gif ├── sw.js ├── toggleOff.png ├── toggleOn.png ├── video.mp4 ├── whitelogo.webp └── workbox-e43f5367.js ├── styles ├── 404.module.css ├── LoginDropdown.module.css ├── Overlay.module.css ├── blogDetail.module.css ├── contact.module.css ├── dashboard.module.css ├── form.module.css ├── globals.css ├── hackathon.module.css ├── loader.module.css ├── loginPage.module.css ├── queries.module.css ├── sessions.module.css ├── sidebar.module.css ├── slider.module.css └── userRegistration.module.css └── tailwind.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["next/babel"], 3 | "plugins": [] 4 | } 5 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | # Environment variables for the demo backend to prevent affecting the main backend database 2 | NEXT_PUBLIC_BACKEND_URL=https://demoapi.grabtern.in 3 | NEXT_PUBLIC_FRONTEND_URL=https://grabtern.in 4 | NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=grabtern-demo 5 | NEXT_PUBLIC_ENCRYPTION_SECRET_KEY="encryptionSecretKey" 6 | NEXT_PUBLIC_GOOGLE_CLIENT_ID="secured h" 7 | NEXT_PUBLIC_LOCATION_APIKEY="d2a24feac13846a2b91697be193e64d1" 8 | 9 | # Uncomment the following line if your backend server is running on localhost 10 | # NEXT_PUBLIC_BACKEND_URL=http://localhost:8000 11 | 12 | # Uncomment the following line to use the production backend. 13 | # NEXT_PUBLIC_BACKEND_URL=ttps://api.grabtern.in 14 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["next/babel", "next/core-web-vitals", "prettier"], 3 | "rules": { 4 | "react/no-unescaped-entities": "off", 5 | "react/jsx-no-target-blank": "off" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf -------------------------------------------------------------------------------- /.github/.gitattributes: -------------------------------------------------------------------------------- 1 | public/* linguist-generated=true 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/doc.yml: -------------------------------------------------------------------------------- 1 | name: "📚 Documentation" 2 | description: Report an issue in the project's documentation or README.md file. 3 | title: "📚 [Documentation / WorkFlow] - Title" 4 | labels: ["documentation", "no code"] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | 📚 **Document Request / Updation** 10 | 11 | Thanks for taking the time to fill out this documentation deficiency report! :memo: 12 | 13 | :information_source: Before submitting the report, please make sure to read our contributing guidelines. By submitting this issue, you agree to follow our guidelines. :book: 14 | 15 | :link: [CONTRIBUTING GUIDELINES](https://github.com/anmode/grabtern-frontend/blob/develop/CONTRIBUTING.md) 16 | 17 | - type: textarea 18 | id: description 19 | attributes: 20 | label: "Description ✍️" 21 | description: Enter a brief description about the deficit documentation that you want to add. 22 | placeholder: Please include a summary, also include any relevant links. 23 | validations: 24 | required: true 25 | - type: dropdown 26 | id: contribution 27 | attributes: 28 | label: Are you contributing for a program ? 29 | description: Please select the program you are contributing for. 30 | multiple: true 31 | options: 32 | - GSSoC2023 33 | - Other 34 | validations: 35 | required: true 36 | - type: checkboxes 37 | id: terms 38 | attributes: 39 | label: Code of Conduct 40 | description: By submitting this issue, you agree to follow our contributing guidelines. Please read our [Contributing Guidelines](I have read the [Contributing Guidelines](https://github.com/anmode/grabtern-frontend/blob/develop/CONTRIBUTING.md). 41 | options: 42 | - label: I have read and agree to the Contributing Guidelines of this project. 43 | required: true 44 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature.yml: -------------------------------------------------------------------------------- 1 | name: 🚀 Feature Request 2 | description: Create a new ticket for a new feature request 3 | title: "🚀 [Feature Request] - Title" 4 | labels: ["enhancement"] 5 | 6 | body: 7 | - type: markdown 8 | attributes: 9 | value: | 10 | 🚀 **Feature Request** 11 | 12 | Thanks for taking the time to fill out this Feature Request report! :memo: 13 | 14 | :information_source: Before submitting the report, please make sure to read our contributing guidelines. By submitting this issue, you agree to follow our guidelines. :book: 15 | 16 | :link: [CONTRIBUTING GUIDELINES](https://github.com/anmode/grabtern-frontend/blob/develop/CONTRIBUTING.md) 17 | - type: textarea 18 | id: description 19 | attributes: 20 | label: Is your feature request related to a problem ? Please describe. ✍️ 21 | description: Enter a brief description about the feature you feel is required. 22 | placeholder: Give all the context of your enhancement as well as the existing project. 23 | value: "Enhancement" 24 | validations: 25 | required: true 26 | - type: textarea 27 | id: solutionsteps 28 | attributes: 29 | label: Describe briefly how you would implement this enhancement. 30 | description: Please provide a solution steps for implementing the enhancement. 31 | placeholder: Short and explicit description of the solution steps... 32 | value: | 33 | Some steps to implement this enhancement- 34 | 1. Step 1 35 | 2. Step 2 36 | 3. Step 3 37 | render: bash 38 | validations: 39 | required: true 40 | - type: textarea 41 | id: AdditionalInfo 42 | attributes: 43 | label: Additional context or screenshots 44 | description: Add any other context or screenshots about the feature request here. 45 | placeholder: Add any other context or screenshots about the feature request here. 46 | value: "Additional context" 47 | - type: dropdown 48 | id: contribution 49 | attributes: 50 | label: Are you contributing for a program? 51 | multiple: true 52 | options: 53 | - GSSoC2023 54 | - Other 55 | - No 56 | validations: 57 | required: true 58 | - type: checkboxes 59 | id: terms 60 | attributes: 61 | label: Code of Conduct 62 | description: By submitting this issue, you agree to follow our contributing guidelines. Please read our [Contributing Guidelines](I have read the [Contributing Guidelines](https://github.com/anmode/grabtern-frontend/blob/develop/CONTRIBUTING.md). 63 | options: 64 | - label: I have read and agree to the Contributing Guidelines of this project. 65 | required: true 66 | -------------------------------------------------------------------------------- /.github/advanced-issue-labeler.yml: -------------------------------------------------------------------------------- 1 | # syntax - https://github.com/redhat-plumbers-in-action/advanced-issue-labeler#policy 2 | --- 3 | policy: 4 | - template: ["bug_report.yml", "feature.yml", "doc.yml"] 5 | section: 6 | - id: ["contribution"] 7 | block-list: ["Other"] 8 | label: 9 | - name: "gssoc23" 10 | keys: 11 | [ 12 | "GSSoc23", 13 | "GSSoC2023", 14 | "GSSoC 2023", 15 | "GSSoC 23", 16 | "GSSoC-2023", 17 | "GSSoC-23", 18 | ] 19 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Related Issue 2 | 3 | 6 | 7 | Closes: #[issue number] 8 | 9 | ## Description of Changes 10 | 11 | 19 | 20 | ## Checklist: 21 | 22 | 26 | 27 | - [ ] My code adheres to the established style guidelines of this project. 28 | - [ ] I have conducted a self-review of my code. 29 | - [ ] I have included comments in areas that may be difficult to understand. 30 | - [ ] I have made corresponding updates to the project documentation. 31 | - [ ] My changes have not introduced any new warnings. 32 | 33 | ## Screenshots 34 | 35 | | Original | Updated | 36 | | :--------------------------: | :-------------------------: | 37 | | ![Original screenshot](link) | ![Updated screenshot](link) | 38 | 39 | Please provide any necessary screenshots to illustrate the changes made. 40 | -------------------------------------------------------------------------------- /.github/workflows/CI.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | push: 5 | branches: 6 | - develop 7 | pull_request: 8 | branches: 9 | - develop 10 | 11 | jobs: 12 | build-and-deploy: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v2 16 | - name: Install Dependencies 17 | run: npm install 18 | - name: Build Project 19 | run: npm run build 20 | -------------------------------------------------------------------------------- /.github/workflows/Changelog.yml: -------------------------------------------------------------------------------- 1 | name: Changelog 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | changelog: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Checkout repository 14 | uses: actions/checkout@v3 15 | 16 | - name: Generate Changelog 17 | id: changelog 18 | uses: conventional-changelog-action@v1 19 | with: 20 | github-token: ${{ secrets.GITHUB_TOKEN }} 21 | output-file: CHANGELOG.md 22 | preset: angular # You can choose a preset or configure your own 23 | 24 | - name: Create Release 25 | if: ${{ github.ref == 'refs/heads/main' && steps.changelog.outputs.changes != '' }} 26 | uses: actions/create-release@v1 27 | env: 28 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 29 | with: 30 | tag_name: ${{ github.sha }} 31 | release_name: Release ${{ github.sha }} 32 | body: | 33 | ### Changelog 34 | $(cat CHANGELOG.md) # Include the generated changelog here 35 | 36 | - name: Commit Changelog 37 | if: ${{ steps.changelog.outputs.changes != '' }} 38 | uses: EndBug/add-and-commit@v9 39 | with: 40 | author_name: "GitHub Actions" 41 | author_email: "actions@github.com" 42 | message: "Update changelog" 43 | -------------------------------------------------------------------------------- /.github/workflows/add-label-issues.yml: -------------------------------------------------------------------------------- 1 | name: Add Label to Issues 2 | 3 | on: 4 | issues: 5 | types: [opened] 6 | 7 | jobs: 8 | add-labels: 9 | runs-on: ubuntu-latest 10 | permissions: 11 | issues: write 12 | 13 | strategy: 14 | matrix: 15 | template: [bug_report.yml, feature.yml, doc.yml] 16 | 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@v3 20 | 21 | - name: Parse issue form 22 | uses: stefanbuck/github-issue-parser@v3 23 | id: issue-parser 24 | with: 25 | template-path: .github/ISSUE_TEMPLATE/${{ matrix.template }} 26 | 27 | - name: Add label to Issues based on policy 28 | uses: redhat-plumbers-in-action/advanced-issue-labeler@v2 29 | with: 30 | issue-form: ${{ steps.issue-parser.outputs.jsonString }} 31 | template: ${{ matrix.template }} 32 | token: ${{ secrets.GITHUB_TOKEN }} 33 | -------------------------------------------------------------------------------- /.github/workflows/add-label-prs.yml: -------------------------------------------------------------------------------- 1 | name: Add Labels to PRs 2 | 3 | on: 4 | pull_request_target: 5 | types: [opened] 6 | branches: 7 | - main 8 | - develop 9 | 10 | jobs: 11 | add-labels: 12 | if: false 13 | runs-on: ubuntu-latest 14 | permissions: 15 | pull-requests: write 16 | 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@v3 20 | 21 | - name: Add 'GrabSwagKit' Label to PRs 22 | uses: actions/github-script@v4 23 | with: 24 | github-token: ${{ secrets.GITHUB_TOKEN }} 25 | script: | 26 | const { owner, repo } = context.repo; 27 | const prNumber = context.payload.pull_request.number; 28 | const label = 'GrabS'; 29 | 30 | const addLabelParams = { 31 | owner: owner, 32 | repo: repo, 33 | issue_number: prNumber, 34 | labels: [label] 35 | }; 36 | 37 | await github.issues.addLabels(addLabelParams); 38 | 39 | console.log(`Added the 'GrabSwagKit' label to PR #${prNumber}.`); 40 | -------------------------------------------------------------------------------- /.github/workflows/close_old_issues.yaml: -------------------------------------------------------------------------------- 1 | name: Close Old Issues 2 | on: 3 | schedule: 4 | - cron: "0 0 * * *" 5 | 6 | jobs: 7 | close-issues: 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - name: Checkout Repository 12 | uses: actions/checkout@v2 13 | 14 | - name: Close Old Issues 15 | run: | 16 | open_issues=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ 17 | "https://api.github.com/repos/${{ github.repository }}/issues?state=open" \ 18 | | jq -r '.[] | .number') 19 | 20 | for issue in $open_issues; do 21 | # Get the last updated timestamp of the issue 22 | last_updated=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ 23 | "https://api.github.com/repos/${{ github.repository }}/issues/$issue" \ 24 | | jq -r '.updated_at') 25 | 26 | days_since_update=$(( ( $(date +%s) - $(date -d "$last_updated" +%s) ) / 86400 )) 27 | 28 | if [ $days_since_update -gt 45 ]; then 29 | curl -s -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ 30 | -H "Accept: application/vnd.github.v3+json" \ 31 | -d '{"state":"closed"}' \ 32 | "https://api.github.com/repos/${{ github.repository }}/issues/$issue" 33 | fi 34 | done 35 | -------------------------------------------------------------------------------- /.github/workflows/codeql.yml: -------------------------------------------------------------------------------- 1 | name: "CodeQL" 2 | 3 | on: 4 | push: 5 | branches: 6 | - "**" 7 | pull_request: 8 | branches: 9 | - "**" 10 | 11 | jobs: 12 | analyze: 13 | name: Analyze 14 | runs-on: ubuntu-latest 15 | timeout-minutes: 60 16 | permissions: 17 | actions: read 18 | contents: read 19 | security-events: write 20 | 21 | strategy: 22 | fail-fast: false 23 | matrix: 24 | language: ["javascript"] 25 | 26 | steps: 27 | - name: Checkout repository 28 | uses: actions/checkout@v3 29 | 30 | - name: Initialize CodeQL 31 | uses: github/codeql-action/init@v2 32 | with: 33 | languages: ${{ matrix.language }} 34 | 35 | - name: Autobuild 36 | uses: github/codeql-action/autobuild@v2 37 | 38 | - name: Perform CodeQL Analysis 39 | uses: github/codeql-action/analyze@v2 40 | with: 41 | category: "/language:${{ matrix.language }}" 42 | -------------------------------------------------------------------------------- /.github/workflows/comment-on-issues.yml: -------------------------------------------------------------------------------- 1 | name: Add Comment to Newly Open Issue 2 | 3 | on: 4 | issues: 5 | types: [opened] 6 | 7 | jobs: 8 | add-comment: 9 | runs-on: ubuntu-latest 10 | permissions: 11 | issues: write 12 | 13 | steps: 14 | - name: Checkout repository 15 | uses: actions/checkout@v3 16 | 17 | - name: Add Comment 18 | uses: actions/github-script@v4 19 | with: 20 | github-token: ${{ secrets.GITHUB_TOKEN }} 21 | script: | 22 | const { issue } = context.payload; 23 | const author = issue.user.login; 24 | const issueNumber = issue.number; 25 | const comment = `Hello @${author}! \n Thank you for raising this issue. \nPlease make sure to follow our [Contributing Guidelines.](https://github.com/anmode/grabtern-frontend/blob/develop/CONTRIBUTING.md) \nDon't forget to ⭐ our [Grabtern-Frontend.](https://github.com/anmode/grabtern-frontend)\n\nOur review team will carefully assess the issue and reach out to you soon!\n We appreciate your patience!`; 26 | const { owner, repo } = context.repo; 27 | 28 | await github.issues.createComment({ 29 | owner: owner, 30 | repo: repo, 31 | issue_number: issueNumber, 32 | body: comment 33 | }); 34 | 35 | console.log(`Comment added to the Issue #${issueNumber}.`); 36 | -------------------------------------------------------------------------------- /.github/workflows/comment-on-prs.yml: -------------------------------------------------------------------------------- 1 | name: Add Comment to Newly Open PRs 2 | 3 | on: 4 | pull_request_target: 5 | types: [opened] 6 | branches: 7 | - main 8 | - develop 9 | 10 | jobs: 11 | add-comment: 12 | runs-on: ubuntu-latest 13 | permissions: 14 | pull-requests: write 15 | 16 | steps: 17 | - name: Checkout repository 18 | uses: actions/checkout@v3 19 | 20 | - name: Add Comment 21 | uses: actions/github-script@v4 22 | with: 23 | github-token: ${{ secrets.GITHUB_TOKEN }} 24 | script: | 25 | const { pull_request } = context.payload; 26 | const author = pull_request.user.login; 27 | const prNumber = pull_request.number; 28 | const comment = `Thank you, @${author}, for creating this pull request and contributing to GitHub-ReadMe! \nOur review team will thoroughly review the pull request and will reach out to you soon! \nPlease make sure you have marked all the completed tasks as done.\nWe appreciate your patience and contribution!`; 29 | const { owner, repo } = context.repo; 30 | 31 | await github.issues.createComment({ 32 | owner: owner, 33 | repo: repo, 34 | issue_number: prNumber, 35 | body: comment 36 | }); 37 | 38 | console.log(`Comment added to the PR #${prNumber}.`); 39 | -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | name: Prettier Code Formatting 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - develop 8 | pull_request: 9 | branches: 10 | - main 11 | - develop 12 | 13 | jobs: 14 | prettier-lint: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: Checkout repository 18 | uses: actions/checkout@v3 19 | 20 | - name: Set up Node.js 21 | uses: actions/setup-node@v3 22 | with: 23 | node-version: "18" 24 | 25 | - name: Install dependencies 26 | run: npm install 27 | 28 | - name: Run prettier 29 | run: | 30 | npx prettier --check . 31 | prettier_exit_code=$? 32 | if [ $prettier_exit_code -ne 0 ]; then 33 | echo "Prettier check failed. Please run 'npx prettier --write .' to fix formatting issues." 34 | exit 1 35 | fi 36 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env 29 | .env.local 30 | .env.development.local 31 | .env.test.local 32 | .env.production.local 33 | 34 | 35 | # vercel 36 | .vercel 37 | 38 | package-lock.json 39 | yarn.lock 40 | 41 | # Public folder 42 | /public/sitemap-0.xml 43 | /public/sitemap.xml 44 | /public/robots.txt 45 | /public/fonts/ 46 | /public/img/ 47 | 48 | 49 | 50 | # Ignore all .log files 51 | *.log 52 | 53 | # Ignore all files with .tmp extension 54 | *.tmp 55 | *.map -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx --no -- commitlint --edit "$1" 5 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | /public/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env.local 30 | .env.development.local 31 | .env.test.local 32 | .env.production.local 33 | 34 | # vercel 35 | .vercel 36 | 37 | package-lock.json 38 | yarn.lock 39 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | We are committed to providing a friendly, inclusive, and safe environment for all participants in our project repository. This code of conduct outlines our expectations for behavior and ensures that everyone can collaborate in a positive and respectful manner. By participating in this project, you agree to abide by this code of conduct. 4 | 5 | ## 1. Be Respectful and Inclusive 6 | 7 | Treat all participants with respect and courtesy, regardless of their race, ethnicity, nationality, gender identity, sexual orientation, age, disability, religion, or any other personal characteristics. Create an inclusive and welcoming environment for everyone to contribute. 8 | 9 | ## 2. Foster a Collaborative Atmosphere 10 | 11 | Encourage open and constructive discussions. Be receptive to different ideas and perspectives. Avoid personal attacks, harassment, or any form of offensive or derogatory language or behavior. 12 | 13 | ## 3. Be Mindful of Language and Tone 14 | 15 | Use clear and inclusive language when communicating in discussions, comments, and documentation. Be mindful of how your words may be perceived by others. Refrain from using offensive, discriminatory, or inflammatory language. 16 | 17 | ## 4. Exercise Empathy and Understanding 18 | 19 | Take into account that participants may have different backgrounds and experiences. Be considerate and understanding when communicating with others. If a misunderstanding occurs, seek to resolve it in a peaceful and respectful manner. 20 | 21 | ## 5. Respect Privacy and Confidentiality 22 | 23 | Respect the privacy and confidentiality of others. Do not share personal information without consent. Be cautious when handling sensitive data and ensure compliance with relevant privacy laws and regulations. 24 | 25 | ## 6. Report Incidents 26 | 27 | If you witness or experience any behavior that violates this code of conduct, promptly report it to the project maintainers or administrators. Provide as much detail as possible to help in the investigation. All reports will be handled confidentially and with discretion. 28 | 29 | ## 7. Enforcement 30 | 31 | Violation of this code of conduct may result in temporary or permanent restrictions on participation in the project repository. Project maintainers and administrators reserve the right to enforce this code of conduct and take appropriate actions to address any misconduct or breaches of conduct. 32 | 33 | ## 8. Acknowledgment 34 | 35 | We value and appreciate everyone's contributions to our project repository. By following this code of conduct, we can create a supportive and inclusive environment where collaboration and growth thrive. 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Anmol Agrawal 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ["@commitlint/config-conventional"], 3 | }; 4 | -------------------------------------------------------------------------------- /components/Community/CommunityCard.jsx: -------------------------------------------------------------------------------- 1 | // CommunityCard.js 2 | 3 | import React from "react"; 4 | import { ProfileCard } from "../UI"; 5 | 6 | const CommunityCard = ({ image, name, description, commits }) => { 7 | const role = name === "anmode" ? "Project Admin" : "Contributor"; 8 | const commitsUrl = `https://github.com/anmode/grabtern-frontend/commits?author=${name}`; 9 | 10 | return ( 11 | 16 | {role} 17 |
18 | Commits:{" "} 19 | 20 | {commits} 21 | 22 | 23 | } 24 | intent="bg" 25 | size="lg" 26 | direction="col" 27 | rounded="lg" 28 | align="center" 29 | >
30 | ); 31 | }; 32 | 33 | export default CommunityCard; 34 | -------------------------------------------------------------------------------- /components/DarkModeToggle/DarkModeToggle.jsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import React, { useContext } from "react"; 4 | import { ThemeContext } from "../../context/ThemeContext"; 5 | import { SunIcon } from "@heroicons/react/24/solid"; 6 | import { MoonIcon } from "@heroicons/react/24/solid"; 7 | 8 | const DarkModeToggle = () => { 9 | const { toggle, mode } = useContext(ThemeContext); 10 | return ( 11 | 22 | ); 23 | }; 24 | 25 | export default DarkModeToggle; 26 | -------------------------------------------------------------------------------- /components/GalleryCard.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Image from "next/image"; 3 | import styles from "../styles/hackathon.module.css"; 4 | 5 | function GalleryCard({ 6 | hackathonImage, 7 | hackathonImageAlt, 8 | hackathonLink, 9 | hackathonTitle, 10 | isInternship = false, 11 | internshipImage, 12 | internshipImageAlt, 13 | internshipTitle, 14 | internshipLink, 15 | }) { 16 | return ( 17 |
18 |
19 |
20 | {isInternship 26 |
27 |
28 |

29 | 33 | {isInternship ? internshipTitle : hackathonTitle} 34 | 35 |

36 |
37 |
38 |
39 |
40 |
41 | ); 42 | } 43 | 44 | export default GalleryCard; 45 | -------------------------------------------------------------------------------- /components/MentorRegistration/components/Card.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | function Card({ rows, removeCard, index }) { 4 | return ( 5 |
6 |
7 | {rows.map((row, index) => ( 8 |
9 | {Object.keys(row).map((key, index) => ( 10 |

11 | {key}: {row[key]} 12 |

13 | ))} 14 |
15 | ))} 16 |
17 | 20 |
21 | ); 22 | } 23 | 24 | export default Card; 25 | -------------------------------------------------------------------------------- /components/MentorRegistration/components/ContactDetails.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Input from "./Input"; 3 | 4 | function ContactDetails({ 5 | formData, 6 | handleChange, 7 | handleSocialChange, 8 | validator, 9 | }) { 10 | const inputs = [ 11 | { 12 | label: "intern", 13 | type: "text", 14 | name: "internAt", 15 | id: "internAt", 16 | className: "mentorFormInput", 17 | onChange: handleChange, 18 | placeholder: "e.g. MITACS", 19 | required: true, 20 | value: formData.internAt, 21 | validator: validator, 22 | validation: "required|alpha_num_dash_space", 23 | }, 24 | { 25 | label: "current status", 26 | type: "text", 27 | name: "currentStatus", 28 | id: "currentStatus", 29 | className: "mentorFormInput", 30 | onChange: handleChange, 31 | placeholder: "e.g. Amazon SDE-I", 32 | required: true, 33 | value: formData.currentStatus, 34 | validator: validator, 35 | validation: "required|alpha_num_dash_space", 36 | }, 37 | { 38 | label: "linkedIn Username", 39 | type: "text", 40 | name: "linkedin", 41 | id: "linkedin", 42 | className: "mentorFormInput", 43 | onChange: handleSocialChange, 44 | placeholder: "peter-parker-001", 45 | required: true, 46 | pattern: "https://www.linkedin.com/in/*", 47 | value: formData.social.linkedin, 48 | validator: validator, 49 | validation: [ 50 | "required", 51 | "alpha_num_dash", 52 | "min:3", 53 | "max:100", 54 | { 55 | regex: "[a-z, A-Z]+[0-9,a-z,A-Z,-]*", 56 | }, 57 | ], 58 | }, 59 | { 60 | label: "twitter Username", 61 | type: "text", 62 | name: "twitter", 63 | id: "twitter", 64 | className: "mentorFormInput", 65 | onChange: handleSocialChange, 66 | placeholder: "e.g. peter_parker", 67 | required: true, 68 | pattern: "https://twitter.com/*", 69 | value: formData.social.twitter, 70 | validator: validator, 71 | validation: [ 72 | "required", 73 | "min:1", 74 | "max:15", 75 | { 76 | regex: "[0-9,a-z,A-Z,_]*", 77 | }, 78 | ], 79 | }, 80 | ]; 81 | return ( 82 | <> 83 |

Tell us about your Experience

84 | {inputs.map((input, index) => ( 85 | 86 | ))} 87 | 88 | ); 89 | } 90 | 91 | export default ContactDetails; 92 | -------------------------------------------------------------------------------- /components/MentorRegistration/services/userAvailabilityService.js.js: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | 3 | export async function checkUserNameAvailability(userName) { 4 | try { 5 | const value = userName.trim(); 6 | 7 | if (value) { 8 | await axios.get( 9 | `${process.env.NEXT_PUBLIC_BACKEND_URL}/api/mentor?username=${value}`, 10 | ); 11 | return { status: true, message: "User name is available" }; 12 | } else { 13 | return { status: false, message: "Enter a valid value" }; 14 | } 15 | } catch (error) { 16 | if (error.response && error.response.data && error.response.data.message) { 17 | return { status: false, message: error.response.data.message }; 18 | } else { 19 | return { status: false, message: "An error occurred" }; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /components/UI/Button/Button.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import styles from "./Button.module.css"; 3 | 4 | function Button({ 5 | text, 6 | LeftIcon, 7 | variant = "Primary", 8 | className, 9 | type = "button", 10 | onClick, 11 | }) { 12 | let variantClass = `btn${variant.charAt(0).toUpperCase()}${variant.slice(1)}`; 13 | 14 | return ( 15 | 25 | ); 26 | } 27 | 28 | export default Button; 29 | -------------------------------------------------------------------------------- /components/UI/Button/Button.module.css: -------------------------------------------------------------------------------- 1 | .btn { 2 | @apply tw-px-6 tw-py-2 tw-font-sans tw-bg-primary-100 tw-text-[white] tw-rounded-lg tw-shadow-md tw-capitalize tw-cursor-pointer; 3 | } 4 | .btn:hover { 5 | @apply tw-scale-[0.99]; 6 | } 7 | .btn:active { 8 | @apply tw-scale-[1.01] tw-shadow-none; 9 | } 10 | .btnPrimary { 11 | @apply tw-bg-primary-100 tw-text-[white]; 12 | } 13 | .btnSecondary { 14 | @apply tw-bg-base-300 tw-text-base-400; 15 | } 16 | -------------------------------------------------------------------------------- /components/UI/Button/Switch.js: -------------------------------------------------------------------------------- 1 | import clsx from "clsx"; 2 | 3 | function Switch({ checked, onChange }) { 4 | // function for toggling button 5 | const toggle = () => { 6 | onChange(); 7 | }; 8 | 9 | return ( 10 |
18 |
26 |
27 | ); 28 | } 29 | 30 | export default Switch; 31 | -------------------------------------------------------------------------------- /components/UI/Button/button.test.js: -------------------------------------------------------------------------------- 1 | import "@testing-library/jest-dom/extend-expect"; 2 | import React from "react"; 3 | import { render, fireEvent } from "@testing-library/react"; 4 | import Button from "./Button"; 5 | 6 | // Test the Button component 7 | describe("Button component", () => { 8 | // Test button click event 9 | it("should call onClick when the button is clicked", () => { 10 | const onClickMock = jest.fn(); 11 | const { getByText } = render( 12 | 15 | ); 16 | }; 17 | 18 | export default GoogleBtn; 19 | -------------------------------------------------------------------------------- /components/UI/GoogleBtn/GoogleBtn.module.css: -------------------------------------------------------------------------------- 1 | .loginWithGoogleBtn { 2 | transition: 3 | background-color 0.3s, 4 | box-shadow 0.3s; 5 | padding: 12px 16px 12px 42px; 6 | border: none; 7 | border-radius: 3px; 8 | box-shadow: 9 | 0 -1px 0 rgba(0, 0, 0, 0.04), 10 | 0 1px 1px rgba(0, 0, 0, 0.25); 11 | color: #757575; 12 | font-size: 14px; 13 | font-weight: 500; 14 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, 15 | Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; 16 | background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTcuNiA5LjJsLS4xLTEuOEg5djMuNGg0LjhDMTMuNiAxMiAxMyAxMyAxMiAxMy42djIuMmgzYTguOCA4LjggMCAwIDAgMi42LTYuNnoiIGZpbGw9IiM0Mjg1RjQiIGZpbGwtcnVsZT0ibm9uemVybyIvPjxwYXRoIGQ9Ik05IDE4YzIuNCAwIDQuNS0uOCA2LTIuMmwtMy0yLjJhNS40IDUuNCAwIDAgMS04LTIuOUgxVjEzYTkgOSAwIDAgMCA4IDV6IiBmaWxsPSIjMzRBODUzIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48cGF0aCBkPSJNNCAxMC43YTUuNCA1LjQgMCAwIDEgMC0zLjRWNUgxYTkgOSAwIDAgMCAwIDhsMy0yLjN6IiBmaWxsPSIjRkJCQzA1IiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48cGF0aCBkPSJNOSAzLjZjMS4zIDAgMi41LjQgMy40IDEuM0wxNSAyLjNBOSA5IDAgMCAwIDEgNWwzIDIuNGE1LjQgNS40IDAgMCAxIDUtMy43eiIgZmlsbD0iI0VBNDMzNSIgZmlsbC1ydWxlPSJub256ZXJvIi8+PHBhdGggZD0iTTAgMGgxOHYxOEgweiIvPjwvZz48L3N2Zz4=); 17 | background-color: white; 18 | background-repeat: no-repeat; 19 | background-position: 12px 11px; 20 | } 21 | 22 | .loginWithGoogleBtn:hover { 23 | box-shadow: 24 | 0 -1px 0 rgba(0, 0, 0, 0.04), 25 | 0 2px 4px rgba(0, 0, 0, 0.25); 26 | } 27 | 28 | .loginWithGoogleBtn:active { 29 | background-color: #eeeeee; 30 | } 31 | 32 | .loginWithGoogleBtn:focus { 33 | outline: none; 34 | box-shadow: 35 | 0 -1px 0 rgba(0, 0, 0, 0.04), 36 | 0 2px 4px rgba(0, 0, 0, 0.25), 37 | 0 0 0 3px #c8dafc; 38 | } 39 | 40 | .loginWithGoogleBtn:disabled { 41 | filter: grayscale(100%); 42 | background-color: #ebebeb; 43 | box-shadow: 44 | 0 -1px 0 rgba(0, 0, 0, 0.04), 45 | 0 1px 1px rgba(0, 0, 0, 0.25); 46 | cursor: not-allowed; 47 | } 48 | -------------------------------------------------------------------------------- /components/UI/Links/ButtonLink.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Link from "next/link"; 3 | import clsx from "clsx"; 4 | import styles from "./Link.module.css"; 5 | 6 | function ButtonLink({ 7 | text, 8 | href, 9 | className = "", 10 | variant = "Primary", 11 | size = "normal", 12 | }) { 13 | let variantClass = `link${variant.charAt(0).toUpperCase()}${variant.slice( 14 | 1, 15 | )}`; 16 | return ( 17 | 26 | {text} 27 | 28 | ); 29 | } 30 | 31 | export default ButtonLink; 32 | -------------------------------------------------------------------------------- /components/UI/Links/IconLink.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Link from "next/link"; 3 | import styles from "./Link.module.css"; 4 | 5 | function IconLink({ Icon, href, className = "", variant = "Primary" }) { 6 | let variantClass = `link${variant.charAt(0).toUpperCase()}${variant.slice( 7 | 1, 8 | )}`; 9 | return ( 10 |
11 | 15 | 16 | 17 |
18 | ); 19 | } 20 | 21 | export default IconLink; 22 | -------------------------------------------------------------------------------- /components/UI/Links/Link.module.css: -------------------------------------------------------------------------------- 1 | /* button style link */ 2 | .linkBtn { 3 | @apply tw-font-sans tw-px-5 tw-py-3 tw-rounded-xl tw-leading-5 tw-bg-primary-100 tw-text-[white]; 4 | } 5 | /* icon style link */ 6 | .linkIcon { 7 | @apply tw-w-[35px] tw-h-[35px] tw-text-xl tw-rounded-full tw-bg-primary-100 tw-text-[white] tw-inline-flex tw-justify-center tw-items-center; 8 | } 9 | /* primary variant */ 10 | .linkPrimary { 11 | @apply tw-bg-primary-100 tw-text-[white]; 12 | } 13 | .linkPrimary:hover { 14 | @apply tw-bg-primary-200; 15 | } 16 | /* outline variant */ 17 | .linkOutline { 18 | @apply tw-bg-[transparent] tw-text-primary-100 tw-border-[1px] tw-border-primary-100; 19 | } 20 | .linkOutline:hover { 21 | @apply tw-bg-primary-100 tw-text-[white]; 22 | } 23 | /* secondary variant */ 24 | .linkSecondary { 25 | @apply tw-text-base-400 tw-bg-[transparent]; 26 | } 27 | .linkSecondary:hover { 28 | @apply tw-bg-base-300 tw-text-base-400; 29 | } 30 | /* text style link*/ 31 | .linkText { 32 | @apply tw-text-primary-100 tw-text-sm tw-inline-flex tw-items-center tw-gap-4; 33 | } 34 | .linkText:hover { 35 | @apply tw-text-primary-50 tw-gap-6; 36 | } 37 | -------------------------------------------------------------------------------- /components/UI/Links/TextLink.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Link from "next/link"; 3 | import styles from "./Link.module.css"; 4 | import { BsArrowRight } from "react-icons/bs"; 5 | 6 | function TextLink({ text, href, className = "", arrow = false }) { 7 | return ( 8 | 9 | {text} 10 | {arrow && } 11 | 12 | ); 13 | } 14 | 15 | export default TextLink; 16 | -------------------------------------------------------------------------------- /components/UI/Loader.js: -------------------------------------------------------------------------------- 1 | import clsx from "clsx"; 2 | import React, { useEffect } from "react"; 3 | 4 | function Loader({ width = "25px", className = "" }) { 5 | return ( 6 | //place the image of the div 7 |
10 | loading... 11 |
12 | ); 13 | } 14 | 15 | export default Loader; 16 | -------------------------------------------------------------------------------- /components/UI/MainLoader.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { FaSpinner } from "react-icons/fa"; 3 | 4 | const MainLoader = () => { 5 | return ( 6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | 15 |
16 |
17 |
18 |
19 |
20 |
21 | ); 22 | }; 23 | 24 | const styles = { 25 | newPreloaderContainer: { 26 | position: "fixed", 27 | top: 0, 28 | left: 0, 29 | width: "100%", 30 | height: "100%", 31 | backgroundColor: "rgba(0, 0, 0, 0.5)", 32 | zIndex: 1000, 33 | }, 34 | newLoaderBackground: { 35 | position: "absolute", 36 | width: "100%", 37 | height: "100%", 38 | backgroundColor: "transparent", 39 | }, 40 | newPreloaderActive: { 41 | display: "flex", 42 | alignItems: "center", 43 | justifyContent: "center", 44 | height: "100%", 45 | }, 46 | newPreloader: { 47 | display: "flex", 48 | alignItems: "center", 49 | justifyContent: "center", 50 | }, 51 | newPreloaderInner: { 52 | display: "flex", 53 | alignItems: "center", 54 | justifyContent: "center", 55 | position: "relative", 56 | }, 57 | newPreloaderCircle: { 58 | width: "100px", 59 | height: "100px", 60 | border: "5px solid #f0f0f0", 61 | borderTop: "5px solid #6a0dad", 62 | borderRadius: "50%", 63 | animation: "spin 1s linear infinite", 64 | }, 65 | newPreloaderImg: { 66 | position: "absolute", 67 | }, 68 | newImgWrapper: { 69 | display: "flex", 70 | alignItems: "center", 71 | justifyContent: "center", 72 | position: "absolute", 73 | top: "0", 74 | left: "0", 75 | width: "100%", 76 | height: "100%", 77 | }, 78 | spinnerIcon: { 79 | fontSize: "50px", 80 | color: "#6a0dad", 81 | animation: "spin 1.5s linear infinite", 82 | }, 83 | }; 84 | 85 | const spinAnimation = ` 86 | @keyframes spin { 87 | 0% { transform: rotate(0deg); } 88 | 100% { transform: rotate(360deg); } 89 | } 90 | `; 91 | 92 | const styleSheet = document.styleSheets[0]; 93 | styleSheet.insertRule(spinAnimation, styleSheet.cssRules.length); 94 | 95 | export default MainLoader; -------------------------------------------------------------------------------- /components/UI/Section/Section.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import clsx from "clsx"; 3 | import SectionHeader from "./SectionHeader"; 4 | 5 | function Section({ 6 | className, 7 | divClassName, 8 | kicker, 9 | heading, 10 | subheading, 11 | children, 12 | align = "left", 13 | direction = "col", 14 | }) { 15 | return ( 16 |
17 |
27 | {/* column */} 28 |
35 | {/* header */} 36 | 46 | {/* content under header */} 47 | {children && children.length > 1 ? children[0] : children} 48 |
49 | {/* column */} 50 |
57 | {children && children.length > 1 && children[1]} 58 |
59 |
60 |
61 | ); 62 | } 63 | 64 | export default Section; 65 | -------------------------------------------------------------------------------- /components/UI/Section/SectionHeader.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | function SectionHeader({ kicker, heading, subheading, className }) { 4 | return ( 5 |
6 | {kicker && ( 7 |

8 | {kicker} 9 |

10 | )} 11 | {heading && ( 12 |

13 | {heading} 14 |

15 | )} 16 | {subheading &&

{subheading}

} 17 |
18 | ); 19 | } 20 | 21 | export default SectionHeader; 22 | -------------------------------------------------------------------------------- /components/UI/index.js: -------------------------------------------------------------------------------- 1 | import Button from "./Button/Button"; 2 | import Switch from "./Button/Switch"; 3 | import IconCard from "./Card/IconCard"; 4 | import ImageCard from "./Card/ImageCard"; 5 | import ProfileCard from "./Card/ProfileCard"; 6 | import Input from "./Form/Input"; 7 | import ButtonLink from "./Links/ButtonLink"; 8 | import IconLink from "./Links/IconLink"; 9 | import TextLink from "./Links/TextLink"; 10 | import Section from "./Section/Section"; 11 | import SectionHeader from "./Section/SectionHeader"; 12 | 13 | export { 14 | Button, 15 | Switch, 16 | IconCard, 17 | ImageCard, 18 | ProfileCard, 19 | Input, 20 | ButtonLink, 21 | IconLink, 22 | TextLink, 23 | Section, 24 | SectionHeader, 25 | }; 26 | -------------------------------------------------------------------------------- /components/basic/Alertbox.js: -------------------------------------------------------------------------------- 1 | import { React, useState, useEffect } from "react"; 2 | import { AiFillCheckCircle } from "react-icons/ai"; 3 | const AlertBox = ({ message, redirectTo, color }) => { 4 | const [progress, setProgress] = useState(100); 5 | 6 | useEffect(() => { 7 | const interval = setInterval(() => { 8 | if (progress > 0) { 9 | setProgress((prevProgress) => prevProgress - 10); 10 | } else { 11 | clearInterval(interval); 12 | } 13 | if (progress === 0) { 14 | clearInterval(interval); 15 | window.location.href = redirectTo; 16 | } 17 | }, 100); 18 | 19 | return () => clearInterval(interval); 20 | }, [progress]); 21 | 22 | return ( 23 | <> 24 |
25 |
26 |
27 | 28 |
29 |
30 |

{message}

31 |
32 |
36 |
37 |
38 | 39 | ); 40 | }; 41 | 42 | export default AlertBox; 43 | -------------------------------------------------------------------------------- /components/basic/Input.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const Input = ({ 4 | label, 5 | type, 6 | name, 7 | placeholder, 8 | handleChange, 9 | value, 10 | validator, 11 | validation, 12 | element, 13 | ...rest 14 | }) => { 15 | return ( 16 |
17 | 20 | {element == "textarea" ? ( 21 |