homer icon indicating copy to clipboard operation
homer copied to clipboard

[Feature] Add the option to add a clock in the header

Open 33Fraise33 opened this issue 4 years ago • 1 comments

Hello,

Running this as a homepage or new tab page it would be nice to have a clock to get a general idea what time it is.

What you also see at times is a 'greeter' that changes throughout the time of the day like: 'good evening'

33Fraise33 avatar Aug 14 '20 16:08 33Fraise33

It would probably be easiest to use the "message" feature with a URL that supply's a JSON payload with the data you want. (though not exactly what you want)

message:
  url: "https://yourDomain.tld/dashboard" # Can fetch information from an endpoint to override value below.
  style: "is-danger"
  title: "Oops!"
  content: "Couldn't get dynamic data from Server!"

then https://yourDomain.tld/dashboard should generate a JSON payload like so:

{
  "style": "is-success",
  "title": "{Time}",
  "content": "Your Message Here</a>"
}

Then whatever data is returned in the JSON payload will overwrite the options in the config, unless nothing is returned. I use this method to put a random news item at the top of the page using Node-Red to generate the payload.

It should be easy enough to generate a payload with the time and a small message with a small PHP script.

JamiePhonic avatar Oct 15 '20 22:10 JamiePhonic

Boolean in config for system time with a small js and html edit image

FriendlyNGeeks avatar Nov 26 '22 03:11 FriendlyNGeeks