homer
homer copied to clipboard
Added navbar clock
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.
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
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, alongsideservices
- 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).
@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 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.
@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.
@bastienwirtz Any update when this will get merged?
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.
@bastienwirtz Any updates on this?
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!