Skip to content

Latest commit

 

History

History

clock-app

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Clock app

Solution : Live Site URL

This is a solution to the Clock app challenge on Frontend Mentor.

Design preview for the Clock app coding challenge

The challenge

Your challenge is to build out this clock application and get it looking as close to the design as possible. You'll be using the following APIs to retrieve the necessary data:

  • World Time API to set the time based on the visitor's IP adress. This API will also be used for additional data, like the day of the year shown in the expanded state.
  • IP Geolocation API to set the city and country underneath the time
  • Programming Quotes API to generate random programming quotes.

You can use any tools you like to help you complete the challenge. So if you've got something you'd like to practice, feel free to give it a go.

Your users should be able to:

  • View the optimal layout for the site depending on their device's screen size
  • See hover states for all interactive elements on the page
  • View the current time and location information based on their IP address
  • View additional information about the date and time in the expanded state
  • Be shown the correct greeting and background image based on the time of day they're visiting the site
  • Generate random programming quotes by clicking the refresh icon near the quote

Expected Behaviour

  • Change the greeting depending on the time of day. It should say:
    • "Good morning" between 5am and 12pm
    • "Good afternoon" between 12pm and 6pm
    • "Good evening" between 6pm and 5am
  • Change the greeting icon and background image depending on the time of day. They should show:
    • The sun icon and the daytime background image between 5am and 6pm
    • The moon icon and the nighttime background image between 6pm and 5am
  • Generate a new random programming quote whenever the refresh icon is clicked

Built with

  • HTML
  • CSS
  • CSS Grid
  • CSS Flexbox
  • JavaScript
  • World Time API
  • IP Geolocation API
  • Random Quotes API

Experience, Challenges and Learning

This was a fun challenge, it felt more like doing an App page than anything else. The CSS is a little messy as I tried a different way to do typography but the end result lead to a lot of excess CSS. The API calls were fun to do. Connecting APIs to each other was a fun task especially when one was dependent on another.

Pending tasks
  • Typogprahy
  • Live solution screenshot(s)
  • On submit update README with : Solution submitted at Frontend Mentor - Submission Link