Add group widget

This commit is contained in:
Svilen Markov
2024-08-01 21:34:07 +01:00
parent 795caa5d9d
commit 738bcf8bcb
10 changed files with 249 additions and 4 deletions

View File

@ -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:
![](images/group-widget-preview.png)
#### 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).

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB