|
@@ -15,6 +15,7 @@ type RSS struct {
|
|
Style string `yaml:"style"`
|
|
Style string `yaml:"style"`
|
|
ThumbnailHeight float64 `yaml:"thumbnail-height"`
|
|
ThumbnailHeight float64 `yaml:"thumbnail-height"`
|
|
CardHeight float64 `yaml:"card-height"`
|
|
CardHeight float64 `yaml:"card-height"`
|
|
|
|
+ TitleLineLimit int `yaml:"title-line-limit"`
|
|
Items feed.RSSFeedItems `yaml:"-"`
|
|
Items feed.RSSFeedItems `yaml:"-"`
|
|
Limit int `yaml:"limit"`
|
|
Limit int `yaml:"limit"`
|
|
CollapseAfter int `yaml:"collapse-after"`
|
|
CollapseAfter int `yaml:"collapse-after"`
|
|
@@ -41,6 +42,10 @@ func (widget *RSS) Initialize() error {
|
|
widget.CardHeight = 0
|
|
widget.CardHeight = 0
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if widget.TitleLineLimit <= 0 || widget.TitleLineLimit > 3 {
|
|
|
|
+ widget.TitleLineLimit = 3
|
|
|
|
+ }
|
|
|
|
+
|
|
if widget.Style == "detailed-list" {
|
|
if widget.Style == "detailed-list" {
|
|
for i := range widget.FeedRequests {
|
|
for i := range widget.FeedRequests {
|
|
widget.FeedRequests[i].IsDetailed = true
|
|
widget.FeedRequests[i].IsDetailed = true
|