Code Monkey home page Code Monkey logo

world-clock's Introduction

World Clock Dashboard

https://clock.aniqa.dev/

🕰️ A fully responsive, minimalistic and sleek analog and digital time dashboard that features over 550 global timezones. Users can choose from the randomly generated list of 30 timezones or they can search through the dropdown. Additional data points are included for each selected timezone.

Design

Tech

  • HTML5
  • CSS3
  • JavaScript
  • Moment.js

Key Features

Design

  • Analog and digital clock drawn using SVG elements
  • Minimalistic color scheme
  • Fully responsive webpage utilizing a grid layout
  • “Time Card” section designed to be focal point
  • Subtle button animations and custom dropdown styling
  • Grid layout showcasing different cities/regions
  • Hover and active styling for timezone grid items

Time Card

  • Seconds-hand moves around the analog clock every second
  • Digital time is updated every second
  • Current day and date
  • Region, timezone, number of the day of the year (out of 365) and daylight savings time
  • Option to search about the active region on Google

Timezone Grid

  • Randomized timezones to choose from - labeled by city name and region
  • Hover state shows the current time of that timezone
  • Active state shows the current time on the selected timezone until another location is selected
  • Selecting a timezone from the grid will update the Time Card

Interactive Elements

  • “Shuffle Timezones” button randomizes the timezone grid
  • “List of Timezones” button toggles the dropdown selector with every timezone
  • Location marker button selects user’s current location

Data

  • Moment.js library to get timezone data

Behind-the-Scenes

  • Basic PWA
  • String manipulation to format the timezone names
  • Array transformations to filter out timezones without a continental affiliation
  • Overwrite moment.js abbreviations to use my own abbreviations object
  • DOM manipulation to generate random buttons and to add 500+ timezone names into dropdown
  • Ensuring timezones show a random selection of timezones without repeating
  • localStorage to save a user’s last selected location
  • Activate smooth scrolling up to the Time Card on mobile devices
  • setInterval in order to update time every second and clearInterval to avoid conflicts whenever a new timezone is selected
  • Formatting time using only moment.js methods

world-clock's People

Contributors

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