Skip to content

A self-hosted dashboard that puts all your feeds in one place

Add center-vertically property

Svilen Markovcf0dd07c2131
diff --git a/internal/assets/static/main.css b/internal/assets/static/main.css
index 37db60c..a8da75c 100644
--- a/internal/assets/static/main.css
+++ b/internal/assets/static/main.css
@@ -451,6 +451,12 @@ kbd:active {
max-width: 1100px;
}
+.page-center-vertically .page {
+ display: flex;
+ justify-content: center;
+ flex-direction: column;
+}
+
.dynamic-columns {
gap: calc(var(--widget-content-vertical-padding) / 2);
display: grid;
diff --git a/internal/assets/templates/page.html b/internal/assets/templates/page.html
index 4d08e61..d2cee76 100644
--- a/internal/assets/templates/page.html
+++ b/internal/assets/templates/page.html
@@ -11,7 +11,7 @@
</script>
{{ end }}
-{{ define "document-root-attrs" }}class="{{ if .App.Config.Theme.Light }}light-scheme {{ end }}{{ if ne "" .Page.Width }}page-width-{{ .Page.Width }}{{ end }}"{{ end }}
+{{ define "document-root-attrs" }}class="{{ if .App.Config.Theme.Light }}light-scheme {{ end }}{{ if ne "" .Page.Width }}page-width-{{ .Page.Width }} {{ end }}{{ if .Page.CenterVertically }}page-center-vertically{{ end }}"{{ end }}
{{ define "document-head-after" }}
{{ template "page-style-overrides.gotmpl" . }}
diff --git a/internal/glance/glance.go b/internal/glance/glance.go
index a8485f2..d26745f 100644
--- a/internal/glance/glance.go
+++ b/internal/glance/glance.go
@@ -73,6 +73,7 @@ type Page struct {
Width string `yaml:"width"`
ShowMobileHeader bool `yaml:"show-mobile-header"`
HideDesktopNavigation bool `yaml:"hide-desktop-navigation"`
+ CenterVertically bool `yaml:"center-vertically"`
Columns []Column `yaml:"columns"`
mu sync.Mutex
}