Skip to content

Commit 7743664

Browse files
authored
Merge pull request #57 from glanceapp/release/v0.4.0
Release v0.4.0
2 parents a0585e0 + 714e1b6 commit 7743664

37 files changed

+835
-161
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* iframe
1717
* Twitch channels & top games
1818
* GitHub releases
19+
* Repository overview
1920
* Site monitor
2021

2122
#### Themeable
@@ -48,7 +49,7 @@ Checkout the [releases page](https://github.com/glanceapp/glance/releases) for a
4849
#### Docker
4950
> [!IMPORTANT]
5051
>
51-
> Make sure you have a valid `glance.yml` file before running the container.
52+
> Make sure you have a valid `glance.yml` file in the same directory before running the container.
5253
5354
```bash
5455
docker run -d -p 8080:8080 \

docs/configuration.md

+129-19
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- [Weather](#weather)
1515
- [Monitor](#monitor)
1616
- [Releases](#releases)
17+
- [Repository](#repository)
1718
- [Bookmarks](#bookmarks)
1819
- [Calendar](#calendar)
1920
- [Stocks](#stocks)
@@ -250,18 +251,26 @@ pages:
250251
```
251252

252253
### Properties
253-
| Name | Type | Required |
254-
| ---- | ---- | -------- |
255-
| title | string | yes |
256-
| slug | string | no |
257-
| columns | array | yes |
254+
| Name | Type | Required | Default |
255+
| ---- | ---- | -------- | ------- |
256+
| title | string | yes | |
257+
| slug | string | no | |
258+
| show-mobile-header | boolean | no | false |
259+
| columns | array | yes | |
258260

259261
#### `title`
260262
The name of the page which gets shown in the navigation bar.
261263

262264
#### `slug`
263265
The URL friendly version of the title which is used to access the page. For example if the title of the page is "RSS Feeds" you can make the page accessible via `localhost:8080/feeds` by setting the slug to `feeds`. If not defined, it will automatically be generated from the title.
264266

267+
#### `show-mobile-header`
268+
Whether to show a header displaying the name of the page on mobile. The header purposefully has a lot of vertical whitespace in order to push the content down and make it easier to reach on tall devices.
269+
270+
Preview:
271+
272+
![](images/mobile-header-preview.png)
273+
265274
### Columns
266275
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:
267276

@@ -384,6 +393,8 @@ Example:
384393
| ---- | ---- | -------- | ------- |
385394
| style | string | no | vertical-list |
386395
| feeds | array | yes |
396+
| thumbnail-height | float | no | 10 |
397+
| card-height | float | no | 27 |
387398
| limit | integer | no | 25 |
388399
| collapse-after | integer | no | 5 |
389400

@@ -398,6 +409,16 @@ Used to change the appearance of the widget. Possible values are `vertical-list`
398409

399410
![preview of horizontal-cards style for RSS widget](images/rss-feed-horizontal-cards-preview.png)
400411

412+
`horizontal-cards-2`
413+
414+
![preview of horizontal-cards-2 style for RSS widget](images/rss-widget-horizontal-cards-2-preview.png)
415+
416+
##### `thumbnail-height`
417+
Used to modify the height of the thumbnails. Works only when the style is set to `horizontal-cards`. The default value is `10` and the units are `rem`, if you want to for example double the height of the thumbnails you can set it to `20`.
418+
419+
##### `card-height`
420+
Used to modify the height of cards when using the `horizontal-cards-2` style. The default value is `27` and the units are `rem`.
421+
401422
##### `feeds`
402423
An array of RSS/atom feeds. The title can optionally be changed.
403424

@@ -434,6 +455,7 @@ Preview:
434455
| ---- | ---- | -------- | ------- |
435456
| channels | array | yes | |
436457
| limit | integer | no | 25 |
458+
| style | string | no | horizontal-cards |
437459
| video-url-template | string | no | https://www.youtube.com/watch?v={VIDEO-ID} |
438460

439461
##### `channels`
@@ -448,6 +470,13 @@ Then scroll down and click on "Share channel", then "Copy channel ID":
448470
##### `limit`
449471
The maximum number of videos to show.
450472

473+
##### `style`
474+
Used to change the appearance of the widget. Possible values are `horizontal-cards` and `grid-cards`.
475+
476+
Preview of `grid-cards`:
477+
478+
![](images/videos-widget-grid-cards-preview.png)
479+
451480
##### `video-url-template`
452481
Used to replace the default link for videos. Useful when you're running your own YouTube front-end. Example:
453482

@@ -479,6 +508,8 @@ Preview:
479508
| limit | integer | no | 15 |
480509
| collapse-after | integer | no | 5 |
481510
| comments-url-template | string | no | https://news.ycombinator.com/item?id={POST-ID} |
511+
| sort-by | string | no | top |
512+
| extra-sort-by | string | no | |
482513

483514
##### `comments-url-template`
484515
Used to replace the default link for post comments. Useful if you want to use an alternative front-end. Example:
@@ -491,12 +522,20 @@ Placeholders:
491522

492523
`{POST-ID}` - the ID of the post
493524

525+
##### `sort-by`
526+
Used to specify the order in which the posts should get returned. Possible values are `top`, `new`, and `best`.
527+
528+
##### `extra-sort-by`
529+
Can be used to specify an additional sort which will be applied on top of the already sorted posts. By default does not apply any extra sorting and the only available option is `engagement`.
530+
531+
The `engagement` sort tries to place the posts with the most points and comments on top, also prioritizing recent over old posts.
532+
494533
### Reddit
495534
Display a list of posts from a specific subreddit.
496535

497536
> [!WARNING]
498537
>
499-
> Reddit does not allow unauthorized API access from VPS IPs, if you're hosting Glance on a VPS you will get a 403 response. As a workaround you can route the traffic from Glance through a VPN.
538+
> Reddit does not allow unauthorized API access from VPS IPs, if you're hosting Glance on a VPS you will get a 403 response. As a workaround you can route the traffic from Glance through a VPN or your own HTTP proxy using the `request-url-template` property.
500539

501540
Example:
502541

@@ -515,6 +554,10 @@ Example:
515554
| collapse-after | integer | no | 5 |
516555
| comments-url-template | string | no | https://www.reddit.com/{POST-PATH} |
517556
| request-url-template | string | no | |
557+
| sort-by | string | no | hot |
558+
| top-period | string | no | day |
559+
| search | string | no | |
560+
| extra-sort-by | string | no | |
518561

519562
##### `subreddit`
520563
The subreddit for which to fetch the posts from.
@@ -580,6 +623,22 @@ https://proxy/{REQUEST-URL}
580623
https://your.proxy/?url={REQUEST-URL}
581624
```
582625

626+
##### `sort-by`
627+
Can be used to specify the order in which the posts should get returned. Possible values are `hot`, `new`, `top` and `rising`.
628+
629+
##### `top-perid`
630+
Available only when `sort-by` is set to `top`. Possible values are `hour`, `day`, `week`, `month`, `year` and `all`.
631+
632+
##### `search`
633+
Keywords to search for. Searching within specific fields is also possible, **though keep in mind that Reddit may remove the ability to use any of these at any time**:
634+
635+
![](images/reddit-field-search.png)
636+
637+
##### `extra-sort-by`
638+
Can be used to specify an additional sort which will be applied on top of the already sorted posts. By default does not apply any extra sorting and the only available option is `engagement`.
639+
640+
The `engagement` sort tries to place the posts with the most points and comments on top, also prioritizing recent over old posts.
641+
583642
### Weather
584643
Display weather information for a specific location. The data is provided by https://open-meteo.com/.
585644

@@ -593,7 +652,7 @@ Example:
593652

594653
> [!NOTE]
595654
>
596-
> US cities which have common names can have their state specified as the second parameter like such:
655+
> US cities which have common names can have their state specified as the second parameter as such:
597656
>
598657
> * Greenville, North Carolina, United States
599658
> * Greenville, South Carolina, United States
@@ -675,7 +734,11 @@ You can hover over the "ERROR" text to view more information.
675734

676735
| Name | Type | Required |
677736
| ---- | ---- | -------- |
678-
| sites | array | yes | |
737+
| sites | array | yes |
738+
| style | string | no |
739+
740+
##### `style`
741+
To make the widget scale appropriately in a `full` size column, set the style to the experimental `dynamic-columns-experimental` option.
679742

680743
##### `sites`
681744

@@ -694,7 +757,7 @@ The title used to indicate the site.
694757

695758
`url`
696759

697-
The URL which will be requested and its response will determine the status of the site.
760+
The URL which will be requested and its response will determine the status of the site. Optionally, you can specify this using an environment variable with the syntax `${VARIABLE_NAME}`.
698761

699762
`icon`
700763

@@ -763,6 +826,43 @@ The maximum number of releases to show.
763826
#### `collapse-after`
764827
How many releases are visible before the "SHOW MORE" button appears. Set to `-1` to never collapse.
765828

829+
### Repository
830+
Display general information about a repository as well as a list of the latest open pull requests and issues.
831+
832+
Example:
833+
834+
```yaml
835+
- type: repository
836+
repository: glanceapp/glance
837+
pull-requests-limit: 5
838+
issues-limit: 3
839+
```
840+
841+
Preview:
842+
843+
![](images/repository-preview.png)
844+
845+
#### Properties
846+
847+
| Name | Type | Required | Default |
848+
| ---- | ---- | -------- | ------- |
849+
| repository | string | yes | |
850+
| token | string | no | |
851+
| pull-requests-limit | integer | no | 3 |
852+
| issues-limit | integer | no | 3 |
853+
854+
##### `repository`
855+
The owner and repository name that will have their information displayed.
856+
857+
##### `token`
858+
Without authentication Github allows for up to 60 requests per hour. You can easily exceed this limit and start seeing errors if your cache time is low or you have many instances of this widget. To circumvent this you can [create a read only token from your Github account](https://github.com/settings/personal-access-tokens/new) and provide it here.
859+
860+
##### `pull-requests-limit`
861+
The maximum number of latest open pull requests to show. Set to `-1` to not show any.
862+
863+
##### `issues-limit`
864+
The maximum number of latest open issues to show. Set to `-1` to not show any.
865+
766866
### Bookmarks
767867
Display a list of links which can be grouped.
768868

@@ -812,10 +912,14 @@ Preview:
812912
| Name | Type | Required |
813913
| ---- | ---- | -------- |
814914
| groups | array | yes |
915+
| style | string | no |
815916

816917
##### `groups`
817918
An array of groups which can optionally have a title and a custom color.
818919

920+
##### `style`
921+
To make the widget scale appropriately in a `full` size column, set the style to the experimental `dynamic-columns-experimental` option.
922+
819923
###### Properties for each group
820924
| Name | Type | Required | Default |
821925
| ---- | ---- | -------- | ------- |
@@ -883,18 +987,12 @@ Example:
883987
name: S&P 500
884988
- symbol: BTC-USD
885989
name: Bitcoin
990+
chart-link: https://www.tradingview.com/chart/?symbol=INDEX:BTCUSD
886991
- symbol: NVDA
887992
name: NVIDIA
888993
- symbol: AAPL
994+
symbol-link: https://www.google.com/search?tbm=nws&q=apple
889995
name: Apple
890-
- symbol: MSFT
891-
name: Microsoft
892-
- symbol: GOOGL
893-
name: Google
894-
- symbol: AMD
895-
name: AMD
896-
- symbol: RDDT
897-
name: Reddit
898996
```
899997

900998
Preview:
@@ -907,15 +1005,24 @@ Preview:
9071005
| ---- | ---- | -------- |
9081006
| stocks | array | yes |
9091007
| sort-by | string | no |
1008+
| style | string | no |
9101009

9111010
##### `stocks`
9121011
An array of stocks for which to display information about.
9131012

1013+
##### `sort-by`
1014+
By default the stocks are displayed in the order they were defined. You can customize their ordering by setting the `sort-by` property to `absolute-change` for descending order based on the stock's absolute price change.
1015+
1016+
##### `style`
1017+
To make the widget scale appropriately in a `full` size column, set the style to the experimental `dynamic-columns-experimental` option.
1018+
9141019
###### Properties for each stock
9151020
| Name | Type | Required |
9161021
| ---- | ---- | -------- |
9171022
| symbol | string | yes |
9181023
| name | string | no |
1024+
| symbol-link | string | no |
1025+
| chart-link | string | no |
9191026

9201027
`symbol`
9211028

@@ -925,8 +1032,11 @@ The symbol, as seen in Yahoo Finance.
9251032

9261033
The name that will be displayed under the symbol.
9271034

928-
##### `sort-by`
929-
By default the stocks are displayed in the order they were defined. You can customize their ordering by setting the `sort-by` property to `absolute-change` for descending order based on the stock's absolute price change.
1035+
`symbol-link`
1036+
The link to go to when clicking on the symbol.
1037+
1038+
`chart-link`
1039+
The link to go to when clicking on the chart.
9301040

9311041
### Twitch Channels
9321042
Display a list of channels from Twitch.

docs/images/mobile-header-preview.png

128 KB
Loading

docs/images/reddit-field-search.png

43.9 KB
Loading

docs/images/repository-preview.png

19.9 KB
Loading
Loading
Loading

0 commit comments

Comments
 (0)