From cce17bcc99be389dce5bfbadfabaacf132c3f8f7 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Wed, 26 Sep 2018 00:12:56 +0200 Subject: Remove purecss dependency and replace with flexbox --- layouts/partials/docs/menu-filetree.html | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 layouts/partials/docs/menu-filetree.html (limited to 'layouts/partials/docs/menu-filetree.html') diff --git a/layouts/partials/docs/menu-filetree.html b/layouts/partials/docs/menu-filetree.html new file mode 100644 index 0000000..490c350 --- /dev/null +++ b/layouts/partials/docs/menu-filetree.html @@ -0,0 +1,47 @@ + +{{ template "book-get-root-section" . }} + +{{- range .Scratch.Get "BookSections" -}} + {{ template "book-section" (dict "Section" . "CurrentPage" $.Permalink) }} +{{- end -}} + +{{ define "book-section" }} + +{{ end }} + +{{ define "book-page-link" }} +{{- with .Page -}} + + {{- template "title" . -}} + +{{- end -}} +{{ end }} + +{{ define "book-get-root-section" }} + + {{ $bookSection := default "docs" .Site.Params.BookSection }} + {{ if eq $bookSection "*" }} + {{ .Scratch.Set "BookSections" .Site.Sections }} + {{ else }} + {{ $bookSections := where .Site.Sections "Section" $bookSection }} + {{ .Scratch.Set "BookSections" $bookSections }} + {{ end }} +{{ end }} \ No newline at end of file -- cgit v1.2.3