Add center-vertically property

This commit is contained in:
Svilen Markov 2024-08-31 17:35:38 +01:00
parent b9bf8c6c96
commit cf0dd07c21
3 changed files with 8 additions and 1 deletions

View File

@ -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;

View File

@ -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" . }}

View File

@ -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
}