|
@@ -119,6 +119,7 @@ const (
|
|
|
type widgetBase struct {
|
|
|
Type string `yaml:"type"`
|
|
|
Title string `yaml:"title"`
|
|
|
+ TitleURL string `yaml:"title-url"`
|
|
|
CSSClass string `yaml:"css-class"`
|
|
|
CustomCacheDuration DurationField `yaml:"cache"`
|
|
|
ContentAvailable bool `yaml:"-"`
|
|
@@ -186,6 +187,14 @@ func (w *widgetBase) withTitle(title string) *widgetBase {
|
|
|
return w
|
|
|
}
|
|
|
|
|
|
+func (w *widgetBase) withTitleURL(titleURL string) *widgetBase {
|
|
|
+ if w.TitleURL == "" {
|
|
|
+ w.TitleURL = titleURL
|
|
|
+ }
|
|
|
+
|
|
|
+ return w
|
|
|
+}
|
|
|
+
|
|
|
func (w *widgetBase) withCacheDuration(duration time.Duration) *widgetBase {
|
|
|
w.cacheType = cacheTypeDuration
|
|
|
|