diff options
Diffstat (limited to 'layouts/partials/docs')
-rw-r--r-- | layouts/partials/docs/nav-bundle.html | 11 | ||||
-rw-r--r-- | layouts/partials/docs/nav-filetree.html (renamed from layouts/partials/docs/nav-tree.html) | 38 | ||||
-rw-r--r-- | layouts/partials/docs/nav.html | 5 |
3 files changed, 18 insertions, 36 deletions
diff --git a/layouts/partials/docs/nav-bundle.html b/layouts/partials/docs/nav-bundle.html index 221325e..bdabefd 100644 --- a/layouts/partials/docs/nav-bundle.html +++ b/layouts/partials/docs/nav-bundle.html @@ -1,8 +1,3 @@ -<nav role="navigation"> - {{ partial "docs/nav-brand" . }} - {{ partial "docs/inject/nav-before" . }} - {{ with .Site.GetPage .Site.Params.BookMenuBundle }} - {{- .Content -}} - {{ end }} - {{ partial "docs/inject/nav-after" . }} -</nav> +{{ with .Site.GetPage .Site.Params.BookMenuBundle }} + {{- .Content -}} +{{ end }}
\ No newline at end of file diff --git a/layouts/partials/docs/nav-tree.html b/layouts/partials/docs/nav-filetree.html index 6d0a2d5..c5ecfc8 100644 --- a/layouts/partials/docs/nav-tree.html +++ b/layouts/partials/docs/nav-filetree.html @@ -9,21 +9,13 @@ {{ $singleSection := index $bookSections 0 }} {{ .Scratch.Set "BookSections" $singleSection.Sections }} {{ end }} - {{ end }} -<nav role="navigation"> - {{ partial "docs/nav-brand" . }} - {{ partial "docs/inject/nav-before" . }} - - <ul> +<ul> {{ range .Scratch.Get "BookSections" }} {{ template "book-section" (dict "Section" . "CurrentPage" $.Permalink) }} {{ end }} - </ul> - - {{ partial "docs/inject/nav-after" . }} -</nav> +</ul> <!-- Single section of menu (recursive) --> {{ define "book-section" }} @@ -47,18 +39,18 @@ <!-- Menu Heading --> {{ define "book-heading" }} -{{ $sections := split (trim .Dir "/") "/" }} -{{ $title := index ($sections | last 1) 0 | humanize | title }} -{{ $title := default .Title $title }} - -{{ if .Content }} -<a href="{{ .RelPermalink }}"> - {{- $title -}} -</a> -{{ else }} -<a> - {{- $title -}} -</a> -{{ end }} + {{ $sections := split (trim .Dir "/") "/" }} + {{ $title := index ($sections | last 1) 0 | humanize | title }} + {{ $title := default .Title $title }} + + {{ if .Content }} + <a href="{{ .RelPermalink }}"> + {{- $title -}} + </a> + {{ else }} + <a> + {{- $title -}} + </a> + {{ end }} {{ end }} diff --git a/layouts/partials/docs/nav.html b/layouts/partials/docs/nav.html deleted file mode 100644 index 96bc233..0000000 --- a/layouts/partials/docs/nav.html +++ /dev/null @@ -1,5 +0,0 @@ -{{ if .Site.Params.BookMenuBundle }} - {{ partial "docs/nav-bundle" . }} -{{ else }} - {{ partial "docs/nav-tree" . }} -{{ end }}
\ No newline at end of file |