Merge pull request #82 from yardenshoham/add-clock-widget

Add a clock widget
This commit is contained in:
Svilen Markov
2024-05-25 02:32:18 +01:00
committed by GitHub
9 changed files with 243 additions and 1 deletions

View File

@@ -17,6 +17,7 @@
- [Repository](#repository)
- [Bookmarks](#bookmarks)
- [Calendar](#calendar)
- [Clock](#clock)
- [Stocks](#stocks)
- [Twitch Channels](#twitch-channels)
- [Twitch Top Games](#twitch-top-games)
@@ -34,6 +35,7 @@ pages:
columns:
- size: small
widgets:
- type: clock
- type: calendar
- type: rss
@@ -963,6 +965,51 @@ Whether to open the link in the same tab or a new one.
Whether to hide the colored arrow on each link.
### Clock
Display a clock showing the current time and date. Optionally, also display the the time in other timezones.
Example:
```yaml
- type: clock
hour-format: 24h
timezones:
- timezone: Europe/Paris
label: Paris
- timezone: America/New_York
label: New York
- timezone: Asia/Tokyo
label: Tokyo
```
Preview:
![](images/clock-widget-preview.png)
#### Properties
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| hour-format | string | no | 24h |
| timezones | array | no | |
##### `hour-format`
Whether to show the time in 12 or 24 hour format. Possible values are `12h` and `24h`.
#### Properties for each timezone
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| timezone | string | yes | |
| label | string | no | |
##### `timezone`
A timezone identifier such as `Europe/London`, `America/New_York`, etc. The full list of available identifiers can be found [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
##### `label`
Optionally, override the display value for the timezone to something more meaningful such as "Home", "Work" or anything else.
### Calendar
Display a calendar.

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB