Giter Club home page Giter Club logo

my-age-project's Introduction

Frontend Mentor - Age calculator app

Got feedback for me?

I love receiving feedback! I am always looking to improve my applications and platform. So if you have anything you'd like to mention, please email hi at [email protected]


Frontend Mentor - Age calculator app solution

This is a solution to the Age calculator app challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • View an age in years, months, and days after submitting a valid date through the form
  • Receive validation errors if:
    • Any field is empty when the form is submitted
    • The day number is not between 1-31
    • The month number is not between 1-12
    • The year is in the future
    • The date is invalid e.g. 31/04/1991 (there are 30 days in April)
  • View the optimal layout for the interface depending on their device's screen size
  • See hover and focus states for all interactive elements on the page
  • Bonus: See the age numbers animate to their final number when the form is submitted

Screenshot

The Solution

Links

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • Mobile-first workflow
  • Styled Components - For styles

What I learned

With this, I learnt about the font-face and how to import downloaded fonts into the project.

@font-face {
  font-family: poppins_regular;
    src: url(../fonts/Poppins-Regular.ttf);
}

I relied heavily on the concept of flexbox for this project.

Also, I discovered ways to find the number of years from a millisecond form of the difference between birth and current date

  function findYear (mSeconds) {
    var checkYear = Math.floor(mSeconds / 31536000000);
    console.log(checkYear)
  }

  function convertmili( mSeconds ){
    var one_day=1000*60*60*24
    let days = Math.floor(mSeconds / one_day);
    return days;
}

Moreover, I applied functional programming paradigm as this helps make the code easier to understand and debug.

For this project, I used the (successful git model)[https://nvie.com/posts/a-successful-git-branching-model/] by Vincent Driessen for versioning of the project.

Continued development

Moving forwards, I would focus on css grid and have a firm grip of the Javascript data types and their common methods.

Useful resources

Author

Acknowledgments

I would like to thank my university roommates, Nana Kwame Oduro-Marfo and Mark Korankye for their support during development of this project.

my-age-project's People

Contributors

asiedu13 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.