Giter VIP home page Giter VIP logo

mmm-countdown's Introduction

MMM-CountDown

Screenshot

This is a module for the MagicMirror² which can count down the days to a date/event.

I've never written anything with Node.js before, so hopefully this isn't a total mess, if it is - feel free to lend a hand :)

Using the module

To use this module, add the following configuration block to the modules array in the config/config.js file:

var config = {
    modules: [
        {
            module: 'MMM-CountDown',
            config: {
                // See configuration options
            }
        }
    ]
}

Configuration options

Option Description
position Required Where do you want to place the counter (use standard magicmirror positions)
event Required Name of event to count down to (displayed above counter)
date Required Date to count down to (YYYY-MM-DD HH:MM:SS)
showHours Decide whether or not to display the hours. Default is true
showMinutes Decide whether or not to display the minutes. Default is true
showSeconds Decide whether or not to display the seconds. Default is true
customInterval Change the update interval which will help reduce load if you are only showing specific time metrics. Default is 1000
daysLabel Choose how you wish to display your Days label. Default is d
hoursLabel Choose how you wish to display your Hours label. Default is h
minutesLabel Choose how you wish to display your Minutes label. Default is m
secondsLabel Choose how you wish to display your Seconds label. Default is m

If either of the above are missing, the module will count down to the New Millenium (3000-01-01)

mmm-countdown's People

Contributors

boazarad avatar el97 avatar maartenpaauw avatar tim-digitised avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mmm-countdown's Issues

Calculate best interval

If the user is showing seconds, the refresh interval needs to be every second. If they're showing hours, on the hour. etc etc.

By calculating how long until the next refresh is needed the intervals can adapt smoothly.

Impossible to reduce the size of the text

I'm still a junior in coding, but I tried several things and nothing happened when I tried to reduce the text. How can I do that ?
(also sorry if my question is dumb, I tried changing the css of the module and the main one.)

How to Adjust Font Size

Hey I love the module its just what I was looking for. One question though, is there anyway to reduce the font size as its showing up really large on my mirror and I would like to shrink it down a bit.

Thanks

Countdown Timer Displaying -18275 Days for March 9th 2020

Hi

Unsure if this is a result of an incorrect config by myself, however the module is displaying -18275 Days for the 9th March 2020. Please see my config below

{
module: 'MMM-CountDown',
position: "bottom_left",
config: {
// See configuration options
event: "Dissertation Due",
date: 2020-03-09,
showHours: false,
showMinutes: false,
showSeconds: false,
}
},

Thanks
James

Incorrect countdown number.

Is there a way to get the countdown to work for my timezone? I am GMT -5 but the countdown is GMT. At 7pm it changes the countdown number.

How to?

How do I remove the line under the Header? I can not find the line in the css or js to know what it is called to change its color or delete it completly.

Won't show up

the module wont show up for me, idk if im supposed to install it there but i need to with all the other modules and it wont show up but this error came what should i do

Console:
pi@raspberrypi:~/MagicMirror/modules/MMM-CountDown $ npm install
npm WARN [email protected] requires a peer of stylelint@^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of stylelint@^8.3.0 || ^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of stylelint@^8.3.0 || ^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.

audited 439 packages in 24.826s
found 0 vulnerabilities

Config:
{
module: 'MMM-CountDown',
config: {
position: "top_left",
event: "Jahrestag",
date: "2019-07-24"
}
},

Not Showing up FIX!

PLEASE UPDATE YOUR README.md

Ways to fix all your issues (worked for me)

  1. you have to rename MMM-CountDown-master to MMM-CountDown in the modules folder
  2. config is not via name: "event name" it is: event: "event name" (else it didnt work for me)
  3. postion attribute is not in the config dict it is in the normal dict (look at example)

here is my example:

        {
            module: 'MMM-CountDown',
            position: "top_right",
            config: {
                position: "top_right",
                name: "Brasilien",
                event: "Brasilien",
                date: "2022-02-20 10:00:00",
            }
        },

Keep getting update notification.

I keep getting the message:

Update available for MMM-CountDown module.
The current installation is 5 commits behind on the master branch.

I tried to update the module but it keeps saying it is already up to date.

Option to auto hide module when event is reached

This is a feature request. I would like to have an option f.e. auto_hide so that the module hides itself as soon as the event is reached and is not in the future anymore.

Do you think such thing is possible? Thanks in advance.

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.