├── .env.example ├── .eslintrc.cjs ├── .github ├── ISSUE_TEMPLATE │ ├── .github │ │ └── ISSUE_TEMPLATE │ │ │ └── documentation-update.yml │ ├── bug_report.yml │ ├── custom.md │ ├── documentation-update.yml │ └── feature_request.yml ├── pull_request_template.md └── workflows │ ├── issue-open-close.yml │ ├── pr-checker.yml │ ├── pr-merge.yml │ └── pr-raise.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── Project Structure.md ├── README.md ├── SECURITY.md ├── components.json ├── context └── blogContext.jsx ├── diet-recommendation-api └── app.py ├── generate-sitemap.js ├── index.html ├── netlify.toml ├── package.json ├── postcss.config.js ├── public ├── robot.png ├── robots.txt ├── sitemap.xml └── vite.svg ├── server ├── .env.example ├── app.js ├── controller │ └── newsletterController.js ├── models │ └── Newsletter.js ├── package.json ├── routes │ └── newsletterRoute.js ├── sendSuscribedMail.js └── utils │ └── db.js ├── src ├── App.css ├── App.jsx ├── assets │ ├── Exercise Video Guides_ 1500+ Exercises with Instructions & Tips.zip │ ├── Loader.png │ ├── ReadMeAssests │ │ ├── readme_Icons │ │ │ ├── firebase.svg │ │ │ ├── materialui.svg │ │ │ ├── react.svg │ │ │ └── vite.svg │ │ └── screenShorts │ │ │ ├── GSSoC-Ext.png │ │ │ ├── Hacktoberfest.png │ │ │ ├── Homepage.png │ │ │ ├── flexPlan.png │ │ │ ├── trackProgress.png │ │ │ ├── upperbody.png │ │ │ └── yoga.png │ ├── about │ │ ├── mission.png │ │ └── vision.png │ ├── exercise │ │ ├── arms │ │ │ ├── biceps.jpeg │ │ │ ├── forearms.jpeg │ │ │ ├── palmarfacsia.jpeg │ │ │ ├── shoulders.jpeg │ │ │ └── triceps.jpeg │ │ ├── lower body │ │ │ ├── abductors.jpeg │ │ │ ├── adductors.jpeg │ │ │ ├── calves.jpeg │ │ │ ├── glutes.jpeg │ │ │ ├── hamstrings.jpeg │ │ │ ├── hipflexors.jpeg │ │ │ ├── itband.jpeg │ │ │ ├── plantarfascia.jpeg │ │ │ └── quads.jpeg │ │ └── upper body │ │ │ ├── abs.jpeg │ │ │ ├── chest.jpeg │ │ │ ├── lats.jpeg │ │ │ ├── lowerback.jpeg │ │ │ ├── neck.jpeg │ │ │ ├── obliques.jpeg │ │ │ ├── shoulders.jpeg │ │ │ ├── traps.jpeg │ │ │ └── upperback.jpeg │ ├── fitness1.png │ ├── fitness2.png │ ├── health │ │ ├── balanced-diet.jpg │ │ ├── exercise.jpg │ │ ├── mental-health.jpg │ │ ├── mix-up-routine.jpg │ │ ├── posture.jpg │ │ ├── rest-recovery.jpg │ │ ├── strength-training.jpg │ │ ├── warmup-cooldown.jpg │ │ └── water-hydration.jpg │ ├── home │ │ ├── LoginImg.jpg │ │ ├── banner2_1.jpg │ │ ├── biceps.webp │ │ ├── flexible.jpg │ │ ├── getinshape.jpg │ │ ├── hardworkout.jpg │ │ ├── homeImg1.jpg │ │ ├── homeImg2.avif │ │ ├── homeImg3.jpg │ │ └── homeImg4.jpg │ ├── img │ │ ├── Food_Diet_Bg.png │ │ ├── Loader.gif │ │ ├── ben.jpg │ │ ├── car.jpg │ │ ├── customer-1.jpg │ │ ├── customer-2.jpg │ │ ├── customer-3.jpg │ │ ├── customer-4.jpg │ │ ├── customer-5.jpg │ │ ├── customer-6.jpg │ │ ├── dave.jpg │ │ ├── dog.jpg │ │ ├── github.png │ │ ├── gmail.png │ │ ├── hannah.jpg │ │ ├── linkedin.png │ │ ├── mountain.jpg │ │ ├── steve.jpg │ │ ├── telephone.png │ │ ├── trackerbg2.jpg │ │ └── whatsapp.png │ └── react.svg ├── components │ ├── BacktoTop.jsx │ ├── Contributor.jsx │ ├── CounterCard.jsx │ ├── DietRecommendation.jsx │ ├── ExerciseCard.jsx │ ├── FAQ.jsx │ ├── FItFlexChatBot.jsx │ ├── Footer.jsx │ ├── GoogleTranslate.jsx │ ├── HomeSlider.jsx │ ├── Loader.jsx │ ├── Navbar.jsx │ ├── PlansCard.jsx │ ├── PlansCard2.jsx │ ├── ProgressBar.jsx │ ├── Subscribe.jsx │ ├── SuccessStories.jsx │ ├── TeamCarousel.jsx │ ├── Tracker.jsx │ ├── healthtips.jsx │ ├── imageupload.jsx │ ├── navbar.css │ ├── sheet.jsx │ └── ui │ │ ├── button.tsx │ │ └── sheet.tsx ├── context │ └── Firebase.jsx ├── data │ ├── FAQ.js │ ├── cardio.json │ ├── muscle builder plans │ │ ├── abs.json │ │ ├── biceps.json │ │ ├── chest.json │ │ └── neck.json │ ├── musclebuilder.json │ ├── plans.json │ └── yoga.json ├── fonts │ ├── EdgeOfTheGalaxyItalic-ZVJB3.otf │ ├── EdgeOfTheGalaxyPoster-3zRAp.otf │ ├── EdgeOfTheGalaxyPosterItalic-x3o1m.otf │ ├── EdgeOfTheGalaxyRegular-OVEa6.otf │ ├── Excludeditalic-jEr99.ttf │ └── index.css ├── index.css ├── lib │ └── utils.ts ├── main.jsx ├── metadata.jsx ├── root.jsx ├── styles │ ├── BacktoTop.css │ ├── Contributors.css │ ├── DietRecommendation.css │ ├── ProgressBar.css │ ├── Services.css │ ├── SuccessStories.css │ ├── about.css │ ├── blog.css │ ├── blogs.css │ ├── contributor.css │ └── shared.css └── views │ ├── About.jsx │ ├── Blog.jsx │ ├── Contact.jsx │ ├── Contributors.jsx │ ├── ForgotPassword.jsx │ ├── Home.jsx │ ├── Login.jsx │ ├── NotFound.jsx │ ├── Plans.jsx │ ├── PrivacyPolicy.jsx │ ├── Profile.jsx │ ├── Register.jsx │ ├── Services.jsx │ ├── Terms.jsx │ ├── Workout.jsx │ └── uploadBlog.jsx ├── stargazers ├── .eslintrc ├── .gitignore ├── .prettierrc ├── package.json ├── remotion.config.ts ├── src │ ├── Content.tsx │ ├── Main.tsx │ ├── Root.tsx │ ├── cache.ts │ ├── fetch │ │ ├── fetch-data.ts │ │ ├── via-graphql.ts │ │ └── via-rest.ts │ ├── gh-styles.css │ ├── index.ts │ ├── repo-header.tsx │ ├── utils.ts │ └── wait-for-no-input.ts └── tsconfig.json ├── tailwind.config.js ├── tsconfig.app.json ├── tsconfig.json ├── tsconfig.node.json └── vite.config.js /.env.example: -------------------------------------------------------------------------------- 1 | 2 | VITE_emailJS_serviceID="service_amby2k1" 3 | VITE_emailJS_templateID="template_wff9r1s" 4 | VITE_emailJS_publicKey="F71IFcCXLyuz5uvXM" 5 | 6 | VITE_CLOUDINARY_CLOUD_NAME="" 7 | VITE_CLOUDINARY_CLOUD_PRESET="" 8 | 9 | -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { browser: true, es2020: true }, 4 | extends: [ 5 | 'eslint:recommended', 6 | 'plugin:react/recommended', 7 | 'plugin:react/jsx-runtime', 8 | 'plugin:react-hooks/recommended', 9 | ], 10 | ignorePatterns: ['dist', '.eslintrc.cjs'], 11 | parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, 12 | settings: { react: { version: '18.2' } }, 13 | plugins: ['react-refresh'], 14 | rules: { 15 | 'react/jsx-no-target-blank': 'off', 16 | 'react-refresh/only-export-components': [ 17 | 'warn', 18 | { allowConstantExport: true }, 19 | ], 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/.github/ISSUE_TEMPLATE/documentation-update.yml: -------------------------------------------------------------------------------- 1 | name: 📝 Documentation Update 2 | description: Improve Documentation 3 | title: "[Documentation Update]: " 4 | labels: 'enhancement' 5 | body: 6 | - type: checkboxes 7 | id: existing-issue 8 | attributes: 9 | label: Is there an existing issue for this? 10 | description: Please search to see if an issue already exists for the updates you want to make. 11 | options: 12 | - label: I have searched the existing issues 13 | required: true 14 | - type: textarea 15 | id: issue-description 16 | attributes: 17 | label: Issue Description 18 | description: Please provide a clear description of the documentation update you are suggesting. 19 | placeholder: Describe the improvement or correction you'd like to see in the documentation. 20 | validations: 21 | required: true 22 | - type: textarea 23 | id: suggested-change 24 | attributes: 25 | label: Suggested Change 26 | description: Provide details of the proposed change to the documentation. 27 | placeholder: Explain how the documentation should be updated or corrected. 28 | validations: 29 | required: true 30 | - type: textarea 31 | id: rationale 32 | attributes: 33 | label: Rationale 34 | description: Why is this documentation update necessary or beneficial? 35 | placeholder: Explain the importance or reasoning behind the suggested change. 36 | validations: 37 | required: False 38 | - type: dropdown 39 | id: urgency 40 | attributes: 41 | label: Urgency 42 | description: How urgently do you believe this documentation update is needed? 43 | options: 44 | - High 45 | - Medium 46 | - Low 47 | default: 0 48 | validations: 49 | required: true 50 | - type: checkboxes 51 | id: terms 52 | attributes: 53 | label: Record 54 | options: 55 | - label: "I have read the Contributing Guidelines" 56 | required: true 57 | - label: "I'm a GSSOC-EXT contributor" 58 | required: false 59 | - label: "I'm a HACKTOBERFEST contributor" 60 | required: false 61 | - label: "I have starred the repository" 62 | required: true 63 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Bug report 🐞 3 | description: File a bug report 4 | title: "[Bug]: " 5 | labels: bug 6 | body: 7 | - type: checkboxes 8 | id: existing-issue 9 | attributes: 10 | label: Is there an existing issue for this? 11 | description: Please search to see if an issue already exists for the bug you encountered. 12 | options: 13 | - label: I have searched the existing issues 14 | required: true 15 | - type: textarea 16 | id: what-happened 17 | attributes: 18 | label: Describe the bug 19 | description: A concise description of what you are experiencing. 20 | placeholder: Tell us what you see! 21 | validations: 22 | required: true 23 | - type: textarea 24 | id: expected-behaviour 25 | attributes: 26 | label: Expected behavior 27 | description: A clear and concise description of what you expected to happen. 28 | validations: 29 | required: true 30 | - type: textarea 31 | id: screenshots 32 | attributes: 33 | label: Add ScreenShots 34 | description: Add sufficient ScreenShots to explain your issue. 35 | - type: dropdown 36 | id: devices 37 | attributes: 38 | label: On which device are you experiencing this bug? 39 | multiple: true 40 | options: 41 | - Android 42 | - iPhone 43 | - Linux 44 | - Chrome 45 | - Windows 46 | - type: checkboxes 47 | id: terms 48 | attributes: 49 | label: Record 50 | options: 51 | - label: "I have read the Contributing Guidelines" 52 | required: true 53 | - label: "I'm a GSSOC-EXT contributor" 54 | required: False 55 | - label: "I'm a HACKTOBERFEST contributor" 56 | required: False 57 | - label: "I have starred the repository" 58 | required: true 59 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Contributor Information** 11 | Please check if you are a contributor from: 12 | - [ ] GSSoC-ext 13 | - [ ] Hacktoberfest 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation-update.yml: -------------------------------------------------------------------------------- 1 | name: 📝 Documentation Update 2 | description: Improve Documentation 3 | title: "[Documentation Update]: " 4 | labels: 'enhancement' 5 | body: 6 | - type: checkboxes 7 | id: existing-issue 8 | attributes: 9 | label: Is there an existing issue for this? 10 | description: Please search to see if an issue already exists for the updates you want to make. 11 | options: 12 | - label: I have searched the existing issues 13 | required: true 14 | - type: textarea 15 | id: issue-description 16 | attributes: 17 | label: Issue Description 18 | description: Please provide a clear description of the documentation update you are suggesting. 19 | placeholder: Describe the improvement or correction you'd like to see in the documentation. 20 | validations: 21 | required: true 22 | - type: textarea 23 | id: suggested-change 24 | attributes: 25 | label: Suggested Change 26 | description: Provide details of the proposed change to the documentation. 27 | placeholder: Explain how the documentation should be updated or corrected. 28 | validations: 29 | required: true 30 | - type: textarea 31 | id: rationale 32 | attributes: 33 | label: Rationale 34 | description: Why is this documentation update necessary or beneficial? 35 | placeholder: Explain the importance or reasoning behind the suggested change. 36 | validations: 37 | required: False 38 | - type: dropdown 39 | id: urgency 40 | attributes: 41 | label: Urgency 42 | description: How urgently do you believe this documentation update is needed? 43 | options: 44 | - High 45 | - Medium 46 | - Low 47 | default: 0 48 | validations: 49 | required: true 50 | - type: checkboxes 51 | id: terms 52 | attributes: 53 | label: Record 54 | options: 55 | - label: "I have read the Contributing Guidelines" 56 | required: true 57 | - label: "I'm a GSSOC-EXT contributor" 58 | required: false 59 | - label: "I'm a HACKTOBERFEST contributor" 60 | required: false 61 | - label: "I have starred the repository" 62 | required: true 63 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: ✨ Feature Request 2 | description: Suggest a feature 3 | title: "[Feature Request]: " 4 | labels: enhancement 5 | body: 6 | - type: checkboxes 7 | id: existing-issue 8 | attributes: 9 | label: Is there an existing issue for this? 10 | description: Please search to see if an issue already exists for this feature. 11 | options: 12 | - label: I have searched the existing issues 13 | required: true 14 | - type: textarea 15 | id: feature-description 16 | attributes: 17 | label: Feature Description 18 | description: Please provide a detailed description of the feature you are requesting. 19 | placeholder: Describe the new feature or enhancement you'd like to see. 20 | validations: 21 | required: true 22 | - type: textarea 23 | id: use-case 24 | attributes: 25 | label: Use Case 26 | description: How would this feature enhance your use of the project? 27 | placeholder: Describe a specific use case or scenario where this feature would be beneficial. 28 | validations: 29 | required: true 30 | - type: textarea 31 | id: benefits 32 | attributes: 33 | label: Benefits 34 | description: What benefits would this feature bring to the project or community? 35 | placeholder: Explain the advantages of implementing this feature. 36 | - type: textarea 37 | id: screenShots 38 | attributes: 39 | label: Add ScreenShots 40 | description: If any... 41 | - type: dropdown 42 | id: priority 43 | attributes: 44 | label: Priority 45 | description: How important is this feature to you? 46 | options: 47 | - High 48 | - Medium 49 | - Low 50 | default: 0 51 | validations: 52 | required: true 53 | - type: checkboxes 54 | id: terms 55 | attributes: 56 | label: Record 57 | options: 58 | - label: "I have read the Contributing Guidelines" 59 | required: true 60 | - label: "I'm a GSSOC-EXT contributor" 61 | required: false 62 | - label: "I'm a HACKTOBERFEST contributor" 63 | required: false 64 | - label: "I have starred the repository" 65 | required: true 66 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 2 | # Title and Issue number 3 | 4 | Title : 5 | 6 | Issue No. : 7 | 8 | Code Stack : 9 | 10 | Close # 11 | 12 | 13 | 14 | 15 | # Video (mandatory) 16 | 17 | 18 | 19 | # Checklist: 20 | 21 | - [ ] I have mentioned the issue number in my Pull Request. 22 | - [ ] I have commented my code, particularly in hard-to-understand areas 23 | - [ ] I have created a helpful and easy to understand `README.md` if its a new page/tech stack 24 | - [ ] I have gone through the `contributing.md` file before contributing 25 | 26 | 27 | 28 | **Additional context (Mandatory )** 29 | 30 | ***Are you contributing under any Open-source programme?*** 31 | 32 | - [ ] I'm a GSSOC-EXT contributor 33 | - [ ] I'm a HACKTOBERFEST contributor 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /.github/workflows/issue-open-close.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Issue Auto Comment 3 | on: 4 | issues: 5 | types: [opened, closed] 6 | 7 | jobs: 8 | comment: 9 | runs-on: ubuntu-latest 10 | permissions: 11 | issues: write 12 | steps: 13 | - name: Add a comment when an issue is opened 14 | if: github.event.action == 'opened' 15 | uses: actions-ecosystem/action-create-comment@v1 16 | with: 17 | github_token: ${{ secrets.GITHUB_TOKEN }} 18 | number: ${{ github.event.issue.number }} 19 | body: | 20 | 👋 Thanks for opening this issue! We appreciate your contribution. Please make sure you’ve provided all the necessary details and screenshots, and don't forget to follow our Guidelines and Code of Conduct. Happy coding! 🚀 21 | 22 | - name: Add a comment when an issue is closed 23 | if: github.event.action == 'closed' 24 | uses: actions-ecosystem/action-create-comment@v1 25 | with: 26 | github_token: ${{ secrets.GITHUB_TOKEN }} 27 | number: ${{ github.event.issue.number }} 28 | body: | 29 | ✅ This issue has been successfully closed. Thank you for your contribution and helping us improve the project! If you have any more ideas or run into other issues, feel free to open a new one. Happy coding! 🚀 30 | -------------------------------------------------------------------------------- /.github/workflows/pr-checker.yml: -------------------------------------------------------------------------------- 1 | 2 | name: PR Issue Checker 3 | 4 | on: 5 | pull_request: 6 | types: [opened, edited] 7 | 8 | jobs: 9 | check_pr_description: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Checkout code 14 | uses: actions/checkout@v2 15 | 16 | - name: Check PR Description 17 | id: check_pr_description 18 | run: | 19 | PR_DESCRIPTION="${{ github.event.pull_request.body }}" 20 | if [[ -z "$PR_DESCRIPTION" ]]; then 21 | echo "PR description is missing." 22 | exit 1 23 | fi 24 | 25 | if [[ ! "$PR_DESCRIPTION" =~ Fixes\ #[0-9]+ ]]; then 26 | echo "The PR description should include 'Fixes #' if not addressing any issue." 27 | echo "##[error]Fixes #NEW must be included in the description." 28 | exit 1 29 | fi 30 | 31 | echo "PR description is valid." 32 | 33 | - name: Output result 34 | run: echo "All checks passed." 35 | -------------------------------------------------------------------------------- /.github/workflows/pr-merge.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Merge Thank You 3 | 4 | 5 | 6 | on: 7 | pull_request_target: 8 | types: [closed] # Trigger when a PR is closed 9 | 10 | permissions: 11 | issues: write 12 | pull-requests: write 13 | 14 | jobs: 15 | post_merge_message: 16 | if: github.event.pull_request.merged == true # Only run if the PR was merged 17 | runs-on: ubuntu-latest 18 | 19 | steps: 20 | - name: Post thank you message 21 | uses: actions/github-script@v7 22 | with: 23 | github-token: ${{ secrets.GITHUB_TOKEN }} # Ensure token is used 24 | script: | 25 | const prNumber = context.payload.pull_request.number; 26 | const owner = context.repo.owner; 27 | const repo = context.repo.repo; 28 | 29 | // Post a thank you message upon PR merge 30 | await github.rest.issues.createComment({ 31 | owner: owner, 32 | repo: repo, 33 | issue_number: prNumber, 34 | body: `🎉🎉 Thank you for your contribution! Your PR #${prNumber} has been merged! 🎉🎉` 35 | }); 36 | -------------------------------------------------------------------------------- /.github/workflows/pr-raise.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Auto Comment on PR 3 | 4 | 5 | on: 6 | pull_request_target: 7 | types: [opened] 8 | 9 | permissions: 10 | issues: write 11 | pull-requests: write 12 | 13 | jobs: 14 | comment: 15 | runs-on: ubuntu-latest 16 | permissions: 17 | pull-requests: write 18 | steps: 19 | - name: Add Comment to Pull Request 20 | run: | 21 | COMMENT=$(cat < { 8 | const [blogItems, setBlogItems] = useState([]); 9 | 10 | // Function to handle uploading a new blog 11 | useEffect(() => { 12 | if (!localStorage.getItem("blogs") === undefined) { 13 | const storedBlogs = localStorage.getItem("blogs"); 14 | if (storedBlogs) { 15 | setBlogItems(JSON.parse(storedBlogs)); 16 | } 17 | } 18 | }, []); 19 | 20 | const handleUpload = (title, author, content, image) => { 21 | // Create a new blog item object 22 | const newBlogItem = { 23 | // id: Date.now(), // You can replace this with a better ID system 24 | title, 25 | author, 26 | content, 27 | image, 28 | date: new Date().toLocaleDateString("en-US", { 29 | weekday: "long", 30 | year: "numeric", 31 | month: "long", 32 | day: "numeric", 33 | }), 34 | }; 35 | 36 | // Update the state with the new blog item 37 | setBlogItems((prevItems) => [ 38 | ...prevItems, 39 | newBlogItem, 40 | ]); 41 | 42 | console.log(blogItems) 43 | localStorage.setItem("blogs", JSON.stringify(blogItems)); 44 | }; 45 | 46 | // Function to remove an item from the Blog by its ID 47 | const handleRemove = (id) => { 48 | setBlogItems((prevItems) => prevItems.filter((item) => item.id !== id)); 49 | localStorage.setItem("blogs", JSON.stringify(updatedBlogs)); 50 | }; 51 | 52 | return ( 53 | 54 | {children} 55 | 56 | ); 57 | }; 58 | 59 | // Custom hook to use the BlogContext in any component 60 | export const useBlog = () => { 61 | const context = useContext(BlogContext); 62 | if (!context) { 63 | throw new Error("useBlog must be used within a BlogProvider"); 64 | } 65 | return context; 66 | }; 67 | -------------------------------------------------------------------------------- /diet-recommendation-api/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, request, jsonify 2 | from flask_cors import CORS 3 | import os 4 | import re 5 | from dotenv import load_dotenv 6 | import google.generativeai as genai 7 | 8 | # Load environment variables from .env file 9 | load_dotenv() 10 | 11 | app = Flask(__name__) 12 | CORS(app) # Enable CORS for all routes 13 | 14 | # Configure the Gemini API with your API key 15 | genai.configure(api_key=os.getenv("GOOGLE_API_KEY")) 16 | 17 | # Define the prompt template for diet recommendations 18 | prompt_template_resto = ( 19 | "Diet Recommendation System:\n" 20 | "I want you to recommend 6 restaurants names, 6 breakfast names, 5 dinner names, and 6 workout names, " 21 | "based on the following criteria:\n" 22 | "Person age: {age}\n" 23 | "Person gender: {gender}\n" 24 | "Person weight: {weight}\n" 25 | "Person height: {height}\n" 26 | "Person veg_or_nonveg: {veg_or_nonveg}\n" 27 | "Person generic disease: {disease}\n" 28 | "Person region: {region}\n" 29 | "Person allergics: {allergics}\n" 30 | "Person foodtype: {foodtype}." 31 | ) 32 | 33 | # Load the Gemini Pro model 34 | model = genai.GenerativeModel("gemini-pro") 35 | chat = model.start_chat(history=[]) 36 | 37 | @app.route('/') 38 | def index(): 39 | return jsonify({"message": "Welcome to the Diet Recommendation API!"}) 40 | 41 | @app.route('/recommend', methods=['POST']) 42 | def recommend(): 43 | if request.method == "POST": 44 | data = request.json # Get JSON data from the request 45 | 46 | print(data) 47 | 48 | age = data['age'] 49 | gender = data['gender'] 50 | weight = data['weight'] 51 | height = data['height'] 52 | veg_or_nonveg = data['veg_or_nonveg'] 53 | disease = data['disease'] 54 | region = data['region'] 55 | allergics = data['allergics'] 56 | foodtype = data['foodtype'] 57 | 58 | # Prepare the prompt with user inputs 59 | input_data = { 60 | 'age': age, 61 | 'gender': gender, 62 | 'weight': weight, 63 | 'height': height, 64 | 'veg_or_nonveg': veg_or_nonveg, 65 | 'disease': disease, 66 | 'region': region, 67 | 'allergics': allergics, 68 | 'foodtype': foodtype 69 | } 70 | 71 | # Create the prompt by formatting the template with input data 72 | prompt = prompt_template_resto.format(**input_data) 73 | 74 | # Send the prompt to the Gemini API and get the response 75 | response = chat.send_message(prompt, stream=True) 76 | 77 | # Capture the full response text 78 | response_text = "" 79 | for chunk in response: 80 | response_text += chunk.text 81 | 82 | print("Response: ", response_text) 83 | 84 | # Extract recommendations using regular expressions 85 | restaurant_names = re.findall(r'Restaurants:(.*?)Breakfast:', response_text, re.DOTALL) 86 | breakfast_names = re.findall(r'Breakfast:(.*?)Dinner:', response_text, re.DOTALL) 87 | dinner_names = re.findall(r'Dinner:(.*?)Workouts:', response_text, re.DOTALL) 88 | workout_names = re.findall(r'Workouts:(.*?)$', response_text, re.DOTALL) 89 | 90 | # Function to clean up extracted names safely 91 | def extract_names(name_list): 92 | if name_list: 93 | return [name.strip() for name in name_list[0].strip().split('\n') if name.strip()] 94 | return [] 95 | 96 | # Cleaning up the extracted lists 97 | restaurant_names = extract_names(restaurant_names) 98 | breakfast_names = extract_names(breakfast_names) 99 | dinner_names = extract_names(dinner_names) 100 | workout_names = extract_names(workout_names) 101 | 102 | print(restaurant_names, "\n", breakfast_names) 103 | 104 | # Return JSON response with recommendations 105 | return jsonify(response_text) 106 | return jsonify({"error": "Invalid request"}), 400 107 | 108 | if __name__ == '__main__': 109 | app.run(debug=True) 110 | -------------------------------------------------------------------------------- /generate-sitemap.js: -------------------------------------------------------------------------------- 1 | import { SitemapStream } from 'sitemap'; 2 | import { createWriteStream } from 'fs'; 3 | import path from 'path'; 4 | import { fileURLToPath } from 'url'; 5 | const __filename = fileURLToPath(import.meta.url); 6 | const __dirname = path.dirname(__filename); 7 | const pages = [ 8 | { url: '/', changefreq: 'daily', priority: 1.0 }, 9 | 10 | ]; 11 | async function generateSitemap() { 12 | const writeStream = createWriteStream(path.resolve(__dirname, 'public', 'sitemap.xml')); 13 | const sitemap = new SitemapStream({ hostname: 'https://befiteveryday.netlify.app/' }); 14 | sitemap.pipe(writeStream).on('finish', () => { 15 | console.log('Sitemap generated successfully'); 16 | }); 17 | pages.forEach(page => sitemap.write(page)); 18 | sitemap.end(); 19 | } 20 | generateSitemap().catch(error => { 21 | console.error('Error generating sitemap:', error); 22 | }); -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | FitFlex 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [[redirects]] 2 | from = "/*" 3 | to = "/index.html" 4 | status = 200 -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fitness-website", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite --host", 8 | "build": "vite build", 9 | "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "@date-io/date-fns": "^3.0.0", 14 | "@emailjs/browser": "^4.3.3", 15 | "@emotion/react": "^11.13.3", 16 | "@emotion/styled": "^11.13.0", 17 | "@fortawesome/fontawesome-svg-core": "^6.6.0", 18 | "@fortawesome/free-brands-svg-icons": "^6.6.0", 19 | "@fortawesome/free-solid-svg-icons": "^6.5.2", 20 | "@fortawesome/react-fontawesome": "^0.2.2", 21 | "@hookform/resolvers": "^3.8.0", 22 | "@mui/icons-material": "^6.1.6", 23 | "@mui/material": "^6.1.6", 24 | "@radix-ui/react-dialog": "^1.1.2", 25 | "@radix-ui/react-slot": "^1.1.0", 26 | "@remotion/bundler": "^4.0.228", 27 | "@remotion/cli": "^4.0.228", 28 | "@remotion/renderer": "^4.0.228", 29 | "aos": "^3.0.0-beta.6", 30 | "axios": "^1.7.7", 31 | "chart.js": "^4.4.3", 32 | "class-variance-authority": "^0.7.0", 33 | "clsx": "^2.1.1", 34 | "emailjs": "^4.0.3", 35 | "emailjs-com": "^3.2.0", 36 | "firebase": "^10.14.0", 37 | "fitness-website": "file:", 38 | "framer-motion": "^11.11.10", 39 | "gsap": "^3.12.5", 40 | "lodash": "^4.17.21", 41 | "lucide-react": "^0.453.0", 42 | "nodemailer": "^6.9.15", 43 | "react": "^18.2.0", 44 | "react-chartjs-2": "^5.2.0", 45 | "react-countup": "^6.5.3", 46 | "react-dom": "^18.2.0", 47 | "react-helmet": "^6.1.0", 48 | "react-hook-form": "^7.53.0", 49 | "react-hot-toast": "^2.4.1", 50 | "react-icons": "^5.2.1", 51 | "react-responsive": "^10.0.0", 52 | "react-router-dom": "^6.24.1", 53 | "react-simple-chatbot": "^0.5.0", 54 | "react-slick": "^0.30.2", 55 | "react-toastify": "^10.0.5", 56 | "react-visibility-sensor": "^5.1.1", 57 | "remotion": "^4.0.228", 58 | "sitemap": "^8.0.0", 59 | "slick-carousel": "^1.8.1", 60 | "styled-components": "^4.0.0", 61 | "tailwind": "^4.0.0", 62 | "tailwind-merge": "^2.5.4", 63 | "tailwindcss-animate": "^1.0.7", 64 | "zod": "^3.23.8" 65 | }, 66 | "devDependencies": { 67 | "@types/node": "^22.8.4", 68 | "@types/react": "^18.2.66", 69 | "@types/react-dom": "^18.2.22", 70 | "@vitejs/plugin-react-swc": "^3.5.0", 71 | "autoprefixer": "^10.4.20", 72 | "eslint": "^8.57.0", 73 | "eslint-plugin-react": "^7.34.1", 74 | "eslint-plugin-react-hooks": "^4.6.0", 75 | "eslint-plugin-react-refresh": "^0.4.6", 76 | "postcss": "^8.4.47", 77 | "tailwindcss": "^3.4.14", 78 | "vite": "^5.2.0" 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /public/robot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/public/robot.png -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: /private 3 | Allow: / 4 | Sitemap: https://befiteveryday.netlify.app/sitemap.xml -------------------------------------------------------------------------------- /public/sitemap.xml: -------------------------------------------------------------------------------- 1 | https://befiteveryday.netlify.app/daily1.0 -------------------------------------------------------------------------------- /public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/.env.example: -------------------------------------------------------------------------------- 1 | MONGO_URI=mongodb://localhost:27017/fitflexDB 2 | JWT_SECRET=scijyasfy7dsvegdffvbfbfgg435tgrsnbgfgn 3 | PORT=5000 4 | EMAIL_ID= 5 | PASS_KEY= 6 | ADMIN_EMAIL_ID= -------------------------------------------------------------------------------- /server/app.js: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import dotenv from "dotenv"; 3 | import connectDB from "./utils/db.js"; 4 | import cors from "cors"; 5 | import newsletterRoutes from "./routes/newsletterRoute.js"; 6 | 7 | 8 | 9 | dotenv.config(); 10 | const app = express(); 11 | connectDB(); 12 | 13 | app.use(express.json()); 14 | 15 | // To avoid cross-origin error 16 | app.use(cors()); 17 | 18 | // Use the imported routes 19 | app.use("/api/newsletter", newsletterRoutes); 20 | 21 | 22 | const PORT = process.env.PORT || 5000; 23 | app.listen(PORT, () => { 24 | console.log(`Server running on port ${PORT}`); 25 | }); 26 | -------------------------------------------------------------------------------- /server/controller/newsletterController.js: -------------------------------------------------------------------------------- 1 | import NewsLetter from "../models/Newsletter.js"; 2 | import { sendMailToSubscriber } from "../sendSuscribedMail.js"; 3 | 4 | export async function saveNewsletter(req, res) { 5 | try { 6 | const { name, email } = req.body; 7 | 8 | if (!name || !email) { 9 | return res.status(400).json({ message: "All fields are required." }); 10 | } 11 | 12 | // Create new contact document 13 | const newNewsLetter = new NewsLetter({ name, email }); 14 | sendMailToSubscriber(newNewsLetter) 15 | await newNewsLetter.save(); 16 | res 17 | .status(201) 18 | .json({ message: "Contact form submitted successfully!", newNewsLetter }); 19 | } catch (error) { 20 | console.error("Error saving contact form:", error); 21 | res.status(500).json({ message: "Failed to submit contact form.", error }); 22 | } 23 | } 24 | 25 | export async function getNewsletter(req, res) { 26 | res.send('hello newsletter') 27 | } 28 | -------------------------------------------------------------------------------- /server/models/Newsletter.js: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose"; 2 | 3 | const newsletterSchema = new mongoose.Schema({ 4 | name: { 5 | type: String, 6 | required: true, 7 | trim: true 8 | }, 9 | email: { 10 | type: String, 11 | required: true, 12 | trim: true, 13 | match: [/^\S+@\S+\.\S+$/, "Please enter a valid email address"] 14 | }, 15 | subscribedAt: { 16 | type: Date, 17 | default: Date.now 18 | } 19 | }); 20 | 21 | const Newsletter = mongoose.model("Newsletter", newsletterSchema); 22 | 23 | export default Newsletter; 24 | -------------------------------------------------------------------------------- /server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "server", 3 | "version": "1.0.0", 4 | "main": "app.js", 5 | "type": "module", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [ 10 | "megablog" 11 | ], 12 | "author": "", 13 | "license": "ISC", 14 | "description": "", 15 | "dependencies": { 16 | "cors": "^2.8.5", 17 | "dotenv": "^16.4.5", 18 | "express": "^4.21.1", 19 | "mongoose": "^8.8.0", 20 | "nodemailer": "^6.9.16", 21 | "nodemon": "^3.1.7" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /server/routes/newsletterRoute.js: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | const router = express.Router(); 3 | import { getNewsletter, saveNewsletter } from "../controller/newsletterController.js"; 4 | 5 | router.post("/suscribe", saveNewsletter); 6 | router.get("/getNewsletter", getNewsletter); 7 | 8 | export default router; 9 | -------------------------------------------------------------------------------- /server/sendSuscribedMail.js: -------------------------------------------------------------------------------- 1 | import nodemailer from 'nodemailer'; 2 | import dotenv from 'dotenv'; 3 | dotenv.config(); 4 | 5 | const sendMailToSubscriber = (userdata) => { 6 | const transporter = nodemailer.createTransport({ 7 | service: "gmail", 8 | host: "smtp.gmail.com", 9 | port: 587, 10 | secure: false, 11 | auth: { 12 | user: process.env.EMAIL_ID, 13 | pass: process.env.PASS_KEY, 14 | }, 15 | }); 16 | 17 | async function main() { 18 | await transporter.sendMail({ 19 | from: { 20 | name: "FitFlex", 21 | address: process.env.EMAIL_ID, 22 | }, 23 | to: userdata.email, 24 | subject: "Welcome to FitFlex! 💪 You've successfully subscribed", 25 | text: "Thank you for subscribing to FitFlex! Get ready to transform your fitness journey!", 26 | html: ` 27 |
28 |
29 |

Welcome to FitFlex, ${userdata.name}!

30 |

31 | Hi ${userdata.name}, 32 |

33 |

34 | Congratulations on subscribing to FitFlex! You’re now part of a community dedicated to helping you achieve your fitness goals—whether it's weight loss, muscle gain, or overall fitness. Our daily workout plans will guide you through each day, step by step! 35 |

36 |

37 | Your fitness journey starts here, and we're excited to support you every step of the way. Track your progress, stay consistent, and transform your life with FitFlex. 38 |

39 |

40 | Stay motivated, and don’t forget to check in daily for your new workout plan! Let's get stronger together. 41 |

42 |

43 | Best Regards,
44 | The FitFlex Team 45 |

46 |
47 |
48 | `, 49 | }); 50 | } 51 | 52 | main().catch(console.error); 53 | }; 54 | 55 | export { sendMailToSubscriber }; 56 | -------------------------------------------------------------------------------- /server/utils/db.js: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose"; 2 | import dotenv from "dotenv"; 3 | dotenv.config(); 4 | 5 | const connectDB = async () => { 6 | try { 7 | await mongoose.connect(process.env.MONGO_URI); 8 | console.log("MongoDB Connected"); 9 | } catch (error) { 10 | console.error("Database connection error:", error); 11 | process.exit(1); 12 | } 13 | }; 14 | 15 | export default connectDB; 16 | -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | /* Hide the Scrollbar */ 2 | /* 3 | ::-webkit-scrollbar { 4 | display: none; 5 | } 6 | 7 | html { 8 | scrollbar-width: none; 9 | } 10 | 11 | body { 12 | -ms-overflow-style: none; 13 | } */ 14 | 15 | 16 | body::-webkit-scrollbar { 17 | width: 12px; 18 | height: 12px; 19 | } 20 | 21 | body::-webkit-scrollbar-track { 22 | background: #f0f0f0; 23 | border-radius: 10px; 24 | } 25 | 26 | body::-webkit-scrollbar-thumb { 27 | background-color: #484848; 28 | border-radius: 10px; 29 | border: 3px solid #f0f0f0; 30 | } 31 | 32 | body::-webkit-scrollbar-thumb:hover { 33 | background-color: #555; 34 | cursor: pointer; 35 | } 36 | 37 | /*Css for the health tips page*/ 38 | .health-tips-container { 39 | display: flex; 40 | flex-direction: column; 41 | align-items: center; 42 | padding: 20px; 43 | background-color: #f8f8f8; 44 | } 45 | 46 | .section-title { 47 | font-size: 2rem; 48 | margin-bottom: 20px; 49 | color: #333; 50 | } 51 | 52 | .cards-container { 53 | display: grid; 54 | grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 55 | gap: 20px; 56 | width: 100%; 57 | max-width: 1200px; 58 | } 59 | 60 | .health-card { 61 | background-color: #fff; 62 | border-radius: 8px; 63 | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 64 | padding: 20px; 65 | text-align: center; 66 | transition: transform 0.2s; 67 | } 68 | 69 | .health-card:hover { 70 | transform: translateY(-5px); 71 | } 72 | 73 | .icon { 74 | font-size: 2rem; 75 | margin-bottom: 10px; 76 | } 77 | 78 | .tip-title { 79 | font-size: 1.5rem; 80 | margin-bottom: 10px; 81 | color: #555; 82 | } 83 | 84 | .tip-description { 85 | font-size: 1rem; 86 | color: #777; 87 | } 88 | 89 | .logo { 90 | height: 24px; 91 | width: auto; 92 | transition: transform 0.2s ease; 93 | } 94 | 95 | .logo:hover { 96 | transform: translateY(-5px); 97 | } 98 | 99 | html, body { 100 | margin: 0; 101 | padding: 0; 102 | width: 100%; 103 | overflow-x: hidden; 104 | } 105 | 106 | .slick-prev:before, .slick-next:before { 107 | font-family: 'slick'; 108 | font-size: 45px !important; 109 | line-height: 1; 110 | position: relative; 111 | left: -10px; 112 | opacity: .75; 113 | color: white; 114 | -webkit-font-smoothing: antialiased; 115 | -moz-osx-font-smoothing: grayscale; 116 | } -------------------------------------------------------------------------------- /src/assets/Exercise Video Guides_ 1500+ Exercises with Instructions & Tips.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/Exercise Video Guides_ 1500+ Exercises with Instructions & Tips.zip -------------------------------------------------------------------------------- /src/assets/Loader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/Loader.png -------------------------------------------------------------------------------- /src/assets/ReadMeAssests/readme_Icons/materialui.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/assets/ReadMeAssests/readme_Icons/react.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/ReadMeAssests/readme_Icons/vite.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/assets/ReadMeAssests/screenShorts/GSSoC-Ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/ReadMeAssests/screenShorts/GSSoC-Ext.png -------------------------------------------------------------------------------- /src/assets/ReadMeAssests/screenShorts/Hacktoberfest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/ReadMeAssests/screenShorts/Hacktoberfest.png -------------------------------------------------------------------------------- /src/assets/ReadMeAssests/screenShorts/Homepage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/ReadMeAssests/screenShorts/Homepage.png -------------------------------------------------------------------------------- /src/assets/ReadMeAssests/screenShorts/flexPlan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/ReadMeAssests/screenShorts/flexPlan.png -------------------------------------------------------------------------------- /src/assets/ReadMeAssests/screenShorts/trackProgress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/ReadMeAssests/screenShorts/trackProgress.png -------------------------------------------------------------------------------- /src/assets/ReadMeAssests/screenShorts/upperbody.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/ReadMeAssests/screenShorts/upperbody.png -------------------------------------------------------------------------------- /src/assets/ReadMeAssests/screenShorts/yoga.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/ReadMeAssests/screenShorts/yoga.png -------------------------------------------------------------------------------- /src/assets/about/mission.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/about/mission.png -------------------------------------------------------------------------------- /src/assets/about/vision.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/about/vision.png -------------------------------------------------------------------------------- /src/assets/exercise/arms/biceps.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/arms/biceps.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/arms/forearms.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/arms/forearms.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/arms/palmarfacsia.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/arms/palmarfacsia.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/arms/shoulders.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/arms/shoulders.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/arms/triceps.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/arms/triceps.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/lower body/abductors.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/lower body/abductors.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/lower body/adductors.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/lower body/adductors.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/lower body/calves.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/lower body/calves.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/lower body/glutes.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/lower body/glutes.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/lower body/hamstrings.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/lower body/hamstrings.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/lower body/hipflexors.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/lower body/hipflexors.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/lower body/itband.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/lower body/itband.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/lower body/plantarfascia.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/lower body/plantarfascia.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/lower body/quads.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/lower body/quads.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/upper body/abs.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/upper body/abs.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/upper body/chest.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/upper body/chest.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/upper body/lats.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/upper body/lats.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/upper body/lowerback.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/upper body/lowerback.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/upper body/neck.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/upper body/neck.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/upper body/obliques.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/upper body/obliques.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/upper body/shoulders.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/upper body/shoulders.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/upper body/traps.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/upper body/traps.jpeg -------------------------------------------------------------------------------- /src/assets/exercise/upper body/upperback.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/exercise/upper body/upperback.jpeg -------------------------------------------------------------------------------- /src/assets/fitness1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/fitness1.png -------------------------------------------------------------------------------- /src/assets/fitness2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/fitness2.png -------------------------------------------------------------------------------- /src/assets/health/balanced-diet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/health/balanced-diet.jpg -------------------------------------------------------------------------------- /src/assets/health/exercise.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/health/exercise.jpg -------------------------------------------------------------------------------- /src/assets/health/mental-health.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/health/mental-health.jpg -------------------------------------------------------------------------------- /src/assets/health/mix-up-routine.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/health/mix-up-routine.jpg -------------------------------------------------------------------------------- /src/assets/health/posture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/health/posture.jpg -------------------------------------------------------------------------------- /src/assets/health/rest-recovery.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/health/rest-recovery.jpg -------------------------------------------------------------------------------- /src/assets/health/strength-training.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/health/strength-training.jpg -------------------------------------------------------------------------------- /src/assets/health/warmup-cooldown.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/health/warmup-cooldown.jpg -------------------------------------------------------------------------------- /src/assets/health/water-hydration.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/health/water-hydration.jpg -------------------------------------------------------------------------------- /src/assets/home/LoginImg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/home/LoginImg.jpg -------------------------------------------------------------------------------- /src/assets/home/banner2_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/home/banner2_1.jpg -------------------------------------------------------------------------------- /src/assets/home/biceps.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/home/biceps.webp -------------------------------------------------------------------------------- /src/assets/home/flexible.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/home/flexible.jpg -------------------------------------------------------------------------------- /src/assets/home/getinshape.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/home/getinshape.jpg -------------------------------------------------------------------------------- /src/assets/home/hardworkout.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/home/hardworkout.jpg -------------------------------------------------------------------------------- /src/assets/home/homeImg1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/home/homeImg1.jpg -------------------------------------------------------------------------------- /src/assets/home/homeImg2.avif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/home/homeImg2.avif -------------------------------------------------------------------------------- /src/assets/home/homeImg3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/home/homeImg3.jpg -------------------------------------------------------------------------------- /src/assets/home/homeImg4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/home/homeImg4.jpg -------------------------------------------------------------------------------- /src/assets/img/Food_Diet_Bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/Food_Diet_Bg.png -------------------------------------------------------------------------------- /src/assets/img/Loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/Loader.gif -------------------------------------------------------------------------------- /src/assets/img/ben.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/ben.jpg -------------------------------------------------------------------------------- /src/assets/img/car.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/car.jpg -------------------------------------------------------------------------------- /src/assets/img/customer-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/customer-1.jpg -------------------------------------------------------------------------------- /src/assets/img/customer-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/customer-2.jpg -------------------------------------------------------------------------------- /src/assets/img/customer-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/customer-3.jpg -------------------------------------------------------------------------------- /src/assets/img/customer-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/customer-4.jpg -------------------------------------------------------------------------------- /src/assets/img/customer-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/customer-5.jpg -------------------------------------------------------------------------------- /src/assets/img/customer-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/customer-6.jpg -------------------------------------------------------------------------------- /src/assets/img/dave.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/dave.jpg -------------------------------------------------------------------------------- /src/assets/img/dog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/dog.jpg -------------------------------------------------------------------------------- /src/assets/img/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/github.png -------------------------------------------------------------------------------- /src/assets/img/gmail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/gmail.png -------------------------------------------------------------------------------- /src/assets/img/hannah.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/hannah.jpg -------------------------------------------------------------------------------- /src/assets/img/linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/linkedin.png -------------------------------------------------------------------------------- /src/assets/img/mountain.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/mountain.jpg -------------------------------------------------------------------------------- /src/assets/img/steve.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/steve.jpg -------------------------------------------------------------------------------- /src/assets/img/telephone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/telephone.png -------------------------------------------------------------------------------- /src/assets/img/trackerbg2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/trackerbg2.jpg -------------------------------------------------------------------------------- /src/assets/img/whatsapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/assets/img/whatsapp.png -------------------------------------------------------------------------------- /src/assets/react.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/BacktoTop.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react'; 2 | import { FaArrowUp } from 'react-icons/fa'; 3 | import '../styles/BacktoTop.css'; 4 | 5 | const BackToTopButton = () => { 6 | const [isVisible, setIsVisible] = useState(false); 7 | 8 | // Show the button when the user scrolls 200px from the top 9 | const toggleVisibility = () => { 10 | if (window.pageYOffset > 200) { 11 | setIsVisible(true); 12 | } else { 13 | setIsVisible(false); 14 | } 15 | }; 16 | 17 | // Scroll to the top when the button is clicked 18 | const scrollToTop = () => { 19 | let scrollToTop = window.setInterval(function () { 20 | let pos = window.pageYOffset; 21 | if (pos > 0) { 22 | window.scrollTo(0, pos - 50); // Adjust this for scroll speed 23 | } else { 24 | window.clearInterval(scrollToTop); 25 | } 26 | }, 16); // This runs the scroll every 16ms for 60fps-like smoothness 27 | }; 28 | 29 | 30 | useEffect(() => { 31 | window.addEventListener('scroll', toggleVisibility); 32 | return () => { 33 | window.removeEventListener('scroll', toggleVisibility); 34 | }; 35 | }, []); 36 | 37 | return ( 38 | 45 | ); 46 | }; 47 | 48 | export default BackToTopButton; 49 | -------------------------------------------------------------------------------- /src/components/CounterCard.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; 3 | function CounterCard({ val, icon, text }) { 4 | return ( 5 |
24 | 25 | 34 | 47 | {val} 48 | 49 | 60 | {text} 61 | 62 |
63 | ); 64 | } 65 | 66 | export default CounterCard; 67 | -------------------------------------------------------------------------------- /src/components/ExerciseCard.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Card from '@mui/material/Card'; 3 | import CardContent from '@mui/material/CardContent'; 4 | // import CardMedia from '@mui/material/CardMedia'; 5 | // import Typography from '@mui/material/Typography'; 6 | import CardHeader from '@mui/material/CardHeader'; 7 | import { IconButton, Typography } from '@mui/material'; 8 | // import {DeleteForever} from '@mui/icons-material/'; 9 | import DeleteIcon from '@mui/icons-material/Delete'; 10 | export default function ExerciseCard({name, index, handleDelete}) { 11 | return ( 12 |
13 | 14 | handleDelete(name)}> 17 | 18 | 19 | } 20 | title={"Name :"+name} 21 | subheader={name+" is a good exercise"} 22 | /> 23 | 24 | 25 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Est architecto voluptatem, id, suscipit blanditiis esse aliquam 26 | 27 | 28 | 29 |
30 | ) 31 | } 32 | -------------------------------------------------------------------------------- /src/components/GoogleTranslate.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect } from "react"; 2 | import { useState } from "react"; 3 | 4 | const GoogleTranslate = () => { 5 | const [isVisible, setIsVisible] = useState(true); 6 | 7 | useEffect(() => { 8 | window.googleTranslateInit = () => { 9 | if (!window.google?.translate?.TranslateElement) { 10 | setTimeout(window.googleTranslateInit, 100); 11 | } else { 12 | new window.google.translate.TranslateElement({ 13 | pageLanguage: 'en', 14 | includedLanguages: 'en,hi,pa,sa,mr,ur,bn,es,ja,ko,zh-CN,es,nl,fr,de,it,ta,te', 15 | layout: window.google.translate.TranslateElement.InlineLayout.HORIZONTAL, 16 | defaultLanguage: 'en', 17 | autoDisplay: false, 18 | }, 'google_element'); 19 | } 20 | }; 21 | 22 | const loadGoogleTranslateScript = () => { 23 | if (!document.getElementById("google_translate_script")) { 24 | const script = document.createElement("script"); 25 | script.type = "text/javascript"; 26 | script.src = "https://translate.google.com/translate_a/element.js?cb=googleTranslateInit"; 27 | script.id = "google_translate_script"; 28 | script.onerror = () => console.error('Error loading Google Translate script'); 29 | document.body.appendChild(script); 30 | } 31 | }; 32 | 33 | loadGoogleTranslateScript(); 34 | 35 | if (window.google && window.google.translate) { 36 | window.googleTranslateInit(); 37 | } 38 | 39 | const handleScroll = () => { 40 | setIsVisible(window.scrollY < 100); // Adjust the scroll amount as needed 41 | }; 42 | 43 | window.addEventListener('scroll', handleScroll); 44 | 45 | return () => { 46 | window.removeEventListener('scroll', handleScroll); 47 | }; 48 | }, []); 49 | 50 | return ( 51 |
52 | 131 |
132 | ); 133 | }; 134 | 135 | export default GoogleTranslate; 136 | -------------------------------------------------------------------------------- /src/components/HomeSlider.jsx: -------------------------------------------------------------------------------- 1 | import "slick-carousel/slick/slick.css"; 2 | import "slick-carousel/slick/slick-theme.css"; 3 | import React, { useEffect, useState } from "react"; 4 | import Slider from "react-slick"; 5 | import { Box, Typography } from "@mui/material"; 6 | 7 | export default function HomeSlider({ object }) { 8 | const [arrowState, setArrowState] = useState(true); 9 | useEffect(() => { 10 | const x = window.innerWidth; 11 | console.log(x); 12 | if (x < 900) { 13 | setArrowState(false); 14 | } else { 15 | setArrowState(true); 16 | } 17 | }, [window.innerWidth]); 18 | 19 | var settings = { 20 | dots: true, 21 | infinite: true, 22 | autoplay: true, 23 | arrows: arrowState, 24 | autoplaySpeed: 5000, 25 | speed: 500, 26 | slidesToShow: 1, 27 | slidesToScroll: 1, 28 | // arrows:false, 29 | nextArrow: , 30 | prevArrow: , 31 | }; 32 | return ( 33 | 34 | {object.map((item, index) => ( 35 | 47 | 56 | 73 | {item.title} 74 | 75 | 76 | ))} 77 | 78 | {/* {object.map((item, index)=>{ 79 | return( 80 |
81 |

hiii

82 |
83 | ) 84 | })} */} 85 |
86 | ); 87 | } 88 | 89 | function SampleNextArrow(props) { 90 | const { className, style, onClick } = props; 91 | return ( 92 | 107 | ); 108 | } 109 | 110 | function SamplePrevArrow(props) { 111 | const { className, style, onClick } = props; 112 | return ( 113 | 128 | ); 129 | } 130 | -------------------------------------------------------------------------------- /src/components/Loader.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Box, Typography, useTheme } from '@mui/material'; 3 | import LoaderImg from '../assets/img/Loader.gif'; 4 | 5 | const Loader = ({ message = 'Loading...' }) => { 6 | const theme = useTheme(); 7 | 8 | return ( 9 | 24 | FitFlex Logo 32 | 33 | {message} 34 | 35 | 36 | {/* Keyframe for spin animation */} 37 | 49 | 50 | ); 51 | }; 52 | 53 | export default Loader; 54 | -------------------------------------------------------------------------------- /src/components/PlansCard2.jsx: -------------------------------------------------------------------------------- 1 | import { 2 | Grid, 3 | Typography, 4 | Box, 5 | CardActions, 6 | Button, 7 | Card, 8 | CardMedia, 9 | CardContent, 10 | } from "@mui/material"; 11 | import { motion } from "framer-motion"; 12 | import forearms from "../assets/exercise/arms/forearms.jpeg"; 13 | import { useState, useEffect } from "react"; 14 | 15 | function PlansCard({info}) { 16 | const [difficultyColor, setColor] = useState("green"); 17 | 18 | 19 | if(!info){ 20 | info={ 21 | name:"Biceps Special", 22 | title:"Super Biceps Special", 23 | period:30, 24 | image: forearms, 25 | location:"Home", 26 | level:"Easy", 27 | 28 | } 29 | } 30 | 31 | useEffect(() => { 32 | 33 | if (info.level === "Easy") { 34 | setColor("green"); 35 | } else if (info.level === "Medium") { 36 | setColor("orange"); 37 | } else { 38 | setColor("red"); 39 | } 40 | },[info.level]) 41 | 42 | return ( 43 | 64 | 65 | 66 |
76 | 86 | {info.name} 87 | 88 | 89 | {info.title} 90 | 91 |
92 | 93 | 103 | 104 | 105 | {info.period} 106 | Days 107 | 108 | 109 | {info.level} 110 | Level 111 | 112 | 113 | 118 | 20% completed 119 | 120 |
121 |
130 |
139 |
140 |
141 |
142 |
143 | ); 144 | } 145 | 146 | export default PlansCard; -------------------------------------------------------------------------------- /src/components/ProgressBar.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from 'react'; 2 | import '../styles/ProgressBar.css'; 3 | 4 | const ProgressBar = () => { 5 | const [scrollPercent, setScrollPercent] = useState(0); 6 | 7 | const updateProgressBar = () => { 8 | const scrollTop = document.documentElement.scrollTop || document.body.scrollTop; 9 | const scrollHeight = document.documentElement.scrollHeight - document.documentElement.clientHeight; 10 | const scrollProgress = (scrollTop / scrollHeight) * 100; 11 | setScrollPercent(scrollProgress); 12 | }; 13 | 14 | useEffect(() => { 15 | window.addEventListener('scroll', updateProgressBar); 16 | return () => window.removeEventListener('scroll', updateProgressBar); 17 | }, []); 18 | 19 | return ( 20 |
21 |
22 |
23 | ); 24 | }; 25 | 26 | export default ProgressBar; -------------------------------------------------------------------------------- /src/components/Subscribe.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { Box, TextField, Button } from "@mui/material"; 3 | import { toast } from "react-toastify"; 4 | 5 | function Subscribe() { 6 | const [email, setEmail] = useState(""); 7 | const [name, setName] = useState(""); 8 | 9 | // using regex to make sure user enter valid email 10 | const validateEmail = (email) => { 11 | const re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; 12 | return re.test(String(email).toLowerCase()); 13 | }; 14 | 15 | const handleSubmit = async (e) => { 16 | e.preventDefault(); 17 | 18 | if (!validateEmail(email)) { 19 | toast.error("Please enter a valid email address."); 20 | return; 21 | } 22 | 23 | 24 | try { 25 | // Make a POST request to your backend API using fetch 26 | const response = await fetch('http://localhost:5000/api/newsletter/suscribe', { 27 | method: 'POST', // The HTTP method 28 | headers: { 29 | 'Content-Type': 'application/json', // Indicating that we are sending JSON 30 | }, 31 | body: JSON.stringify({ 32 | name: name, 33 | email: email, 34 | }), 35 | }); 36 | 37 | if (response.ok) { // Check if the response status is OK (status 200-299) 38 | toast.success("Newsletter Successfully Subscribed!"); 39 | setEmail(""); // Clear the email input after successful submission 40 | setName(""); 41 | } else { 42 | toast.error("Failed to subscribe."); 43 | } 44 | } catch (error) { 45 | console.error("Error submitting to API: ", error); 46 | toast.error("Failed to add email."); 47 | } 48 | }; 49 | 50 | 51 | return ( 52 | 64 | setName(e.target.value)} 70 | sx={{ 71 | backgroundColor: "transparent", 72 | marginRight: '10px', 73 | input: { 74 | padding: { xs: "8px", sm: "10px 12px" }, 75 | color: "#000", 76 | "&::placeholder": { 77 | color: "black", 78 | fontSize: "20px" 79 | }, 80 | }, 81 | "& .MuiOutlinedInput-root": { 82 | "& fieldset": { 83 | border: "none", 84 | }, 85 | }, 86 | }} 87 | /> 88 | setEmail(e.target.value)} 94 | className="mr-5" 95 | sx={{ 96 | backgroundColor: "transparent", 97 | input: { 98 | padding: { xs: "8px", sm: "10px 12px" }, 99 | color: "#000", 100 | "&::placeholder": { 101 | color: "black", 102 | fontSize: "20px" 103 | }, 104 | }, 105 | "& .MuiOutlinedInput-root": { 106 | "& fieldset": { 107 | border: "none", 108 | }, 109 | }, 110 | }} 111 | /> 112 | 129 | 130 | ); 131 | } 132 | 133 | export default Subscribe; -------------------------------------------------------------------------------- /src/components/imageupload.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import axios from "axios"; 3 | import toast from "react-hot-toast"; 4 | 5 | const CloudinaryUpload = ({ cloudName, uploadPreset, onUploadSuccess }) => { 6 | const [image, setImage] = useState(null); 7 | const [previewUrl, setPreviewUrl] = useState(""); 8 | const [uploading, setUploading] = useState(false); 9 | 10 | 11 | const handleImageChange = (e) => { 12 | const file = e.target.files[0]; 13 | setImage(file); 14 | setPreviewUrl(URL.createObjectURL(file)); // Show preview 15 | }; 16 | 17 | const handleUpload = async () => { 18 | if (!image) { 19 | toast.error("Please select an image first."); 20 | return; 21 | } 22 | 23 | setUploading(true); 24 | 25 | const formData = new FormData(); 26 | formData.append("file", image); 27 | formData.append("upload_preset", uploadPreset); 28 | 29 | try { 30 | const response = await axios.post( 31 | `https://api.cloudinary.com/v1_1/${cloudName}/image/upload`, 32 | formData 33 | ); 34 | 35 | console.log("Upload Success:", response.data); 36 | toast.success("Image uploaded successfully!"); 37 | 38 | // Call callback function if provided 39 | console.log(response.data.secure_url); 40 | onUploadSuccess && onUploadSuccess(response.data.secure_url); 41 | } catch (error) { 42 | console.error("Upload Error:", error); 43 | alert("Failed to upload image."); 44 | } finally { 45 | setUploading(false); 46 | setImage(null); // Clear image 47 | setPreviewUrl(""); // Reset preview 48 | } 49 | }; 50 | 51 | return ( 52 |
53 |

Upload an Image

54 | 55 | 56 | {previewUrl && Preview} 57 | 58 | 67 |
68 | ); 69 | }; 70 | 71 | export default CloudinaryUpload; 72 | -------------------------------------------------------------------------------- /src/components/navbar.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/components/navbar.css -------------------------------------------------------------------------------- /src/components/sheet.jsx: -------------------------------------------------------------------------------- 1 | import { 2 | Sheet, 3 | SheetContent, 4 | SheetDescription, 5 | SheetHeader, 6 | SheetTitle, 7 | SheetTrigger, 8 | } from "@/components/ui/sheet"; 9 | import { icons, Menu } from "lucide-react"; // Import the icons object 10 | import { NavLink } from "react-router-dom"; 11 | import fitnessPrimaryLogo from "../assets/fitness1.png"; 12 | import { useState } from "react"; 13 | 14 | const pages = [ 15 | { name: "Home", icon: "House" }, // Make sure to use correct string names of the icons 16 | { name: "About", icon: "Info" }, 17 | { name: "Contact", icon: "Phone" }, 18 | { name: "Blog", icon: "Book" }, 19 | { name: "Services", icon: "Cog" }, 20 | { name: "Login", icon: "User" }, 21 | { name: "Register", icon: "UserPlus" }, 22 | ]; 23 | 24 | export function SheetDemo() { 25 | const [isOpen, setIsOpen] = useState(false); // State to control the sheet 26 | 27 | // Function to close the sheet 28 | const handleClose = () => setIsOpen(false); 29 | 30 | return ( 31 | 32 | 33 | 36 | 37 | 38 | 39 | 40 |
41 | Logo 42 |
43 |
44 | 45 | {pages.map((page, index) => { 46 | const Icon = icons[page.icon]; // Dynamically access the icon component 47 | 48 | return ( 49 |
50 | {Icon && } {/* Render the icon if it exists */} 51 | 54 | isActive 55 | ? "text-blue-600 font-bold flex items-center" // Active link styling 56 | : "text-gray-800 flex items-center" 57 | } 58 | onClick={handleClose} // Close the sheet when a link is clicked 59 | > 60 | {page.name} 61 | 62 |
63 | ); 64 | })} 65 |
66 |
67 |
68 |
69 | ); 70 | } 71 | -------------------------------------------------------------------------------- /src/components/ui/button.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import { Slot } from "@radix-ui/react-slot" 3 | import { cva, type VariantProps } from "class-variance-authority" 4 | 5 | import { cn } from "@/lib/utils" 6 | 7 | const buttonVariants = cva( 8 | "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", 9 | { 10 | variants: { 11 | variant: { 12 | default: "bg-primary text-primary-foreground hover:bg-primary/90", 13 | destructive: 14 | "bg-destructive text-destructive-foreground hover:bg-destructive/90", 15 | outline: 16 | "border border-input bg-background hover:bg-accent hover:text-accent-foreground", 17 | secondary: 18 | "bg-secondary text-secondary-foreground hover:bg-secondary/80", 19 | ghost: "hover:bg-accent hover:text-accent-foreground", 20 | link: "text-primary underline-offset-4 hover:underline", 21 | }, 22 | size: { 23 | default: "h-10 px-4 py-2", 24 | sm: "h-9 rounded-md px-3", 25 | lg: "h-11 rounded-md px-8", 26 | icon: "h-10 w-10", 27 | }, 28 | }, 29 | defaultVariants: { 30 | variant: "default", 31 | size: "default", 32 | }, 33 | } 34 | ) 35 | 36 | export interface ButtonProps 37 | extends React.ButtonHTMLAttributes, 38 | VariantProps { 39 | asChild?: boolean 40 | } 41 | 42 | const Button = React.forwardRef( 43 | ({ className, variant, size, asChild = false, ...props }, ref) => { 44 | const Comp = asChild ? Slot : "button" 45 | return ( 46 | 51 | ) 52 | } 53 | ) 54 | Button.displayName = "Button" 55 | 56 | export { Button, buttonVariants } 57 | -------------------------------------------------------------------------------- /src/components/ui/sheet.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as SheetPrimitive from "@radix-ui/react-dialog" 3 | import { cva, type VariantProps } from "class-variance-authority" 4 | import { X } from "lucide-react" 5 | 6 | import { cn } from "@/lib/utils" 7 | 8 | const Sheet = SheetPrimitive.Root 9 | 10 | const SheetTrigger = SheetPrimitive.Trigger 11 | 12 | const SheetClose = SheetPrimitive.Close 13 | 14 | const SheetPortal = SheetPrimitive.Portal 15 | 16 | const SheetOverlay = React.forwardRef< 17 | React.ElementRef, 18 | React.ComponentPropsWithoutRef 19 | >(({ className, ...props }, ref) => ( 20 | 28 | )) 29 | SheetOverlay.displayName = SheetPrimitive.Overlay.displayName 30 | 31 | const sheetVariants = cva( 32 | "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500", 33 | { 34 | variants: { 35 | side: { 36 | top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top", 37 | bottom: 38 | "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom", 39 | left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm", 40 | right: 41 | "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm", 42 | }, 43 | }, 44 | defaultVariants: { 45 | side: "right", 46 | }, 47 | } 48 | ) 49 | 50 | interface SheetContentProps 51 | extends React.ComponentPropsWithoutRef, 52 | VariantProps {} 53 | 54 | const SheetContent = React.forwardRef< 55 | React.ElementRef, 56 | SheetContentProps 57 | >(({ side = "right", className, children, ...props }, ref) => ( 58 | 59 | 60 | 65 | {children} 66 | 67 | 68 | 69 | 70 | 71 | 72 | )) 73 | SheetContent.displayName = SheetPrimitive.Content.displayName 74 | 75 | const SheetHeader = ({ 76 | className, 77 | ...props 78 | }: React.HTMLAttributes) => ( 79 |
86 | ) 87 | SheetHeader.displayName = "SheetHeader" 88 | 89 | const SheetFooter = ({ 90 | className, 91 | ...props 92 | }: React.HTMLAttributes) => ( 93 |
100 | ) 101 | SheetFooter.displayName = "SheetFooter" 102 | 103 | const SheetTitle = React.forwardRef< 104 | React.ElementRef, 105 | React.ComponentPropsWithoutRef 106 | >(({ className, ...props }, ref) => ( 107 | 112 | )) 113 | SheetTitle.displayName = SheetPrimitive.Title.displayName 114 | 115 | const SheetDescription = React.forwardRef< 116 | React.ElementRef, 117 | React.ComponentPropsWithoutRef 118 | >(({ className, ...props }, ref) => ( 119 | 124 | )) 125 | SheetDescription.displayName = SheetPrimitive.Description.displayName 126 | 127 | export { 128 | Sheet, 129 | SheetPortal, 130 | SheetOverlay, 131 | SheetTrigger, 132 | SheetClose, 133 | SheetContent, 134 | SheetHeader, 135 | SheetFooter, 136 | SheetTitle, 137 | SheetDescription, 138 | } 139 | -------------------------------------------------------------------------------- /src/context/Firebase.jsx: -------------------------------------------------------------------------------- 1 | import React, { createContext, useContext } from "react"; 2 | import { initializeApp } from "firebase/app"; 3 | import { getFirestore } from "firebase/firestore"; 4 | 5 | 6 | const firebaseConfig = { 7 | apiKey: "AIzaSyBDW-uU9llqmCAw5yf207WZ4IcIIa5Fekw", 8 | authDomain: "fir-auth-69b4c.firebaseapp.com", 9 | projectId: "fir-auth-69b4c", 10 | storageBucket: "fir-auth-69b4c.appspot.com", 11 | messagingSenderId: "462936464600", 12 | appId: "1:462936464600:web:af0ddd26b87f78d5be8bad", 13 | }; 14 | 15 | const firebaseApp = initializeApp(firebaseConfig); 16 | const app = initializeApp(firebaseConfig); 17 | const firestore = getFirestore(app); 18 | 19 | const FirebaseContext = createContext(); 20 | 21 | export const FirebaseProvider = ({ children }) => { 22 | return ( 23 | 24 | {children} 25 | 26 | ); 27 | }; 28 | 29 | export const useFirebase = () => useContext(FirebaseContext); -------------------------------------------------------------------------------- /src/data/FAQ.js: -------------------------------------------------------------------------------- 1 | export const faqData = [ 2 | { 3 | question: "What is FitFlex?", 4 | answer: "FitFlex is a fitness and weight loss platform offering structured, day-wise workout plans tailored to your goals, whether for weight loss, muscle gain, or general fitness." 5 | }, 6 | { 7 | question: "How do I get started with FitFlex?", 8 | answer: "Sign up, choose your fitness goal, and select the workout plan that suits you. You'll receive daily exercises with instructions to help you reach your goals." 9 | }, 10 | { 11 | question: "Is FitFlex suitable for beginners?", 12 | answer: "Absolutely! We offer beginner-friendly workout plans that gradually build intensity, making it suitable for users of all levels." 13 | }, 14 | { 15 | question: "Can I track my progress?", 16 | answer: "Yes! FitFlex offers a progress tracker where you can log completed workouts, track weight loss, muscle gain, and monitor your improvements." 17 | }, 18 | { 19 | question:" Can I customize my workout plan?", 20 | answer: "While FitFlex provides structured plans based on your selected goal, you can also modify the difficulty level or replace certain exercises with alternatives from our library to better fit your preferences." 21 | }, 22 | { 23 | question:" How can I contact support?", 24 | answer: " If you need help or have any questions, feel free to reach out to our support team via the “Contact Us” page. We're here to assist you on your fitness journey!" 25 | }, 26 | { 27 | question:" What if I have a specific injury or health condition?", 28 | answer: " If you have any specific injuries or health conditions, we recommend consulting with a healthcare professional before starting any workout program. Our plans are designed to be safe, but individual needs can vary." 29 | }, 30 | { 31 | question:" Do I need a subscription to access all workout plans?", 32 | answer: "FitFlex offers both free and premium workout plans. While many plans are available at no cost, a subscription may be required for access to exclusive content and personalized coaching." 33 | } 34 | ]; 35 | -------------------------------------------------------------------------------- /src/data/cardio.json: -------------------------------------------------------------------------------- 1 | { 2 | "plans": [ 3 | { 4 | "title": "Beginner Cardio", 5 | "subtitle": "Start Your Cardio Journey", 6 | "image": "path/to/cardio_image1.jpg", 7 | "totalDays": 30, 8 | "difficulty": "beginner", 9 | "detailedData": "path/to/cardio_detailedData1.json" 10 | }, 11 | { 12 | "title": "Intermediate Cardio", 13 | "subtitle": "Boost Your Cardio Endurance", 14 | "image": "path/to/cardio_image2.jpg", 15 | "totalDays": 45, 16 | "difficulty": "intermediate", 17 | "detailedData": "path/to/cardio_detailedData2.json" 18 | }, 19 | { 20 | "title": "Advanced Cardio", 21 | "subtitle": "Achieve Peak Cardio Fitness", 22 | "image": "path/to/cardio_image3.jpg", 23 | "totalDays": 60, 24 | "difficulty": "expert", 25 | "detailedData": "path/to/cardio_detailedData3.json" 26 | }, 27 | { 28 | "title": "HIIT Cardio", 29 | "subtitle": "High-Intensity Interval Training", 30 | "image": "path/to/cardio_image4.jpg", 31 | "totalDays": 30, 32 | "difficulty": "beginner", 33 | "detailedData": "path/to/cardio_detailedData4.json" 34 | }, 35 | { 36 | "title": "Endurance Cardio", 37 | "subtitle": "Build Cardio Endurance", 38 | "image": "path/to/cardio_image5.jpg", 39 | "totalDays": 45, 40 | "difficulty": "intermediate", 41 | "detailedData": "path/to/cardio_detailedData5.json" 42 | }, 43 | { 44 | "title": "Low Impact Cardio", 45 | "subtitle": "Gentle Cardio Workouts", 46 | "image": "path/to/cardio_image6.jpg", 47 | "totalDays": 30, 48 | "difficulty": "beginner", 49 | "detailedData": "path/to/cardio_detailedData6.json" 50 | }, 51 | { 52 | "title": "Cardio for Weight Loss", 53 | "subtitle": "Burn Calories with Cardio", 54 | "image": "path/to/cardio_image7.jpg", 55 | "totalDays": 45, 56 | "difficulty": "intermediate", 57 | "detailedData": "path/to/cardio_detailedData7.json" 58 | }, 59 | { 60 | "title": "Cardio for Runners", 61 | "subtitle": "Improve Running Performance", 62 | "image": "path/to/cardio_image8.jpg", 63 | "totalDays": 60, 64 | "difficulty": "expert", 65 | "detailedData": "path/to/cardio_detailedData8.json" 66 | }, 67 | { 68 | "title": "Cardio Dance", 69 | "subtitle": "Fun Dance Workouts", 70 | "image": "path/to/cardio_image9.jpg", 71 | "totalDays": 30, 72 | "difficulty": "beginner", 73 | "detailedData": "path/to/cardio_detailedData9.json" 74 | }, 75 | { 76 | "title": "Cardio Kickboxing", 77 | "subtitle": "High-Energy Cardio Kickboxing", 78 | "image": "path/to/cardio_image10.jpg", 79 | "totalDays": 45, 80 | "difficulty": "intermediate", 81 | "detailedData": "path/to/cardio_detailedData10.json" 82 | }, 83 | { 84 | "title": "Cardio for Seniors", 85 | "subtitle": "Gentle Cardio for Seniors", 86 | "image": "path/to/cardio_image11.jpg", 87 | "totalDays": 30, 88 | "difficulty": "beginner", 89 | "detailedData": "path/to/cardio_detailedData11.json" 90 | }, 91 | { 92 | "title": "Full Body Cardio", 93 | "subtitle": "Complete Body Cardio Workouts", 94 | "image": "path/to/cardio_image12.jpg", 95 | "totalDays": 60, 96 | "difficulty": "expert", 97 | "detailedData": "path/to/cardio_detailedData12.json" 98 | } 99 | ] 100 | } 101 | -------------------------------------------------------------------------------- /src/data/muscle builder plans/abs.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/data/muscle builder plans/abs.json -------------------------------------------------------------------------------- /src/data/muscle builder plans/biceps.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/data/muscle builder plans/biceps.json -------------------------------------------------------------------------------- /src/data/musclebuilder.json: -------------------------------------------------------------------------------- 1 | { 2 | "plans": [ 3 | { 4 | "title": "Chest", 5 | "subtitle": "Build Chest Muscles", 6 | "image": "path/to/image1.jpg", 7 | "totalDays": 30, 8 | "difficulty": "beginner", 9 | "detailedData": "path/to/detailedData1.json" 10 | }, 11 | { 12 | "title": "Neck", 13 | "subtitle": "Strengthen Neck Muscles", 14 | "image": "path/to/image2.jpg", 15 | "totalDays": 45, 16 | "difficulty": "intermediate", 17 | "detailedData": "path/to/detailedData2.json" 18 | }, 19 | { 20 | "title": "Biceps", 21 | "subtitle": "Build Bicep Muscles", 22 | "image": "path/to/image3.jpg", 23 | "totalDays": 60, 24 | "difficulty": "expert", 25 | "detailedData": "path/to/detailedData3.json" 26 | }, 27 | { 28 | "title": "Legs", 29 | "subtitle": "Strengthen Leg Muscles", 30 | "image": "path/to/image4.jpg", 31 | "totalDays": 40, 32 | "difficulty": "beginner", 33 | "detailedData": "path/to/detailedData4.json" 34 | }, 35 | { 36 | "title": "Back", 37 | "subtitle": "Build Back Muscles", 38 | "image": "path/to/image5.jpg", 39 | "totalDays": 50, 40 | "difficulty": "intermediate", 41 | "detailedData": "path/to/detailedData5.json" 42 | }, 43 | { 44 | "title": "Shoulders", 45 | "subtitle": "Build Shoulder Muscles", 46 | "image": "path/to/image6.jpg", 47 | "totalDays": 55, 48 | "difficulty": "expert", 49 | "detailedData": "path/to/detailedData6.json" 50 | }, 51 | { 52 | "title": "Abs", 53 | "subtitle": "Strengthen Core Muscles", 54 | "image": "path/to/image7.jpg", 55 | "totalDays": 30, 56 | "difficulty": "beginner", 57 | "detailedData": "path/to/detailedData7.json" 58 | }, 59 | { 60 | "title": "Triceps", 61 | "subtitle": "Build Tricep Muscles", 62 | "image": "path/to/image8.jpg", 63 | "totalDays": 45, 64 | "difficulty": "intermediate", 65 | "detailedData": "path/to/detailedData8.json" 66 | }, 67 | { 68 | "title": "Forearms", 69 | "subtitle": "Strengthen Forearm Muscles", 70 | "image": "path/to/image9.jpg", 71 | "totalDays": 60, 72 | "difficulty": "expert", 73 | "detailedData": "path/to/detailedData9.json" 74 | }, 75 | { 76 | "title": "Cardio", 77 | "subtitle": "Improve Cardiovascular Health", 78 | "image": "path/to/image10.jpg", 79 | "totalDays": 30, 80 | "difficulty": "beginner", 81 | "detailedData": "path/to/detailedData10.json" 82 | }, 83 | { 84 | "title": "Flexibility", 85 | "subtitle": "Increase Flexibility", 86 | "image": "path/to/image11.jpg", 87 | "totalDays": 45, 88 | "difficulty": "intermediate", 89 | "detailedData": "path/to/detailedData11.json" 90 | }, 91 | { 92 | "title": "Full Body", 93 | "subtitle": "Overall Body Strength", 94 | "image": "path/to/image12.jpg", 95 | "totalDays": 60, 96 | "difficulty": "expert", 97 | "detailedData": "path/to/detailedData12.json" 98 | } 99 | ] 100 | } 101 | -------------------------------------------------------------------------------- /src/data/yoga.json: -------------------------------------------------------------------------------- 1 | { 2 | "plans": [ 3 | { 4 | "title": "Beginner Yoga", 5 | "subtitle": "Start Your Yoga Journey", 6 | "image": "path/to/yoga_image1.jpg", 7 | "totalDays": 30, 8 | "difficulty": "beginner", 9 | "detailedData": "path/to/yoga_detailedData1.json" 10 | }, 11 | { 12 | "title": "Intermediate Yoga", 13 | "subtitle": "Deepen Your Practice", 14 | "image": "path/to/yoga_image2.jpg", 15 | "totalDays": 45, 16 | "difficulty": "intermediate", 17 | "detailedData": "path/to/yoga_detailedData2.json" 18 | }, 19 | { 20 | "title": "Advanced Yoga", 21 | "subtitle": "Master Advanced Poses", 22 | "image": "path/to/yoga_image3.jpg", 23 | "totalDays": 60, 24 | "difficulty": "expert", 25 | "detailedData": "path/to/yoga_detailedData3.json" 26 | }, 27 | { 28 | "title": "Yoga for Flexibility", 29 | "subtitle": "Enhance Your Flexibility", 30 | "image": "path/to/yoga_image4.jpg", 31 | "totalDays": 30, 32 | "difficulty": "beginner", 33 | "detailedData": "path/to/yoga_detailedData4.json" 34 | }, 35 | { 36 | "title": "Yoga for Strength", 37 | "subtitle": "Build Strength with Yoga", 38 | "image": "path/to/yoga_image5.jpg", 39 | "totalDays": 45, 40 | "difficulty": "intermediate", 41 | "detailedData": "path/to/yoga_detailedData5.json" 42 | }, 43 | { 44 | "title": "Yoga for Relaxation", 45 | "subtitle": "Find Peace and Relaxation", 46 | "image": "path/to/yoga_image6.jpg", 47 | "totalDays": 30, 48 | "difficulty": "beginner", 49 | "detailedData": "path/to/yoga_detailedData6.json" 50 | }, 51 | { 52 | "title": "Power Yoga", 53 | "subtitle": "Boost Your Energy", 54 | "image": "path/to/yoga_image7.jpg", 55 | "totalDays": 45, 56 | "difficulty": "intermediate", 57 | "detailedData": "path/to/yoga_detailedData7.json" 58 | }, 59 | { 60 | "title": "Yoga for Balance", 61 | "subtitle": "Improve Your Balance", 62 | "image": "path/to/yoga_image8.jpg", 63 | "totalDays": 30, 64 | "difficulty": "beginner", 65 | "detailedData": "path/to/yoga_detailedData8.json" 66 | } 67 | ] 68 | } -------------------------------------------------------------------------------- /src/fonts/EdgeOfTheGalaxyItalic-ZVJB3.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/fonts/EdgeOfTheGalaxyItalic-ZVJB3.otf -------------------------------------------------------------------------------- /src/fonts/EdgeOfTheGalaxyPoster-3zRAp.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/fonts/EdgeOfTheGalaxyPoster-3zRAp.otf -------------------------------------------------------------------------------- /src/fonts/EdgeOfTheGalaxyPosterItalic-x3o1m.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/fonts/EdgeOfTheGalaxyPosterItalic-x3o1m.otf -------------------------------------------------------------------------------- /src/fonts/EdgeOfTheGalaxyRegular-OVEa6.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/fonts/EdgeOfTheGalaxyRegular-OVEa6.otf -------------------------------------------------------------------------------- /src/fonts/Excludeditalic-jEr99.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open-Code-Crafters/FitFlex/0338cdb252eb62ecf9758faebf47fbb52bd9923f/src/fonts/Excludeditalic-jEr99.ttf -------------------------------------------------------------------------------- /src/fonts/index.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Future'; 3 | src:url('./EdgeOfTheGalaxyRegular-OVEa6.otf') format('opentype'); 4 | /* src: url('./EdgeOfTheGalaxyItalic-ZVJB3.off') format('opentype'), */ 5 | /* url('./EdgeOfTheGalaxyPoster-3zRAp.otf') format('opentype'), */ 6 | /* url('./EdgeOfTheGalaxyPosterItalic-x3o1m.otf') format('opentype'), */ 7 | } 8 | /* another cool font */ 9 | @font-face { 10 | font-family: 'Future2'; 11 | src:url('./Excludeditalic-jEr99.ttf') format('truetype'); 12 | /* src: url('./EdgeOfTheGalaxyItalic-ZVJB3.off') format('opentype'), */ 13 | /* url('./EdgeOfTheGalaxyPoster-3zRAp.otf') format('opentype'), */ 14 | /* url('./EdgeOfTheGalaxyPosterItalic-x3o1m.otf') format('opentype'), */ 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | 6 | *{ 7 | margin: 0; 8 | padding: 0; 9 | } 10 | 11 | body { 12 | overflow-x: hidden; 13 | } 14 | 15 | @font-face { 16 | font-family: 'Future2'; 17 | src: url('/fonts/Future2.ttf') format('truetype'); /* Adjust path if needed */ 18 | font-weight: normal; 19 | font-style: normal; 20 | } 21 | 22 | @layer base { 23 | :root { 24 | --background: 0 0% 100%; 25 | --foreground: 0 0% 3.9%; 26 | --card: 0 0% 100%; 27 | --card-foreground: 0 0% 3.9%; 28 | --popover: 0 0% 100%; 29 | --popover-foreground: 0 0% 3.9%; 30 | --primary: 0 0% 9%; 31 | --primary-foreground: 0 0% 98%; 32 | --secondary: 0 0% 96.1%; 33 | --secondary-foreground: 0 0% 9%; 34 | --muted: 0 0% 96.1%; 35 | --muted-foreground: 0 0% 45.1%; 36 | --accent: 0 0% 96.1%; 37 | --accent-foreground: 0 0% 9%; 38 | --destructive: 0 84.2% 60.2%; 39 | --destructive-foreground: 0 0% 98%; 40 | --border: 0 0% 89.8%; 41 | --input: 0 0% 89.8%; 42 | --ring: 0 0% 3.9%; 43 | --chart-1: 12 76% 61%; 44 | --chart-2: 173 58% 39%; 45 | --chart-3: 197 37% 24%; 46 | --chart-4: 43 74% 66%; 47 | --chart-5: 27 87% 67%; 48 | --radius: 0.5rem; 49 | } 50 | .dark { 51 | --background: 0 0% 3.9%; 52 | --foreground: 0 0% 98%; 53 | --card: 0 0% 3.9%; 54 | --card-foreground: 0 0% 98%; 55 | --popover: 0 0% 3.9%; 56 | --popover-foreground: 0 0% 98%; 57 | --primary: 0 0% 98%; 58 | --primary-foreground: 0 0% 9%; 59 | --secondary: 0 0% 14.9%; 60 | --secondary-foreground: 0 0% 98%; 61 | --muted: 0 0% 14.9%; 62 | --muted-foreground: 0 0% 63.9%; 63 | --accent: 0 0% 14.9%; 64 | --accent-foreground: 0 0% 98%; 65 | --destructive: 0 62.8% 30.6%; 66 | --destructive-foreground: 0 0% 98%; 67 | --border: 0 0% 14.9%; 68 | --input: 0 0% 14.9%; 69 | --ring: 0 0% 83.1%; 70 | --chart-1: 220 70% 50%; 71 | --chart-2: 160 60% 45%; 72 | --chart-3: 30 80% 55%; 73 | --chart-4: 280 65% 60%; 74 | --chart-5: 340 75% 55%; 75 | } 76 | } 77 | 78 | @layer base { 79 | * { 80 | @apply border-border; 81 | } 82 | body { 83 | @apply bg-background text-foreground; 84 | } 85 | } -------------------------------------------------------------------------------- /src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom/client"; 3 | import App from "./App.jsx"; 4 | const Home = React.lazy(() => import("./views/Home.jsx")); 5 | import "./index.css"; 6 | import {Route, Router, Routes, createBrowserRouter, RouterProvider} from "react-router-dom"; 7 | import Navbar from "./components/Navbar.jsx"; 8 | import Contact from "./views/Contact.jsx"; 9 | import { FirebaseProvider } from "./context/Firebase.jsx"; 10 | import Profile from "./views/Profile.jsx"; 11 | 12 | import { ToastContainer } from "react-toastify"; 13 | import 'react-toastify/dist/ReactToastify.css'; 14 | 15 | const router = createBrowserRouter([ 16 | { 17 | path: "/", 18 | element: , 19 | errorElement:
404 Not Found
, 20 | children: [ 21 | { 22 | path: "home", 23 | element: , 24 | }, 25 | 26 | { 27 | path: "plans/", 28 | element:
Plans
, 29 | }, 30 | { 31 | path: "workout/:day", 32 | element:
workout day,huihui
, 33 | }, 34 | { 35 | path: "plans/:planId", 36 | element:
Plans id
, 37 | }, 38 | { 39 | path: "about", 40 | element:
About
, 41 | }, 42 | { 43 | path: "contact", 44 | element: , 45 | }, 46 | { 47 | path: "profile", 48 | element: 49 | }, 50 | ], 51 | }, 52 | ]); 53 | ReactDOM.createRoot(document.getElementById("root")).render( 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | ); 62 | 63 | -------------------------------------------------------------------------------- /src/metadata.jsx: -------------------------------------------------------------------------------- 1 | import { Helmet } from "react-helmet"; 2 | 3 | const Metadata = () => ( 4 | 5 | FitFlex - Your Fitness Journey 6 | 10 | 11 | 12 | 13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | ); 38 | 39 | export default Metadata; 40 | -------------------------------------------------------------------------------- /src/root.jsx: -------------------------------------------------------------------------------- 1 | import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; 2 | import { faHome } from "@fortawesome/free-solid-svg-icons"; 3 | import Grid from "@mui/material/Grid"; 4 | import Paper from "@mui/material/Paper"; 5 | import ExerciseCard from "./components/ExerciseCard"; 6 | import { useState } from "react"; 7 | export default function Root() { 8 | const [arr,setArr] = useState(["btn 1", "btn 2", "btn 3", "btn 4", "btn 5", "btn 6", "btn 7", "btn 8", "btn 9"]); 9 | const handleDelete=(name)=>{ 10 | setArr(arr.filter((ele)=>ele!=name)) 11 | } 12 | 13 | return ( 14 | <> 15 | 16 | Website for fitness 17 |
18 | 19 | {arr.map((item, index) => ( 20 | 21 | 22 | {/* */} 23 | 24 | 25 | 26 | ))} 27 | 28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ); 37 | } 38 | -------------------------------------------------------------------------------- /src/styles/BacktoTop.css: -------------------------------------------------------------------------------- 1 | #backToTopBtn { 2 | position: fixed; 3 | bottom: 1rem; 4 | right: 5.3rem; 5 | z-index: 1000; 6 | display: none; 7 | background-color: #ff6a00; 8 | color: white; 9 | border: none; 10 | border-radius: 50%; 11 | padding: 15px; 12 | cursor: pointer; 13 | opacity: 0.8; 14 | transition: opacity 0.3s ease, background-color 0.3s ease; 15 | box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3); 16 | } 17 | 18 | #backToTopBtn:hover { 19 | background-color: #333; 20 | opacity: 1; 21 | } 22 | 23 | #backToTopBtn svg { 24 | display: block; 25 | margin: 0 auto; 26 | } 27 | 28 | @media (max-width: 600px) { 29 | #backToTopBtn { 30 | right: 5.3rem; 31 | padding: 10px; 32 | border: 1px solid white; 33 | } 34 | } 35 | 36 | @media (max-width: 400px) { 37 | #backToTopBtn { 38 | right: 5.1rem; 39 | padding: 8px; 40 | border: 1px solid white; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/styles/Contributors.css: -------------------------------------------------------------------------------- 1 | .contributors-container { 2 | width: 100%; 3 | height: 100%; 4 | padding-top: 2rem; 5 | overflow: hidden; 6 | transition: background 0.3s ease-in-out; /* Add transition for smooth background change */ 7 | } 8 | 9 | .github-icon { 10 | margin-right: 0.5rem; 11 | vertical-align: middle; 12 | fill: white; /* Adjust color as needed */ 13 | } 14 | 15 | .contributors-title { 16 | margin-top: 8rem; 17 | text-align: center; 18 | color: #fb5f04; 19 | font-size: 3rem; 20 | font-weight: bold; 21 | margin-bottom: 2rem; 22 | text-transform: uppercase; 23 | } 24 | 25 | .contributors-grid { 26 | display: flex; 27 | flex-wrap: wrap; 28 | justify-content: center; 29 | gap: 2rem; 30 | margin-bottom: 4rem; 31 | } 32 | 33 | .contributor-card { 34 | position: relative; 35 | width: 100%; 36 | max-width: 25%; 37 | display: flex; 38 | flex-direction: column; 39 | align-items: center; 40 | background-color: rgb(245, 245, 170); 41 | border: 1px solid #f69207; 42 | border-radius: 0.5rem; 43 | box-shadow: 0 1px 3px rgba(255, 143, 106, 0.5); 44 | padding: 1rem; 45 | overflow: hidden; 46 | transition: transform 0.4s ease, box-shadow 0.3s ease; 47 | } 48 | 49 | .contributor-card:hover { 50 | transform: scale(1.05); 51 | box-shadow: 0 4px 6px rgba(248, 199, 21, 0.752); 52 | } 53 | 54 | .contributor-card:hover p { 55 | text-shadow: 1px 1px 2px rgb(240, 244, 245), 0 0 0.2em rgb(251, 253, 253), 56 | 0 0 0.8em rgb(236, 239, 240); 57 | color: rgb(0, 0, 0); 58 | font-weight: 500; 59 | } 60 | 61 | .contributor-card:hover h2 { 62 | text-shadow: 1px 1px 2px rgba(248, 244, 247, 0.926), 63 | 0 0 0.2em rgb(248, 250, 251), 0 0 0.8em rgb(252, 253, 253); 64 | color: white; 65 | font-size: 1.04rem; 66 | font-weight: 600; 67 | text-decoration: wavy; 68 | } 69 | 70 | .contributor-card:hover .contributor-avatar { 71 | border: 3.5px solid #fb422a; 72 | width: 5.2rem; 73 | height: 5.2rem; 74 | box-shadow: -2px 4px 10px 1px rgba(250, 250, 13, 0.75); 75 | } 76 | 77 | .contributor-card::before { 78 | content: ""; 79 | position: absolute; 80 | top: 0; 81 | left: 0; 82 | width: 100%; 83 | height: 100%; 84 | background: linear-gradient(152deg, #0d0b0b 50%, #fca903 50%); 85 | transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out; 86 | transform: translate(-100%, -100%); 87 | opacity: 0; 88 | z-index: -1; 89 | } 90 | 91 | .contributor-card:hover::before { 92 | transform: translate(0, 0); 93 | opacity: 1; 94 | } 95 | 96 | .contributor-link { 97 | display: block; 98 | } 99 | 100 | .contributor-avatar { 101 | width: 5rem; 102 | height: 5rem; 103 | border-radius: 50%; 104 | object-fit: cover; 105 | margin-bottom: 1rem; 106 | border: 2px solid #ff2d03; 107 | transition: border 0.4s ease-in-out, height 0.4s ease-in-out, 108 | width 0.4s ease-in-out, box-shadow 0.3s ease-in-out; 109 | } 110 | 111 | .contributor-name { 112 | font-size: 1rem; 113 | font-weight: 600; 114 | color: #050506; 115 | margin-bottom: 0.5rem; 116 | transition: text-shadow 0.4s ease-in-out, font-size 0.5s ease-in-out, 117 | text-decoration 0.4s ease-in-out; 118 | } 119 | 120 | .contributor-contributions { 121 | color: #070707; 122 | transition: text-shadow 0.4s ease-in-out; 123 | } 124 | 125 | @media (max-width: 1200px) { 126 | .contributor-card { 127 | max-width: 33.333%; 128 | } 129 | } 130 | 131 | @media (max-width: 992px) { 132 | .contributor-card { 133 | max-width: 50%; 134 | } 135 | } 136 | 137 | @media (max-width: 768px) { 138 | .contributor-card { 139 | max-width: 97%; 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /src/styles/DietRecommendation.css: -------------------------------------------------------------------------------- 1 | .diet-recommendation-container { 2 | display: flex; 3 | flex-direction: column; 4 | align-items: center; 5 | font-family: 'Arial', sans-serif; 6 | background-color: #f8f9fa; 7 | border-radius: 10px; 8 | padding: 20px; 9 | background-image: url('../assets/img/Food_Diet_Bg.png'); 10 | background-size: cover; 11 | background-position: center; 12 | background-attachment: fixed; 13 | min-height: 100vh; 14 | position: relative; 15 | z-index: 1; 16 | } 17 | 18 | .diet-recommendation-container::before { 19 | content: ''; 20 | position: absolute; 21 | top: 0; 22 | left: 0; 23 | width: 100%; 24 | height: 100%; 25 | background: rgba(0, 0, 0, 0.5); 26 | z-index: -1; 27 | } 28 | 29 | 30 | .heading { 31 | font-size: 2rem; 32 | color: #ffffff; 33 | margin-bottom: 20px; 34 | } 35 | 36 | .glassmorphic-box { 37 | background: rgba(255, 119, 0, 0.2); 38 | border-radius: 20px; 39 | padding: 20px; 40 | backdrop-filter: blur(10px); 41 | border: 1px solid rgba(255, 255, 255, 0.3); 42 | box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2); 43 | width: 100%; 44 | max-width: 400px; 45 | } 46 | 47 | .recommendation-form { 48 | display: flex; 49 | flex-direction: column; 50 | width: 100%; 51 | } 52 | 53 | .recommendation-form label { 54 | margin-top: 10px; 55 | font-size: 0.9rem; 56 | color: #ffffff; 57 | } 58 | 59 | .recommendation-form input, 60 | .recommendation-form select, 61 | .recommendation-form button { 62 | padding: 10px; 63 | margin: 5px 0 10px 0; 64 | border: 1px solid #ccc; 65 | border-radius: 5px; 66 | font-size: 1rem; 67 | } 68 | 69 | .recommendation-form button { 70 | background-color: #28a745; 71 | color: white; 72 | cursor: pointer; 73 | transition: background-color 0.3s; 74 | } 75 | 76 | .recommendation-form button:hover { 77 | background-color: #218838; 78 | } 79 | 80 | .error-message { 81 | color: red; 82 | margin-top: 10px; 83 | } 84 | 85 | .recommendations-box { 86 | margin-top: 30px; 87 | width: 100%; 88 | max-width: 600px; 89 | background-color: #ffffff; 90 | border-radius: 10px; 91 | box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); 92 | padding: 20px; 93 | animation: fadeIn 0.5s; 94 | } 95 | 96 | .recommendation-category { 97 | margin-bottom: 20px; 98 | } 99 | 100 | .recommendation-category h3 { 101 | color: #333; 102 | margin-bottom: 10px; 103 | } 104 | 105 | .recommendation-category ul { 106 | list-style-type: none; 107 | padding: 0; 108 | } 109 | 110 | .recommendation-category li { 111 | background-color: #e9ecef; 112 | border-radius: 5px; 113 | padding: 8px; 114 | margin: 5px 0; 115 | transition: transform 0.2s; 116 | } 117 | 118 | .recommendation-category li:hover { 119 | transform: translateY(-2px); 120 | } 121 | 122 | @keyframes fadeIn { 123 | from { 124 | opacity: 0; 125 | } 126 | to { 127 | opacity: 1; 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /src/styles/ProgressBar.css: -------------------------------------------------------------------------------- 1 | #progressBarContainer { 2 | position: fixed; 3 | top: 0; 4 | left: 0; 5 | width: 100%; 6 | height: 7px; 7 | background-color: #232426; 8 | z-index: 9999; 9 | } 10 | 11 | #progressBar { 12 | height: 100%; 13 | width: 0%; 14 | background: orange; 15 | transition: width 0.4s ease; 16 | } 17 | -------------------------------------------------------------------------------- /src/styles/Services.css: -------------------------------------------------------------------------------- 1 | .service-grid { 2 | font-family: 'Roboto', sans-serif; 3 | display: grid; 4 | grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 5 | gap: 50px; 6 | padding: 100px; 7 | justify-items: center; 8 | } 9 | 10 | /* Dark Theme */ 11 | .service-grid.dark { 12 | background-color: #1e1e1e; 13 | color: #ffffff; 14 | } 15 | 16 | /* Light Theme */ 17 | .service-grid.light { 18 | background-color: #f7f7f7; 19 | color: #000000; 20 | } 21 | 22 | /* Individual card styling */ 23 | .service-card { 24 | background-color: var(--card-bg-color); 25 | border-radius: 10px; 26 | padding: 20px; 27 | background-color: #FBAB7E; 28 | background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%); 29 | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); 30 | transition: transform 0.3s ease, box-shadow 0.3s ease; 31 | position: relative; 32 | overflow: hidden; 33 | text-align: center; 34 | margin-top: 5rem !important; 35 | } 36 | 37 | .service-card:hover { 38 | transform: scale(1.05); 39 | box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); 40 | } 41 | 42 | /* Ensure equal image size */ 43 | .service-card img { 44 | width: 100%; 45 | /* max-width: 300px; */ 46 | height: 200px; 47 | object-fit: cover; 48 | border-radius: 5px; 49 | margin-bottom: 15px; 50 | transition: transform 0.3s ease; 51 | } 52 | 53 | .service-card:hover img { 54 | transform: scale(1.1); 55 | } 56 | 57 | /* Title and description */ 58 | .service-card h2 { 59 | font-size: 1.6em; 60 | margin-bottom: 15px; 61 | text-transform: capitalize; 62 | color:#682f2f; 63 | } 64 | 65 | .service-card p { 66 | font-size: 0.9em; 67 | line-height: 1.6; 68 | margin-bottom: 20px; 69 | color:#020d1d; 70 | font-weight: 700; 71 | } 72 | 73 | /* Button styling */ 74 | .service-card button { 75 | padding: 12px 25px; 76 | background-color: var(--button-bg-color); 77 | color: #fff; 78 | border: none; 79 | border-radius: 5px; 80 | cursor: pointer; 81 | font-size: 1em; 82 | font-weight: bold; 83 | transition: background-color 0.3s ease; 84 | } 85 | 86 | .service-card button:hover { 87 | background-color: var(--button-hover-bg-color); 88 | } 89 | 90 | /* Views and Likes section */ 91 | .stats { 92 | margin-top: 15px; 93 | display: flex; 94 | justify-content: space-between; 95 | padding-inline:10px; 96 | 97 | } 98 | 99 | .service-card .stats span { 100 | display: flex; 101 | align-items: center; 102 | font-size: 0.9em; 103 | cursor: pointer; 104 | } 105 | 106 | 107 | 108 | /* Modal Styles */ 109 | .modal-overlay { 110 | position: fixed; 111 | top: 0; 112 | left: 0; 113 | width: 100%; 114 | height: 100%; 115 | background: rgba(0, 0, 0, 0.6); 116 | display: flex; 117 | justify-content: center; 118 | align-items: center; 119 | z-index: 1000; 120 | } 121 | 122 | .modal-content { 123 | background-color: #fff; 124 | padding: 20px; 125 | max-width: 500px; 126 | border-radius: 8px; 127 | position: relative; 128 | } 129 | 130 | .close-button { 131 | position: absolute; 132 | top: 10px; 133 | right: 10px; 134 | background-color: transparent; 135 | border: none; 136 | font-size: 1.5em; 137 | cursor: pointer; 138 | } 139 | 140 | /* Dark and Light theme variables */ 141 | :root { 142 | --card-bg-color: #2a2a2a; 143 | --button-bg-color: #ff6347; 144 | --button-hover-bg-color: #ff4500; 145 | } 146 | 147 | .service-grid.light { 148 | --card-bg-color: #ffffff; 149 | 150 | --button-bg-color: #682f2f; 151 | --button-hover-bg-color: #291313; 152 | } 153 | 154 | @media (max-width: 768px) { 155 | .service-grid { 156 | padding: 50px; 157 | gap: 30px; 158 | } 159 | } 160 | 161 | @media (max-width: 480px) { 162 | .service-grid { 163 | padding: 20px; 164 | gap: 20px; 165 | } 166 | .stats{ 167 | font-size: small; 168 | } 169 | } 170 | 171 | @media (max-width: 480px) { 172 | .service-card button { 173 | padding: 10px 20px; 174 | } 175 | } 176 | 177 | 178 | -------------------------------------------------------------------------------- /src/styles/SuccessStories.css: -------------------------------------------------------------------------------- 1 | /* SliderSuccess container */ 2 | .sliderSuccess { 3 | position: relative; 4 | overflow: hidden; 5 | display: flex; 6 | justify-content: center; 7 | align-items: center; 8 | padding: 20px 80px; 9 | flex-direction: column; 10 | } 11 | 12 | .sliderSuccess h1 { 13 | font-size: 3rem; 14 | font-weight: 700; 15 | text-transform: uppercase; 16 | letter-spacing: 2px; 17 | text-align: center; 18 | color: #016457; 19 | margin-bottom: 30px; 20 | background: linear-gradient(90deg, rgb(73, 48, 0) 0%, rgb(196, 167, 3) 100%); 21 | -webkit-background-clip: text; 22 | color: transparent; 23 | padding: 10px 20px; 24 | border-radius: 8px; 25 | box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1); 26 | } 27 | 28 | @media (max-width: 768px) { 29 | .sliderSuccess h1 { 30 | font-size: 2.4rem; 31 | letter-spacing: 1.5px; 32 | } 33 | } 34 | 35 | @media (max-width: 480px) { 36 | .sliderSuccess h1 { 37 | font-size: 2rem; 38 | letter-spacing: 1px; 39 | } 40 | } 41 | 42 | 43 | /* Each sliderSuccess item */ 44 | .sliderSuccess .item { 45 | position: absolute; 46 | width: 350px; 47 | height: 320px; 48 | border-radius: 16px; 49 | padding: 20px; 50 | transition: transform 0.5s ease, box-shadow 0.5s ease; 51 | background: linear-gradient(90deg, rgb(239, 156, 0) 0%, rgb(196, 167, 3) 100%); 52 | display: flex; 53 | flex-direction: column; 54 | align-items: center; 55 | box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15); 56 | color: white; 57 | } 58 | 59 | .sliderSuccess .item:hover { 60 | transform: scale(1.05); 61 | box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2); 62 | } 63 | 64 | .sliderSuccess .item img { 65 | width: 160px; 66 | height: 160px; 67 | border-radius: 50%; 68 | object-fit: cover; 69 | margin-bottom: 20px; 70 | cursor: pointer; 71 | transition: transform 0.4s ease, filter 0.4s ease; 72 | border: 4px solid #d0e7b0; 73 | } 74 | 75 | .sliderSuccess .item img:hover { 76 | transform: scale(1.2); 77 | filter: brightness(1.15); 78 | } 79 | 80 | /* Hover effects */ 81 | .sliderSuccess .item img:mouseout { 82 | transform: scale(1); 83 | filter: brightness(1); 84 | } 85 | 86 | /* Star rating */ 87 | .sliderSuccess .stars { 88 | color: #ffd700; 89 | font-size: 1.6rem; 90 | margin-top: auto; 91 | } 92 | 93 | .sliderSuccess .item p { 94 | text-align: center; 95 | margin-bottom: 15px; 96 | font-size: 0.95rem; 97 | } 98 | 99 | /* Headers */ 100 | .sliderSuccess .item h2 { 101 | margin-bottom: 12px; 102 | font-size: 1.5rem; 103 | font-weight: 700; 104 | text-transform: uppercase; 105 | letter-spacing: 1px; 106 | } 107 | 108 | .sliderSuccess #next, 109 | .sliderSuccess #prev { 110 | position: absolute; 111 | top: 35%; 112 | transform: translateY(-50%); 113 | color: #fff; 114 | background: linear-gradient(90deg, rgb(239, 156, 0) 0%, rgb(196, 167, 3) 100%); 115 | border: none; 116 | font-size: 2.5rem; 117 | font-family: 'Courier New', monospace; 118 | font-weight: bold; 119 | opacity: 0.85; 120 | transition: opacity 0.3s ease, background-color 0.3s ease; 121 | z-index: 10; 122 | cursor: pointer; 123 | padding: 10px; 124 | border-radius: 50%; 125 | } 126 | 127 | .sliderSuccess #next:hover, 128 | .sliderSuccess #prev:hover { 129 | opacity: 1; 130 | background: rgba(0, 0, 0, 0.8); 131 | } 132 | 133 | .sliderSuccess #next { 134 | right: 30px; 135 | } 136 | 137 | .sliderSuccess #prev { 138 | left: 30px; 139 | } 140 | 141 | /* Responsive styles */ 142 | @media (max-width: 640px) { 143 | .sliderSuccess { 144 | padding: 0px; 145 | } 146 | 147 | .sliderSuccess .item { 148 | width: 280px; 149 | height: 400px; 150 | } 151 | 152 | .sliderSuccess .item img { 153 | height: 120px; 154 | width: 120px; 155 | } 156 | 157 | .sliderSuccess .stars { 158 | margin-top: 10px; 159 | } 160 | 161 | .sliderSuccess .item p { 162 | font-size: 0.85rem; 163 | margin-bottom: 10px; 164 | } 165 | 166 | .sliderSuccess .item h2 { 167 | font-size: 1.25rem; 168 | margin-bottom: 10px; 169 | } 170 | 171 | .sliderSuccess #next, 172 | .sliderSuccess #prev { 173 | font-size: 2rem; 174 | } 175 | 176 | .sliderSuccess #next { 177 | right: 10px; 178 | } 179 | 180 | .sliderSuccess #prev { 181 | left: 10px; 182 | } 183 | } -------------------------------------------------------------------------------- /src/styles/about.css: -------------------------------------------------------------------------------- 1 | .slogan { 2 | margin-top: 100px; 3 | text-align: center; 4 | color: #2c3e50; 5 | padding: 20px; 6 | } 7 | 8 | .slogan h2 { 9 | color: #e67e22; 10 | font-size: 32px; 11 | font-style: italic; 12 | } 13 | 14 | .slogan h3 { 15 | color: #555; 16 | font-size: 24px; 17 | margin-top: 10px; 18 | } 19 | 20 | .slogan p { 21 | color: #555; 22 | font-size: 1.5rem; 23 | margin-top: 10px; 24 | line-height: 1.5; 25 | font-weight: 500; 26 | } 27 | 28 | @media (prefers-color-scheme: dark) { 29 | .slogan { 30 | color: white; /* Change the slogan color for dark mode */ 31 | } 32 | 33 | .slogan h3, .slogan p { 34 | color: white; /* Change h3 and p color for dark mode */ 35 | } 36 | } 37 | 38 | .mission-vision-container { 39 | display: flex; 40 | justify-content: space-around; 41 | gap: 40px; 42 | padding: 2rem 0; 43 | } 44 | 45 | .mission-vision-card { 46 | flex: 1; 47 | padding: 1.5rem; 48 | border-radius: 8px; 49 | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 50 | transition: transform 0.3s ease; 51 | max-height: 400px; 52 | text-align: center; 53 | max-width: 400px; 54 | } 55 | 56 | .mission-vision-card:hover { 57 | transform: translateY(-5px); 58 | } 59 | 60 | 61 | .mission-vision-card h4 { 62 | color: #ff8c00; 63 | font-size: 1.8rem; 64 | font-weight: bold; 65 | margin-bottom: 1rem; 66 | display: flex; 67 | justify-content: center; 68 | } 69 | 70 | .mission-vision-card p { 71 | color: #666; 72 | font-size: 1.5rem; 73 | font-weight: 500; 74 | } 75 | 76 | .mission-vision-card img { 77 | width: 100%; 78 | height: 96px; 79 | object-fit: contain; 80 | border-radius: 10px; 81 | margin-bottom: 15px; 82 | } 83 | 84 | .offer-box { 85 | background-color: #fff; 86 | padding: 3rem; 87 | border-radius: 12px; 88 | border: 1px solid #e0e0e0; 89 | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 90 | height: 100%; 91 | transition: transform 0.3s ease; 92 | } 93 | 94 | .offer-box:hover { 95 | transform: translateY(-5px); 96 | } 97 | 98 | 99 | .stat-card { 100 | padding: 1.5rem; 101 | border-radius: 16px; 102 | border: none; 103 | box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); 104 | text-align: center; 105 | max-width: 280px; 106 | transition: transform 0.3s ease, box-shadow 0.3s ease; 107 | } 108 | 109 | .stat-card:hover { 110 | transform: translateY(-8px); 111 | box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15); 112 | } 113 | 114 | 115 | .numbers { 116 | font-size: 2.5rem; /* Increase font size */ 117 | font-weight: 900; 118 | background: linear-gradient(135deg, #3498db, #e74c3c); 119 | -webkit-background-clip: text; 120 | -webkit-text-fill-color: transparent; 121 | padding-bottom: 8px; 122 | text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2); /* Add subtle shadow */ 123 | margin: 0; /* Remove margin */ 124 | transition: all 0.3s ease; /* Smooth transition */ 125 | } 126 | 127 | .stat-card:hover .numbers { 128 | transform: scale(1.1); /* Slight zoom on hover */ 129 | } 130 | 131 | 132 | .stat-card .MuiTypography-root { 133 | font-family: 'Poppins', sans-serif; /* Use a modern font */ 134 | font-size: 1.2rem; /* Increase font size */ 135 | font-weight: 500; 136 | color: #7f8c8d; 137 | letter-spacing: 0.03rem; /* Add slight letter spacing */ 138 | margin-top: 0.5rem; 139 | } 140 | 141 | 142 | .grid-container { 143 | display: flex; 144 | justify-content: space-around; 145 | 146 | flex-wrap: nowrap; 147 | gap: 20px; 148 | padding: 2rem 0; 149 | } 150 | 151 | .feature-card { 152 | padding: 1.5rem; 153 | border-radius: 8px; 154 | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 155 | height: 100%; 156 | text-align: center; 157 | } 158 | 159 | 160 | /* Responsive Design */ 161 | @media (max-width: 768px) { 162 | .mission-vision-container { 163 | flex-direction: column; 164 | } 165 | 166 | .mission-vision-card{ 167 | max-height: 400px; 168 | } 169 | 170 | .grid-container{ 171 | flex-wrap: wrap; 172 | justify-content: center; 173 | } 174 | 175 | .stat-card { 176 | max-width: 100%; 177 | margin-bottom: 1.5rem; 178 | } 179 | 180 | .stat-card, .feature-card { 181 | flex: 1; 182 | } 183 | 184 | .numbers{ 185 | font-size: 1.2rem; 186 | padding-bottom: 4px; 187 | } 188 | .numbers4{ 189 | font-size: 1.2rem; 190 | padding-bottom: 4px; 191 | } 192 | } 193 | -------------------------------------------------------------------------------- /src/styles/blog.css: -------------------------------------------------------------------------------- 1 | .blog-container { 2 | display: flex; 3 | flex-wrap: wrap; 4 | justify-content: space-between; 5 | gap: 20px; 6 | padding: 20px; 7 | margin-top: 150px; 8 | } 9 | 10 | .blog-card { 11 | background-color: #fff; 12 | border-radius: 10px; 13 | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 14 | overflow: hidden; 15 | width: 30%; 16 | max-width: 400px; 17 | } 18 | 19 | .blog-image { 20 | width: 100%; 21 | height: 200px; 22 | object-fit: cover; 23 | } 24 | 25 | .blog-content { 26 | padding: 20px; 27 | } 28 | 29 | .blog-title { 30 | font-size: 1.5em; 31 | margin-bottom: 10px; 32 | font-weight: bold; 33 | } 34 | 35 | .blog-author { 36 | font-size: 0.9em; 37 | color: #777; 38 | margin-bottom: 20px; 39 | } 40 | 41 | .blog-excerpt { 42 | font-size: 1em; 43 | line-height: 1.5; 44 | margin-bottom: 20px; 45 | } 46 | 47 | .read-more-button { 48 | background-color: #007BFF; 49 | color: white; 50 | padding: 10px 20px; 51 | border: none; 52 | border-radius: 5px; 53 | cursor: pointer; 54 | display: block; 55 | text-align: center; 56 | margin-bottom: 20px; 57 | } 58 | 59 | .read-more-button:hover { 60 | background-color: #0056b3; 61 | } 62 | 63 | .blog-metrics { 64 | display: flex; 65 | justify-content: space-between; 66 | align-items: center; 67 | } 68 | 69 | .views, 70 | .likes { 71 | font-size: 0.9em; 72 | color: #333; 73 | } 74 | 75 | .like-button { 76 | background-color: transparent; 77 | border: none; 78 | cursor: pointer; 79 | } -------------------------------------------------------------------------------- /src/styles/shared.css: -------------------------------------------------------------------------------- 1 | @keyframes fade { 2 | 0% { opacity: 0; } 3 | 25% { opacity: 1; } 4 | 75% { opacity: 1; } 5 | 100% { opacity: 0; } 6 | } 7 | 8 | /* 9 | body { 10 | height: 100vh; 11 | display: flex; 12 | justify-content: center; 13 | align-items: center; 14 | } */ 15 | 16 | 17 | /* below is css for custom button, do not change */ 18 | .wrapper { 19 | display: flex; 20 | justify-content: center; 21 | } 22 | 23 | .cta { 24 | display: flex; 25 | padding: 10px 45px; 26 | text-decoration: none; 27 | font-family: 'Poppins', sans-serif; 28 | font-size: 40px; 29 | color: white; 30 | background: #6225E6; 31 | transition: 1s; 32 | box-shadow: 6px 6px 0 black; 33 | transform: skewX(-15deg); 34 | } 35 | 36 | .cta:focus { 37 | outline: none; 38 | } 39 | 40 | .cta:hover { 41 | transition: 0.5s; 42 | box-shadow: 10px 10px 0 #FBC638; 43 | } 44 | 45 | .cta span:nth-child(2) { 46 | transition: 0.5s; 47 | margin-right: 0px; 48 | } 49 | 50 | .cta:hover span:nth-child(2) { 51 | transition: 0.5s; 52 | margin-right: 45px; 53 | } 54 | 55 | span { 56 | transform: skewX(15deg) 57 | } 58 | 59 | span:nth-child(2) { 60 | width: 20px; 61 | margin-left: 30px; 62 | position: relative; 63 | top: 12%; 64 | } 65 | 66 | /**************SVG****************/ 67 | 68 | path.one { 69 | transition: 0.4s; 70 | transform: translateX(-60%); 71 | } 72 | 73 | path.two { 74 | transition: 0.5s; 75 | transform: translateX(-30%); 76 | } 77 | 78 | .cta:hover path.three { 79 | animation: color_anim 1s infinite 0.2s; 80 | } 81 | 82 | .cta:hover path.one { 83 | transform: translateX(0%); 84 | animation: color_anim 1s infinite 0.6s; 85 | } 86 | 87 | .cta:hover path.two { 88 | transform: translateX(0%); 89 | animation: color_anim 1s infinite 0.4s; 90 | } 91 | 92 | /* SVG animations */ 93 | 94 | @keyframes color_anim { 95 | 0% { 96 | fill: white; 97 | } 98 | 50% { 99 | fill: #FBC638; 100 | } 101 | 100% { 102 | fill: white; 103 | } 104 | } 105 | 106 | @media (max-width: 600px) { 107 | .cta { 108 | font-size: 25px; 109 | padding: 5px 20px; 110 | } 111 | span:nth-child(2) { 112 | width: 15px; 113 | margin-left: 23px; 114 | position: relative; 115 | top: 12%; 116 | } 117 | } -------------------------------------------------------------------------------- /src/views/Contributors.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import axios from "axios"; 3 | import "../styles/Contributors.css"; 4 | 5 | function Contributors() { 6 | const [contributors, setContributors] = useState([]); 7 | const [loading, setLoading] = useState(true); 8 | const [error, setError] = useState(null); 9 | 10 | useEffect(() => { 11 | async function fetchContributors() { 12 | let allContributors = []; 13 | let page = 1; 14 | 15 | try { 16 | while (true) { 17 | const response = await axios.get( 18 | `https://api.github.com/repos/Open-Code-Crafters/FitFlex/contributors`, 19 | { 20 | params: { 21 | per_page: 100, 22 | page, 23 | }, 24 | } 25 | ); 26 | const data = response.data; 27 | 28 | // Check GitHub rate limit 29 | const remaining = response.headers["x-ratelimit-remaining"]; 30 | if (remaining === "0") { 31 | setError("Rate limit exceeded. Please try again later."); 32 | break; 33 | } 34 | 35 | if (data.length === 0) { 36 | break; 37 | } 38 | 39 | allContributors = [...allContributors, ...data]; 40 | page++; 41 | } 42 | 43 | // Sort contributors by number of contributions 44 | allContributors.sort((a, b) => b.contributions - a.contributions); 45 | setContributors(allContributors); 46 | } catch (error) { 47 | console.error("Error fetching contributors:", error.message); 48 | setError("Failed to load contributors. Please try again later."); 49 | } finally { 50 | setLoading(false); 51 | } 52 | } 53 | fetchContributors(); 54 | }, []); 55 | 56 | if (loading) { 57 | return
Loading contributors...
; 58 | } 59 | 60 | if (error) { 61 | return ( 62 |
63 |

{error}

64 |
65 | ); 66 | } 67 | 68 | return ( 69 |
70 |

Our Contributors

71 |
72 | {contributors.length > 0 ? ( 73 | contributors.map((contributor) => ( 74 |
75 | 81 | {contributor.login} { 85 | e.target.src = "path/to/fallback_image.png"; 86 | }} 87 | className="contributor-avatar" 88 | /> 89 | 90 |

{contributor.login}

91 |

92 | Contributions: {contributor.contributions} 93 |

94 |
95 | )) 96 | ) : ( 97 |

No contributors found.

98 | )} 99 |
100 |
101 | ); 102 | } 103 | 104 | export default Contributors; 105 | -------------------------------------------------------------------------------- /src/views/ForgotPassword.jsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | import { getAuth, sendPasswordResetEmail } from "firebase/auth"; 3 | import { 4 | Container, 5 | TextField, 6 | Button, 7 | Typography, 8 | Snackbar, 9 | Alert, 10 | } from "@mui/material"; 11 | import BackgrundImg from "../assets/home/homeImg2.avif"; 12 | import { useNavigate } from "react-router-dom"; 13 | 14 | const ForgotPassword = () => { 15 | const [email, setEmail] = useState(""); 16 | const [openSnackbar, setOpenSnackbar] = useState(false); 17 | const [error, setError] = useState(null); 18 | const navigate = useNavigate(); 19 | 20 | const handleSubmit = async (e) => { 21 | e.preventDefault(); 22 | const auth = getAuth(); 23 | 24 | try { 25 | await sendPasswordResetEmail(auth, email); 26 | setOpenSnackbar(true); 27 | setError(null); 28 | } catch (error) { 29 | setError( 30 | "Failed to send reset email. Please check your email and try again." 31 | ); 32 | setOpenSnackbar(true); 33 | } 34 | }; 35 | 36 | const handleCloseSnackbar = () => { 37 | setOpenSnackbar(false); 38 | }; 39 | 40 | const handleBackToLogin = () => { 41 | navigate("/login"); 42 | }; 43 | 44 | return ( 45 | 63 | 75 | 76 | Forgot Password 77 | 78 | 79 | Enter your email to reset your password 80 | 81 |
85 | setEmail(e.target.value)} 93 | sx={{ marginBottom: "1rem", fontFamily: "Future2" }} 94 | /> 95 | 108 | 109 | 110 | 116 |
117 | 118 | 124 | 129 | {error ? error : "Password reset link has been sent to your email!"} 130 | 131 | 132 |
133 | ); 134 | }; 135 | 136 | export default ForgotPassword; 137 | -------------------------------------------------------------------------------- /src/views/NotFound.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Box, Typography, Button } from '@mui/material'; 3 | import { useNavigate } from 'react-router-dom'; 4 | 5 | const NotFound = () => { 6 | const navigate = useNavigate(); 7 | 8 | return ( 9 | 20 | 21 | 404 22 | 23 | 24 | Oops! Page Not Found 25 | 26 | 27 | The page you're looking for doesn't exist. 28 | 29 | 40 | 41 | ); 42 | }; 43 | 44 | export default NotFound; 45 | -------------------------------------------------------------------------------- /src/views/PrivacyPolicy.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Box, Typography, Paper } from "@mui/material"; 3 | import { styled } from "@mui/system"; 4 | import { createTheme, ThemeProvider } from "@mui/material/styles"; 5 | 6 | // Styled components for the privacy policy page 7 | const PolicyContainer = styled(Paper)(({ theme }) => ({ 8 | padding: theme.spacing(4), 9 | maxWidth: "800px", 10 | margin: "auto", 11 | backgroundColor: "rgba(0, 0, 0, 0.8)", 12 | backdropFilter: "blur(10px)", 13 | borderRadius: theme.shape.borderRadius, 14 | boxShadow: "0 10px 30px rgba(0, 0, 0, 0.5)", 15 | transition: "transform 0.3s ease, box-shadow 0.3s ease", 16 | "&:hover": { 17 | transform: "translateY(-5px)", 18 | boxShadow: "0 20px 40px rgba(0, 0, 0, 0.6)", 19 | }, 20 | })); 21 | 22 | const theme = createTheme({ 23 | palette: { 24 | mode: "dark", 25 | background: { 26 | default: "#121212", 27 | }, 28 | primary: { 29 | main: "#ff6f61", 30 | }, 31 | secondary: { 32 | main: "#ff3d00", 33 | }, 34 | }, 35 | typography: { 36 | h6: { 37 | fontFamily: "Future2, Arial, sans-serif", 38 | }, 39 | body1: { 40 | fontSize: "1rem", // Decrease font size (default is 1rem) 41 | fontWeight: "normal", // Adjust weight (default is 400) 42 | }, 43 | }, 44 | }); 45 | 46 | // Background container for the privacy policy page 47 | const BackgroundContainer = styled(Box)(() => ({ 48 | minHeight: "100vh", 49 | backgroundImage: "linear-gradient(135deg, #1F1C2C 10%, #232526 100%)", 50 | backgroundSize: "cover", 51 | backgroundPosition: "center", 52 | display: "flex", 53 | alignItems: "center", 54 | justifyContent: "center", 55 | padding: "20px", 56 | })); 57 | 58 | const PrivacyPolicy = () => { 59 | return ( 60 | 61 | 62 | 63 | 70 | Privacy Policy 71 | 72 | 73 | Welcome to our Privacy Policy page. Your privacy is critically 74 | important to us. 75 | 76 | 77 | 78 | 1. Information We Collect 79 | 80 | 81 | We collect several types of information for various purposes to 82 | provide and improve our service to you. 83 | 84 | 85 | 86 | 2. How We Use Your Information 87 | 88 | 89 | We use the data we collect to operate, maintain, and improve our 90 | services. This includes using your data to understand how users 91 | interact with our services and to communicate updates. 92 | 93 | 94 | 95 | 3. Cookies 96 | 97 | 98 | We use cookies and similar tracking technologies to track the 99 | activity on our website and hold certain information. 100 | 101 | 102 | 103 | 4. Data Protection Rights 104 | 105 | 106 | You have the right to access, update, or delete your personal 107 | information. If you make a request, we have one month to respond to 108 | you. 109 | 110 | 111 | 112 | 5. Changes to This Privacy Policy 113 | 114 | 115 | We may update our Privacy Policy from time to time. You are advised 116 | to review this page periodically for any changes. 117 | 118 | 119 | 120 | 6. Contact Us 121 | 122 | 123 | If you have any questions about this Privacy Policy, please contact 124 | us. 125 | 126 | 127 | 128 | 129 | ); 130 | }; 131 | 132 | export default PrivacyPolicy; 133 | -------------------------------------------------------------------------------- /src/views/Profile.jsx: -------------------------------------------------------------------------------- 1 | // this component is temperary and will be replaced with the actual workout and exercise components 2 | 3 | 4 | const Profile = () => { 5 | // Add your code here to fetch user progress data 6 | const userProgress = 75; // Example progress value 7 | 8 | return ( 9 |
10 |

Profile Dashboard

11 |
12 |
13 |
14 |
15 | {`${userProgress}%`} 16 |
17 |
18 | ); 19 | }; 20 | 21 | export default Profile; 22 | -------------------------------------------------------------------------------- /src/views/Terms.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Box, Typography, Paper, Button } from "@mui/material"; 3 | import { styled } from "@mui/system"; 4 | import { createTheme, ThemeProvider } from "@mui/material/styles"; 5 | 6 | // Styled components for the terms of use page 7 | const PolicyContainer = styled(Paper)(({ theme }) => ({ 8 | padding: theme.spacing(4), 9 | maxWidth: "800px", 10 | margin: "auto", 11 | backgroundColor: "rgba(0, 0, 0, 0.8)", 12 | backdropFilter: "blur(10px)", 13 | borderRadius: theme.shape.borderRadius, 14 | boxShadow: "0 10px 30px rgba(0, 0, 0, 0.5)", 15 | transition: "transform 0.3s ease, box-shadow 0.3s ease", 16 | "&:hover": { 17 | transform: "translateY(-5px)", 18 | boxShadow: "0 20px 40px rgba(0, 0, 0, 0.6)", 19 | }, 20 | })); 21 | 22 | const theme = createTheme({ 23 | palette: { 24 | mode: "dark", 25 | background: { 26 | default: "#121212", 27 | }, 28 | primary: { 29 | main: "#ff6f61", 30 | }, 31 | secondary: { 32 | main: "#ff3d00", 33 | }, 34 | }, 35 | typography: { 36 | h6: { 37 | fontFamily: "Future2, Arial, sans-serif", 38 | }, 39 | body1: { 40 | fontSize: "1rem", // Decrease font size (default is 1rem) 41 | fontWeight: "normal", // Adjust weight (default is 400) 42 | }, 43 | }, 44 | }); 45 | 46 | // Background container for the terms of use page 47 | const BackgroundContainer = styled(Box)(() => ({ 48 | minHeight: "100vh", 49 | backgroundImage: "linear-gradient(135deg, #1F1C2C 10%, #232526 100%)", 50 | backgroundSize: "cover", 51 | backgroundPosition: "center", 52 | display: "flex", 53 | alignItems: "center", 54 | justifyContent: "center", 55 | padding: "20px", 56 | })); 57 | 58 | const TermsOfUse = () => { 59 | return ( 60 | 61 | 62 | 63 | 70 | Terms of Use 71 | 72 | 73 | Welcome to our Terms of Use page. Please read these terms carefully. 74 | 75 | 76 | 77 | 1. Acceptance of Terms 78 | 79 | 80 | By accessing or using our service, you agree to comply with these terms. 81 | 82 | 83 | 84 | 2. User Responsibilities 85 | 86 | 87 | You are responsible for your use of our services and must comply with applicable laws. 88 | 89 | 90 | 91 | 2. Services Offered 92 | 93 | 94 | We provide a variety of online fitness classes, including yoga, pilates, strength training, and more. All classes are subject to availability. 95 | 96 | 97 | 98 | 4. Payment Terms 99 | 100 | 101 | Access to certain services may require payment. All fees are non-refundable unless specified otherwise. 102 | 103 | 104 | 105 | 106 | 4. Limitation of Liability 107 | 108 | 109 | We are not liable for any indirect, incidental, or consequential damages arising from the use of our services. 110 | 111 | 112 | 113 | 5. Changes to Terms 114 | 115 | 116 | We reserve the right to modify these terms at any time. Please review these terms periodically. 117 | 118 | 119 | 120 | 6. Contact Us 121 | 122 | 123 | If you have any questions about these terms, please contact us. 124 | 125 | 126 | {/* Buttons for Accept and Reject */} 127 | 128 | 131 | 134 | 135 | 136 | 137 | 138 | ); 139 | }; 140 | 141 | export default TermsOfUse; 142 | -------------------------------------------------------------------------------- /src/views/Workout.jsx: -------------------------------------------------------------------------------- 1 | // this component is temperary and will be replaced with the actual workout and exercise components 2 | 3 | 4 | 5 | import { Box, Typography, Grid } from '@mui/material'; 6 | 7 | const Workout = () => { 8 | return ( 9 | 10 | 11 | Workout Page 12 | 13 | 14 | {/* Add your workout and exercise components here */} 15 | 16 | {/* Workout component */} 17 | 18 | 19 | {/* Exercise component */} 20 | 21 | 22 | {/* Exercise component */} 23 | 24 | 25 | 26 | ); 27 | }; 28 | 29 | export default Workout; -------------------------------------------------------------------------------- /src/views/uploadBlog.jsx: -------------------------------------------------------------------------------- 1 | import { getAuth, onAuthStateChanged } from "firebase/auth"; 2 | import React, { useEffect, useState } from "react"; 3 | import toast, { Toaster } from "react-hot-toast"; 4 | import { redirect, useNavigate } from "react-router-dom"; 5 | import { useBlog } from "../../context/blogContext"; 6 | import CloudinaryUpload from "../components/imageupload"; 7 | 8 | const UploadBlog = () => { 9 | const [title, setTitle] = useState(""); 10 | const [author, setAuthor] = useState(""); 11 | const [content, setContent] = useState(""); 12 | const [image, setImage] = useState(""); 13 | 14 | const cloudName= import.meta.env.VITE_CLOUDINARY_CLOUD_NAME 15 | const uploadPreset= import.meta.env.VITE_CLOUDINARY_CLOUD_PRESET 16 | 17 | const [isLoggedIn, setIsLoggedIn] = useState(false); 18 | const navigate = useNavigate(); 19 | 20 | useEffect(() => { 21 | const auth = getAuth(); 22 | onAuthStateChanged(auth, (user) => { 23 | if (user) { 24 | setIsLoggedIn(true); 25 | } else { 26 | setIsLoggedIn(false); 27 | } 28 | }); 29 | },[]) 30 | 31 | 32 | // Get the handleUpload function from the BlogContext 33 | const { handleUpload } = useBlog(); 34 | 35 | const handleSubmit = (e) => { 36 | e.preventDefault(); 37 | 38 | if(!isLoggedIn){ 39 | toast.error("unauthenticated") 40 | navigate("/register"); 41 | } 42 | // console.log(image+"ADWwwwwdawwwwwwwwwwadw") 43 | 44 | if(!image){ 45 | toast.error("please provide a cover image to you blog") 46 | return; 47 | } 48 | 49 | // Call the handleUpload function from context with the blog details 50 | handleUpload(title, author, content, image); 51 | 52 | // Reset form fields after submission 53 | setTitle(""); 54 | setAuthor(""); 55 | setContent(""); 56 | setImage(null); 57 | 58 | navigate("/blog") 59 | 60 | // console.log("Blog uploaded:", { title, author, content, imageName }); 61 | }; 62 | 63 | // const handleImageChange = (e) => { 64 | // setImage(e.target.files[0]); 65 | // }; 66 | 67 | return ( 68 |
69 |
73 |

Upload Blog

74 |
75 |
76 | setTitle(e.target.value)} 81 | className="w-full px-4 py-2 bg-black border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" 82 | required 83 | /> 84 |
85 |
86 |
87 |
88 | setAuthor(e.target.value)} 93 | className="w-full px-4 bg-black py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500" 94 | required 95 | /> 96 |
97 |
98 |
99 |
100 |