GithubHelp home page GithubHelp logo

timers's Introduction

About

This is a simple project to create customizable timers. This project can be used for games, activities,... It is written in Typescript, HTML and CSS and can be hosted on a simple server app like Simple Web Server.

Usage

You can add timers and customize them in the settings.json file. Here is an example:

{
    "timers": [
        {
            "title": "Mon first timer",
            "duration": 10,
            "options": [1, 60, 120, 180],
            "alarm": {
                "sound": "clock-alarm.mp3",
                "repeat": 1
            }
        },
        {
            "title": "My second timer",
            "duration": 120,
            "options": [1, 60, 120],
            "alarm": {
                "sound": "beep-warning.mp3",
                "repeat": 3
            }
        }
    ]
}

You can customize, for each timer, these elements:

  • title: the timer title.
  • duration: the initial duration.
  • options: an array of options. Each option is a number of seconds
  • alarm:
    • sound: sound to play
    • repeat: number of time to repeat the sound

Options are turned into + and - buttons that allow you to add or substract seconds from the timer. If you define an Alarm, a sound will be played when the timer reach zero. The sound files must be placed into the assets/sound folder.

If you want to change the view style, you can modify the style.css file. There are multiples variables at the begining of the file that you can change according to your need.

Contributing

If you want to contribute, please fork the repository and create a pull request. You can also post issues.

To begin:

  1. Fork and clone the repository
  2. Execute the command npm i (you need Node.js installed)
  3. Execute the command npm run build to build the project and generate the js files
  4. You can also use npm run watch to generate js files on file change.

timers's People

Contributors

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