mirror of
https://github.com/glanceapp/glance.git
synced 2025-08-27 15:15:35 +02:00
Merge pull request #82 from yardenshoham/add-clock-widget
Add a clock widget
This commit is contained in:
@@ -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:
|
||||
|
||||

|
||||
|
||||
#### 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.
|
||||
|
||||
|
BIN
docs/images/clock-widget-preview.png
Normal file
BIN
docs/images/clock-widget-preview.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Reference in New Issue
Block a user