Giter VIP home page Giter VIP logo

unit-converter's Introduction

Unit Converter

A unit converter which takes a numerical input and converts it from Metric to Imperial units. The types of units include: length (meters & feet), volume (liters and gallons), and mass (kilograms and pounds).

Contents

Overview

This is my solo project from Module 3 of Scrimba's Frontend Career Path. The requirements of the project include:

  • Following the design specfications (as indicated in the provided Figma file)
  • Generate all conversions when the button is clicked
  • Round numbers to 3 decimal places

Screenshots

Desktop

unit converter with an input box and button at the top of the page with a purple background and conversions listed below with a light gray background

unit converter with an input box and button at the top of the page with a purple background and conversions listed below with a light gray background

Mobile

unit converter with an input box and button at the top of the page with a purple background and conversions listed below with a light gray background

unit converter with an input box and button at the top of the page with a purple background and conversions listed below with a light gray background

My Process

A mobile first approach

Though a mobile design was not included in the design specfications I chose to beging by desinging the mobile version of the website first before designing the deskop version. I find this approach advantageous because HTML is already responsive on its own (without adding any CSS) and lets you limit the number of media queries needed to adjust the design to larger screens. This is a technique I learned from Kevin Powell's Conquering Responsive Web Design course. For a more detailed description of this technique, you can read about it in the 'My Process' section of the 'Visit Chiang Mai' project.

For this project, the minimalistic design lent itself easily to a mobile design. I decided to "shrink" down the original design so that it would fit within the dimensions of a smaller device while maintaining a legible font.

Once the mobile version was complete it was simply a matter of add a media query with a min-width of 550px to adjust the design for larger screensizes. In this design, it amounted to a couple of lines of code to adjust the font sizes to match the design specs.

Finally, after completing the design of the page itself it was time to add in the JavaScript to perform the unit conversions. This includes adding an event listener for the convert button which activates a function to convert the units and render the text on the page.

Built with

  • HTML
  • CSS
  • JavaScript

Status

A live version can be viewed at: https://ananfito.github.io/unit-converter.

Connect

Thank you for reading about this project. If you'd like to connect with me for mentoring, collaboration, or employment opportunities, you can do so via the following links:

unit-converter's People

Contributors

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