mirror of
https://github.com/Xevion/glance.git
synced 2025-12-10 02:07:20 -06:00
Add head-widgets
This commit is contained in:
@@ -520,6 +520,7 @@ pages:
|
||||
| center-vertically | boolean | no | false |
|
||||
| hide-desktop-navigation | boolean | no | false |
|
||||
| show-mobile-header | boolean | no | false |
|
||||
| head-widgets | array | no | |
|
||||
| columns | array | yes | |
|
||||
|
||||
#### `name`
|
||||
@@ -557,6 +558,43 @@ Preview:
|
||||
|
||||

|
||||
|
||||
#### `head-widgets`
|
||||
|
||||
Head widgets will be shown at the top of the page, above the columns, and take up the combined width of all columns. You can specify any widget, though some will look better than others, such as the markets, RSS feed with `horizontal-cards` style, and videos widgets. Example:
|
||||
|
||||

|
||||
|
||||
```yaml
|
||||
pages:
|
||||
- name: Home
|
||||
head-widgets:
|
||||
- type: markets
|
||||
hide-header: true
|
||||
markets:
|
||||
- symbol: SPY
|
||||
name: S&P 500
|
||||
- symbol: BTC-USD
|
||||
name: Bitcoin
|
||||
- symbol: NVDA
|
||||
name: NVIDIA
|
||||
- symbol: AAPL
|
||||
name: Apple
|
||||
- symbol: MSFT
|
||||
name: Microsoft
|
||||
|
||||
columns:
|
||||
- size: small
|
||||
widgets:
|
||||
- type: calendar
|
||||
- size: full
|
||||
widgets:
|
||||
- type: hacker-news
|
||||
- size: small
|
||||
widgets:
|
||||
- type: weather
|
||||
location: London, United Kingdom
|
||||
```
|
||||
|
||||
### Columns
|
||||
Columns are defined for each page using a `columns` property. There are two types of columns - `full` and `small`, which refers to their width. A small column takes up a fixed amount of width (300px) and a full column takes up the all of the remaining width. You can have up to 3 columns per page and you must have either 1 or 2 full columns. Example:
|
||||
|
||||
|
||||
BIN
docs/images/head-widgets-preview.png
Normal file
BIN
docs/images/head-widgets-preview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
Reference in New Issue
Block a user