-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* mobie responsive css tweaks * remove accidental commit * Fix badge in readme * widen homepage by default * style view all
- Loading branch information
Showing
5 changed files
with
195 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{{- $currentNode := . }} | ||
{{- if eq .Site.Params.ordersectionsby "title"}} | ||
{{- range .Site.Home.Sections.ByTitle}} | ||
{{- template "menu-nav" dict "sect" . "currentnode" $currentNode "level" 1}} | ||
{{- end}} | ||
{{- else}} | ||
{{- range .Site.Home.Sections.ByWeight}} | ||
{{- template "menu-nav" dict "sect" . "currentnode" $currentNode "level" 1}} | ||
{{- end}} | ||
{{- end}} | ||
|
||
<!-- templates --> | ||
{{- define "menu-nav" }} | ||
{{- $currentNode := .currentnode }} | ||
{{- $level := .level }} | ||
{{- with .sect}} | ||
{{- if .IsSection}} | ||
<option value="{{ .RelPermalink}}" {{if eq .URL $currentNode.URL}} selected{{end}}> | ||
{{if gt $level 1 }} | ||
{{- range after 1 (seq $level)}}-{{ end }} | ||
{{end}} {{.Title}}</option> | ||
|
||
{{- if or (.IsAncestor $currentNode) (.Params.alwaysopen) }} <!-- dig into sub levels only if active or menu is always ON--> | ||
|
||
{{- $numberOfPages := (add (len .Pages) (len .Sections)) }} | ||
{{- if ne $numberOfPages 0 }} | ||
{{- .Scratch.Set "pages" .Pages }} | ||
{{- if .Sections}} | ||
{{- .Scratch.Set "pages" (.Pages | union .Sections) }} | ||
{{- end}} | ||
{{- $pages := (.Scratch.Get "pages") }} | ||
|
||
{{- if eq .Site.Params.ordersectionsby "title"}} | ||
{{- range $pages.ByTitle }} | ||
{{- if and .Params.hidden (not $.showhidden) }} | ||
{{- else}} | ||
{{- template "menu-nav" dict "sect" . "currentnode" $currentNode }} | ||
{{- end}} | ||
{{- end}} | ||
{{- else}} | ||
{{- range $pages.ByWeight }} | ||
{{- if and .Params.hidden (not $.showhidden) }} | ||
{{- else}} | ||
{{- template "menu-nav" dict "sect" . "currentnode" $currentNode "level" (add $level 1) }} | ||
{{- end}} | ||
{{- end}} | ||
{{- end}} | ||
|
||
{{- end}} | ||
{{end}} | ||
{{- else}} | ||
{{- if not .Params.Hidden }} | ||
<option value="{{ .RelPermalink}}" {{if eq .URL $currentNode.URL}} selected{{end}}> | ||
{{- range after 1 (seq $level)}}--{{ end }} {{.Title}}</option> | ||
{{- end}} | ||
{{- end}} | ||
{{- end}} | ||
{{- end}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters