mirror of
https://github.com/glanceapp/glance.git
synced 2025-06-22 02:41:23 +02:00
Rename thumbnails to show-thumbnails
This commit is contained in:
parent
9c5b6045af
commit
c97171883c
@ -511,7 +511,7 @@ Example:
|
|||||||
| ---- | ---- | -------- | ------- |
|
| ---- | ---- | -------- | ------- |
|
||||||
| subreddit | string | yes | |
|
| subreddit | string | yes | |
|
||||||
| style | string | no | vertical-list |
|
| style | string | no | vertical-list |
|
||||||
| thumbnails | boolean | no | false |
|
| show-thumbnails | boolean | no | false |
|
||||||
| limit | integer | no | 15 |
|
| limit | integer | no | 15 |
|
||||||
| collapse-after | integer | no | 5 |
|
| collapse-after | integer | no | 5 |
|
||||||
| comments-url-template | string | no | https://www.reddit.com/{POST-PATH} |
|
| comments-url-template | string | no | https://www.reddit.com/{POST-PATH} |
|
||||||
@ -534,7 +534,7 @@ Used to change the appearance of the widget. Possible values are `vertical-list`
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
##### `thumbnails`
|
##### `show-thumbnails`
|
||||||
Shows or hides thumbnails next to the post. This only works if the `style` is `vertical-list`. Preview:
|
Shows or hides thumbnails next to the post. This only works if the `style` is `vertical-list`. Preview:
|
||||||
|
|
||||||

|

|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
{{ range $i, $post := .Posts }}
|
{{ range $i, $post := .Posts }}
|
||||||
<li {{ if shouldCollapse $i $.CollapseAfter }}class="list-collapsible-item" style="--animation-delay: {{ itemAnimationDelay $i $.CollapseAfter }};"{{ end }}>
|
<li {{ if shouldCollapse $i $.CollapseAfter }}class="list-collapsible-item" style="--animation-delay: {{ itemAnimationDelay $i $.CollapseAfter }};"{{ end }}>
|
||||||
<div class="forum-post-list-item thumbnail-container">
|
<div class="forum-post-list-item thumbnail-container">
|
||||||
{{ if $.Thumbnails }}
|
{{ if $.ShowThumbnails }}
|
||||||
{{ if ne $post.ThumbnailUrl "" }}
|
{{ if ne $post.ThumbnailUrl "" }}
|
||||||
<img class="forum-post-list-thumbnail thumbnail" src="{{ $post.ThumbnailUrl }}" alt="" loading="lazy">
|
<img class="forum-post-list-thumbnail thumbnail" src="{{ $post.ThumbnailUrl }}" alt="" loading="lazy">
|
||||||
{{ else if $post.HasTargetUrl }}
|
{{ else if $post.HasTargetUrl }}
|
||||||
|
@ -15,7 +15,7 @@ type HackerNews struct {
|
|||||||
Limit int `yaml:"limit"`
|
Limit int `yaml:"limit"`
|
||||||
CollapseAfter int `yaml:"collapse-after"`
|
CollapseAfter int `yaml:"collapse-after"`
|
||||||
CommentsUrlTemplate string `yaml:"comments-url-template"`
|
CommentsUrlTemplate string `yaml:"comments-url-template"`
|
||||||
Thumbnails bool `yaml:"-"`
|
ShowThumbnails bool `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (widget *HackerNews) Initialize() error {
|
func (widget *HackerNews) Initialize() error {
|
||||||
|
@ -15,7 +15,7 @@ type Reddit struct {
|
|||||||
Posts feed.ForumPosts `yaml:"-"`
|
Posts feed.ForumPosts `yaml:"-"`
|
||||||
Subreddit string `yaml:"subreddit"`
|
Subreddit string `yaml:"subreddit"`
|
||||||
Style string `yaml:"style"`
|
Style string `yaml:"style"`
|
||||||
Thumbnails bool `yaml:"thumbnails"`
|
ShowThumbnails bool `yaml:"show-thumbnails"`
|
||||||
CommentsUrlTemplate string `yaml:"comments-url-template"`
|
CommentsUrlTemplate string `yaml:"comments-url-template"`
|
||||||
Limit int `yaml:"limit"`
|
Limit int `yaml:"limit"`
|
||||||
CollapseAfter int `yaml:"collapse-after"`
|
CollapseAfter int `yaml:"collapse-after"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user