mirror of
https://github.com/glanceapp/glance.git
synced 2025-08-16 19:11:00 +02:00
Add group widget
This commit is contained in:
@ -13,6 +13,7 @@
|
||||
- [Lobsters](#lobsters)
|
||||
- [Reddit](#reddit)
|
||||
- [Search](#search-widget)
|
||||
- [Group](#group)
|
||||
- [Extension](#extension)
|
||||
- [Weather](#weather)
|
||||
- [Monitor](#monitor)
|
||||
@ -806,6 +807,50 @@ url: https://store.steampowered.com/search/?term={QUERY}
|
||||
url: https://www.amazon.com/s?k={QUERY}
|
||||
```
|
||||
|
||||
### Group
|
||||
Group multiple widgets into one using tabs. Widgets are defined using a `widgets` property exactly as you would on a page column. The only limitation is that you cannot place a group widget within a group widget.
|
||||
|
||||
Example:
|
||||
|
||||
```yaml
|
||||
- type: group
|
||||
widgets:
|
||||
- type: reddit
|
||||
subreddit: gamingnews
|
||||
show-thumbnails: true
|
||||
collapse-after: 6
|
||||
- type: reddit
|
||||
subreddit: games
|
||||
- type: reddit
|
||||
subreddit: pcgaming
|
||||
show-thumbnails: true
|
||||
```
|
||||
|
||||
Preview:
|
||||
|
||||

|
||||
|
||||
#### Sharing properties
|
||||
|
||||
To avoid repetition you can use [YAML anchors](https://support.atlassian.com/bitbucket-cloud/docs/yaml-anchors/) and share properties between widgets.
|
||||
|
||||
Example:
|
||||
|
||||
```yaml
|
||||
- type: group
|
||||
define: &shared-properties
|
||||
type: reddit
|
||||
show-thumbnails: true
|
||||
collapse-after: 6
|
||||
widgets:
|
||||
- subreddit: gamingnews
|
||||
<<: *shared-properties
|
||||
- subreddit: games
|
||||
<<: *shared-properties
|
||||
- subreddit: pcgaming
|
||||
<<: *shared-properties
|
||||
```
|
||||
|
||||
### Extension
|
||||
Display a widget provided by an external source (3rd party). If you want to learn more about developing extensions, checkout the [extensions documentation](extensions.md) (WIP).
|
||||
|
||||
|
BIN
docs/images/group-widget-preview.png
Normal file
BIN
docs/images/group-widget-preview.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 88 KiB |
Reference in New Issue
Block a user