Giter Site home page Giter Site logo

zantosko / fitguide Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 24.02 MB

Check out my Medium article giving a detailed breakdown of this project: https://zachary-antosko.medium.com/fitguide-a-beginners-guide-to-weight-lifting-656e562d437e

HTML 61.53% JavaScript 30.18% CSS 8.29%
calorie-calculator recipe javascript css

fitguide's Introduction

FitGuide

Description

  • This is a website dedicated to helping people who are new to lifting weights and have no idea where to start.
  • Page organization:
    • Home Page
    • About Page
    • Calorie Calculator Page
    • Recipe/Food-Item Search
    • Workout Template/Resources Page

Screenshots

Key Features

  • Calorie Calculator - This form takes the user's gender, height weight, age, and activity level. Once the user clicks the submit button, the inputs will then be inserted into a BMI formula and invoke specific set of conditionals based on the user's choices for gender and activity level. The conditonal set invoked will then calculate the Daily Calorie intake for the user. This value is then passed to a function that generates a modal. The calorie value is then passed into a few more formulas to calculate: Maintenance Calories, Weight Gain Calories, Weight loss Calories, and the Macronutrient Intake (carbs, protein, and fat) of each calorie value. The modal will then be displayed on screen with the calculated values passed in as well as some general tips for the user.

  • Recipe/Food-Item Search - This feature has two search fields, one for finding different types of recipes and the other for finding specific food items. Whenever a search is made one of the fields, an asynchronous function call is made and will fetch data from the specific API used in the function. The Recipe Search fetches from Spoonacular API, converts that data to JSON format and then generates a list of 20 items. Each list item will give a summary of the dish as well as a picture, prep time, nutritional info, and a link to the full recipe. The Food-Item Search essentially does the same thing but isn't as robust. This is another asynchronous function that pulls from the USDA's API, converts the data to JSON and displays the nutritional information of the item in a small card.

Technologies Used

Built with:

  • JavaScript
  • Materialize CSS
  • CSS
  • HTML

What was learned

  • Asynchronous Programming
    • Learned how to properly implement Async/Await in a function.
    • Understand how Async/Await eliminates the need to deeply nested callbacks.
  • Using the Fetch API
    • Learned how to interpolate user inputs into an API call to get back specific data.
  • Using a CSS framework as well as plain CSS in unison
    • This project has shown me that CSS frameworks have their limitations and can also restrict creative freedom. But this experience has shown me new ways to work around these limitations to get the desired result.
  • Gained a better understanding of Materialize CSS
    • Learned the specific naming conventions for their components as well as how to layout page properly using Materialize.

fitguide's People

Contributors

zantosko avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.