homer icon indicating copy to clipboard operation
homer copied to clipboard

Added navbar clock

Open robinschneider opened this issue 2 years ago • 8 comments

Description

Added an optional clock to the navbar as in #123. Clock can be enabled in the config, is disabled by default. Shows hours and minutes. Font size can be changed via CSS file.

clock2

Fixes #123

Type of change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • [x] I've read & comply with the contributing guidelines
  • [x] I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
  • [x] I have made corresponding changes the documentation (README.md).
  • [x] I've checked my modifications for any breaking changes, especially in the config.yml file

robinschneider avatar Sep 11 '21 12:09 robinschneider

Hi @robinschneider! Thanks for this contribution. I had the idea of adding thing in the navbar for a while, and here is how I see it:

  • We add a widget folder in the component directory, alongside services
  • We made the navbar load component dynamically, based on a configuration like this
navbar:
  widgets:
    - clock
    - ....
  • Eventually, we move all content (search bar & buttons), to widgets.

What do you think about that ?

So everyone can easily configure & reorder the navbar item. It might be great to also add a widget zone in the first line (the header).

bastienwirtz avatar Sep 26 '21 08:09 bastienwirtz

@robinschneider If you feel like working on it go for it, otherwise I can do the widget thing system and just move your clock component in it. Let me know !

bastienwirtz avatar Sep 26 '21 08:09 bastienwirtz

@bastienwirtz I added the widgets folder and moved the clock over there. I am not sure what to do with the links from the navbar, I would move them to the navbar, but that would be a breaking change as it moves from just links to navbar > links.

robinschneider avatar Oct 07 '21 23:10 robinschneider

@bastienwirtz I added the widgets to the navbar as well as the clock and added some documentation to configuration as well as readme for widgets. Also I added an option to configure the clock to support 12-hour as well as 24-hour format.

robinschneider avatar Oct 08 '21 13:10 robinschneider

@bastienwirtz Any update when this will get merged?

robinschneider avatar Oct 22 '21 18:10 robinschneider

Nice addition @robinschneider ! Just a few thing to update, and a little question: What changed the coding style ? did you ran yarn lint ? I think the coding style was ok before, can you update your PR without it ? Thanks !

@bastienwirtz sorry I am not sure if I should run yarn lint or not.
I have not used it but if I do it changes every file. If I show what changed IntelliJ says: "Contents have differences only in line separators"

Also I updated the requested changes.

robinschneider avatar Oct 31 '21 21:10 robinschneider

@bastienwirtz Any updates on this?

robinschneider avatar Dec 29 '21 02:12 robinschneider

Any updates on this. We use Homer as a dashboard where i work, and i have co-workers in multiple timezones, so having their clocks on the dashboard would be nice!

jensz12 avatar Nov 15 '22 10:11 jensz12