mirror of
https://github.com/glanceapp/glance.git
synced 2025-02-23 22:01:09 +01:00
Merge pull request #249 from ralphocdol/default-expand-mobile-navigation
Default expand mobile navigation
This commit is contained in:
commit
40d3053df9
@ -315,6 +315,7 @@ pages:
|
|||||||
| width | string | no | |
|
| width | string | no | |
|
||||||
| center-vertically | boolean | no | false |
|
| center-vertically | boolean | no | false |
|
||||||
| hide-desktop-navigation | boolean | no | false |
|
| hide-desktop-navigation | boolean | no | false |
|
||||||
|
| expand-mobile-page-navigation | boolean | no | false |
|
||||||
| show-mobile-header | boolean | no | false |
|
| show-mobile-header | boolean | no | false |
|
||||||
| columns | array | yes | |
|
| columns | array | yes | |
|
||||||
|
|
||||||
@ -341,6 +342,9 @@ When set to `true`, vertically centers the content on the page. Has no effect if
|
|||||||
#### `hide-desktop-navigation`
|
#### `hide-desktop-navigation`
|
||||||
Whether to show the navigation links at the top of the page on desktop.
|
Whether to show the navigation links at the top of the page on desktop.
|
||||||
|
|
||||||
|
#### `expand-mobile-page-navigation`
|
||||||
|
Whether the mobile page navigation should be expanded by default.
|
||||||
|
|
||||||
#### `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.
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
{{ range $i, $column := .Page.Columns }}
|
{{ range $i, $column := .Page.Columns }}
|
||||||
<label class="mobile-navigation-label"><input type="radio" class="mobile-navigation-input" name="column" value="{{ $i }}" autocomplete="off"{{ if eq $i $.Page.PrimaryColumnIndex }} checked{{ end }}><div class="mobile-navigation-pill"></div></label>
|
<label class="mobile-navigation-label"><input type="radio" class="mobile-navigation-input" name="column" value="{{ $i }}" autocomplete="off"{{ if eq $i $.Page.PrimaryColumnIndex }} checked{{ end }}><div class="mobile-navigation-pill"></div></label>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<label class="mobile-navigation-label"><input type="checkbox" class="mobile-navigation-page-links-input" autocomplete="on"><div class="hamburger-icon"></div></label>
|
<label class="mobile-navigation-label"><input type="checkbox" class="mobile-navigation-page-links-input" autocomplete="on"{{ if .Page.ExpandMobilePageNavigation }} checked{{ end }}><div class="hamburger-icon"></div></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="mobile-navigation-page-links">
|
<div class="mobile-navigation-page-links">
|
||||||
{{ template "navigation-links" . }}
|
{{ template "navigation-links" . }}
|
||||||
|
@ -68,15 +68,16 @@ 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"`
|
||||||
HideDesktopNavigation bool `yaml:"hide-desktop-navigation"`
|
ExpandMobilePageNavigation bool `yaml:"expand-mobile-page-navigation"`
|
||||||
CenterVertically bool `yaml:"center-vertically"`
|
HideDesktopNavigation bool `yaml:"hide-desktop-navigation"`
|
||||||
Columns []Column `yaml:"columns"`
|
CenterVertically bool `yaml:"center-vertically"`
|
||||||
PrimaryColumnIndex int8 `yaml:"-"`
|
Columns []Column `yaml:"columns"`
|
||||||
mu sync.Mutex
|
PrimaryColumnIndex int8 `yaml:"-"`
|
||||||
|
mu sync.Mutex
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Page) UpdateOutdatedWidgets() {
|
func (p *Page) UpdateOutdatedWidgets() {
|
||||||
|
Loading…
Reference in New Issue
Block a user