homer
homer copied to clipboard
[Feature] Add the option to add a clock in the header
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'
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.
Boolean in config for system time with a small js and html edit