From c5d4cf8f68698b795b4f1dc7a823faf43e1d9e27 Mon Sep 17 00:00:00 2001 From: Svilen Markov <7613769+svilenmarkov@users.noreply.github.com> Date: Tue, 6 May 2025 10:52:46 +0100 Subject: [PATCH] Allow hiding widget header --- docs/configuration.md | 8 ++++++++ internal/glance/widget.go | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index 0e98fe3..f0a616e 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -635,6 +635,7 @@ pages: | type | string | yes | | title | string | no | | title-url | string | no | +| hide-header | boolean | no | false | | cache | string | no | | css-class | string | no | @@ -647,6 +648,13 @@ The title of the widget. If left blank it will be defined by the widget. #### `title-url` The URL to go to when clicking on the widget's title. If left blank it will be defined by the widget (if available). +#### `hide-header` +When set to `true`, the header (title) of the widget will be hidden. You cannot hide the header of the group widget. + +> [!NOTE] +> +> If a widget fails to update, a red dot or circle is shown next to the title of that widget indicating that the it is not working. You will not be able to see this if you hide the header. + #### `cache` How long to keep the fetched data in memory. The value is a string and must be a number followed by one of s, m, h, d. Examples: diff --git a/internal/glance/widget.go b/internal/glance/widget.go index 7c30183..6d0936c 100644 --- a/internal/glance/widget.go +++ b/internal/glance/widget.go @@ -150,6 +150,7 @@ type widgetBase struct { Type string `yaml:"type"` Title string `yaml:"title"` TitleURL string `yaml:"title-url"` + HideHeader bool `yaml:"hide-header"` CSSClass string `yaml:"css-class"` CustomCacheDuration durationField `yaml:"cache"` ContentAvailable bool `yaml:"-"` @@ -161,7 +162,6 @@ type widgetBase struct { cacheType cacheType `yaml:"-"` nextUpdate time.Time `yaml:"-"` updateRetriedTimes int `yaml:"-"` - HideHeader bool `yaml:"-"` } type widgetProviders struct {