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/docs/baseof.html | 54 +++++++++++++++++--------------- layouts/partials/docs/header.html | 6 ---- layouts/partials/docs/html-head.html | 5 +-- layouts/partials/docs/menu-bundle.html | 3 ++ layouts/partials/docs/menu-filetree.html | 47 +++++++++++++++++++++++++++ layouts/partials/docs/nav-brand.html | 3 -- layouts/partials/docs/nav-bundle.html | 3 -- layouts/partials/docs/nav-filetree.html | 47 --------------------------- 8 files changed, 79 insertions(+), 89 deletions(-) delete mode 100644 layouts/partials/docs/header.html create mode 100644 layouts/partials/docs/menu-bundle.html create mode 100644 layouts/partials/docs/menu-filetree.html delete mode 100644 layouts/partials/docs/nav-brand.html delete mode 100644 layouts/partials/docs/nav-bundle.html delete mode 100644 layouts/partials/docs/nav-filetree.html (limited to 'layouts') diff --git a/layouts/docs/baseof.html b/layouts/docs/baseof.html index 94f8cd4..7eb4326 100644 --- a/layouts/docs/baseof.html +++ b/layouts/docs/baseof.html @@ -7,37 +7,39 @@ -
- {{ partial "docs/header" . }} -
- - - + +
-
- -
-
- {{- .Content -}} + + +
+
+
- {{ $showToC := default (default true .Site.Params.BookShowToC) .Params.bookshowtoc }} - {{ if and ($showToC) (.Page.TableOfContents) }} -
- {{ partial "docs/toc" . }} +
+ {{- .Content -}}
- {{ end }}
+ {{ $showToC := default (default true .Site.Params.BookShowToC) .Params.bookshowtoc }} + {{ if and ($showToC) (.Page.TableOfContents) }} +
+ {{ partial "docs/toc" . }} +
+ {{ end }} +
{{ partial "docs/inject/body" . }} diff --git a/layouts/partials/docs/header.html b/layouts/partials/docs/header.html deleted file mode 100644 index aab1fcb..0000000 --- a/layouts/partials/docs/header.html +++ /dev/null @@ -1,6 +0,0 @@ - -

- {{ .Site.Title }} -

\ No newline at end of file diff --git a/layouts/partials/docs/html-head.html b/layouts/partials/docs/html-head.html index fe09dd0..1da298c 100644 --- a/layouts/partials/docs/html-head.html +++ b/layouts/partials/docs/html-head.html @@ -3,10 +3,7 @@ {{- template "title" . }} | {{ .Site.Title -}} - - - - + {{ $styles := resources.Get "styles.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }} \ No newline at end of file diff --git a/layouts/partials/docs/menu-bundle.html b/layouts/partials/docs/menu-bundle.html new file mode 100644 index 0000000..bdabefd --- /dev/null +++ b/layouts/partials/docs/menu-bundle.html @@ -0,0 +1,3 @@ +{{ with .Site.GetPage .Site.Params.BookMenuBundle }} + {{- .Content -}} +{{ end }} \ No newline at end of file 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" }} +
    + {{ range .Section.Sections }} +
  • + {{- if .Content -}} + {{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }} + {{- else -}} + {{- template "title" . -}} + {{- end -}} + + {{ template "book-section" (dict "Section" . "CurrentPage" $.CurrentPage) }} +
  • + {{ end }} + + {{ range .Section.Pages }} +
  • + {{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }} +
  • + {{ end }} +
+{{ 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 diff --git a/layouts/partials/docs/nav-brand.html b/layouts/partials/docs/nav-brand.html deleted file mode 100644 index 5a2c9cb..0000000 --- a/layouts/partials/docs/nav-brand.html +++ /dev/null @@ -1,3 +0,0 @@ -

- {{ .Site.Title }} -

\ No newline at end of file diff --git a/layouts/partials/docs/nav-bundle.html b/layouts/partials/docs/nav-bundle.html deleted file mode 100644 index bdabefd..0000000 --- a/layouts/partials/docs/nav-bundle.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ with .Site.GetPage .Site.Params.BookMenuBundle }} - {{- .Content -}} -{{ end }} \ No newline at end of file diff --git a/layouts/partials/docs/nav-filetree.html b/layouts/partials/docs/nav-filetree.html deleted file mode 100644 index 3ec4539..0000000 --- a/layouts/partials/docs/nav-filetree.html +++ /dev/null @@ -1,47 +0,0 @@ - -{{ template "book-get-root-section" . }} - -{{- range .Scratch.Get "BookSections" -}} - {{ template "book-section" (dict "Section" . "CurrentPage" $.Permalink) }} -{{- end -}} - -{{ define "book-section" }} -
    - {{ range .Section.Sections }} -
  • - {{- if .Content -}} - {{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }} - {{- else -}} - {{- template "title" . -}} - {{- end -}} - - {{ template "book-section" (dict "Section" . "CurrentPage" $.CurrentPage) }} -
  • - {{ end }} - - {{ range .Section.Pages }} -
  • - {{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }} -
  • - {{ end }} -
-{{ 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