mirror of
https://github.com/glanceapp/glance.git
synced 2024-11-22 08:23:52 +01:00
Allow hiding desktop navigation
This commit is contained in:
parent
2e629efc7f
commit
b365a03e71
@ -265,6 +265,7 @@ pages:
|
|||||||
| title | string | yes | |
|
| title | string | yes | |
|
||||||
| slug | string | no | |
|
| slug | string | no | |
|
||||||
| width | string | no | |
|
| width | string | no | |
|
||||||
|
| hide-desktop-navigation | boolean | no | false |
|
||||||
| show-mobile-header | boolean | no | false |
|
| show-mobile-header | boolean | no | false |
|
||||||
| columns | array | yes | |
|
| columns | array | yes | |
|
||||||
|
|
||||||
@ -286,6 +287,9 @@ The maximum width of the page on desktop. Possible values are `slim` and `wide`.
|
|||||||
> When using `slim`, the maximum number of columns allowed for that page is `2`.
|
> When using `slim`, the maximum number of columns allowed for that page is `2`.
|
||||||
|
|
||||||
|
|
||||||
|
#### `hide-desktop-navigation`
|
||||||
|
Whether to show the navigation links at the top of the page on desktop.
|
||||||
|
|
||||||
#### `show-mobile-header`
|
#### `show-mobile-header`
|
||||||
Whether to show a header displaying the name of the page on mobile. The header purposefully has a lot of vertical whitespace in order to push the content down and make it easier to reach on tall devices.
|
Whether to show a header displaying the name of the page on mobile. The header purposefully has a lot of vertical whitespace in order to push the content down and make it easier to reach on tall devices.
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
{{ define "document-body" }}
|
{{ define "document-body" }}
|
||||||
<div class="flex flex-column height-100">
|
<div class="flex flex-column height-100">
|
||||||
|
{{ if not .Page.HideDesktopNavigation }}
|
||||||
<div class="header-container content-bounds">
|
<div class="header-container content-bounds">
|
||||||
<div class="header flex padding-inline-widget widget-content-frame">
|
<div class="header flex padding-inline-widget widget-content-frame">
|
||||||
<!-- TODO: Replace G with actual logo, first need an actual logo -->
|
<!-- TODO: Replace G with actual logo, first need an actual logo -->
|
||||||
@ -35,6 +36,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<div class="mobile-navigation">
|
<div class="mobile-navigation">
|
||||||
<div class="mobile-navigation-icons">
|
<div class="mobile-navigation-icons">
|
||||||
|
@ -58,12 +58,13 @@ type templateData struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Page struct {
|
type Page struct {
|
||||||
Title string `yaml:"name"`
|
Title string `yaml:"name"`
|
||||||
Slug string `yaml:"slug"`
|
Slug string `yaml:"slug"`
|
||||||
Width string `yaml:"width"`
|
Width string `yaml:"width"`
|
||||||
ShowMobileHeader bool `yaml:"show-mobile-header"`
|
ShowMobileHeader bool `yaml:"show-mobile-header"`
|
||||||
Columns []Column `yaml:"columns"`
|
HideDesktopNavigation bool `yaml:"hide-desktop-navigation"`
|
||||||
mu sync.Mutex
|
Columns []Column `yaml:"columns"`
|
||||||
|
mu sync.Mutex
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Page) UpdateOutdatedWidgets() {
|
func (p *Page) UpdateOutdatedWidgets() {
|
||||||
|
Loading…
Reference in New Issue
Block a user