diff options
author | Alex Shpak <alex-shpak@users.noreply.github.com> | 2018-09-11 16:51:27 +0200 |
---|---|---|
committer | Alex Shpak <alex-shpak@users.noreply.github.com> | 2018-09-11 16:51:27 +0200 |
commit | 628a4df0df81347c74a88e4c110066c9dc6017d1 (patch) | |
tree | 474ba777084cf5593c79330b71539f2a4fa7733f /layouts/partials | |
parent | 43974d0908a341ef8dd5d100a63563784fdbf70c (diff) |
Refactor partials, layout and sass files
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/book-toc.html | 1 | ||||
-rw-r--r-- | layouts/partials/book/html-head.html (renamed from layouts/partials/book-html-head.html) | 2 | ||||
-rw-r--r-- | layouts/partials/book/nav-after.html | 0 | ||||
-rw-r--r-- | layouts/partials/book/nav-auto.html (renamed from layouts/partials/book-nav.html) | 24 | ||||
-rw-r--r-- | layouts/partials/book/nav-brand.html (renamed from layouts/partials/book-brand.html) | 0 | ||||
-rw-r--r-- | layouts/partials/book/nav-bundle.html | 5 | ||||
-rw-r--r-- | layouts/partials/book/nav.html | 5 | ||||
-rw-r--r-- | layouts/partials/book/toc.html | 1 |
8 files changed, 25 insertions, 13 deletions
diff --git a/layouts/partials/book-toc.html b/layouts/partials/book-toc.html deleted file mode 100644 index 59e6b35..0000000 --- a/layouts/partials/book-toc.html +++ /dev/null @@ -1 +0,0 @@ -{{ .Page.TableOfContents }}
\ No newline at end of file diff --git a/layouts/partials/book-html-head.html b/layouts/partials/book/html-head.html index 682423f..bf7db42 100644 --- a/layouts/partials/book-html-head.html +++ b/layouts/partials/book/html-head.html @@ -3,7 +3,7 @@ <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,600" rel="stylesheet"> <link href="/css/pure-min.css" rel="stylesheet"> -<link href="/css/grids-responsive-min.css" rel="stylesheet"> +<!-- <link href="/css/grids-responsive-min.css" rel="stylesheet"> --> {{ $styles := resources.Get "styles.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }} <link rel="stylesheet" href="{{ $styles.Permalink }}">
\ No newline at end of file diff --git a/layouts/partials/book/nav-after.html b/layouts/partials/book/nav-after.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/layouts/partials/book/nav-after.html diff --git a/layouts/partials/book-nav.html b/layouts/partials/book/nav-auto.html index fc89891..c54f960 100644 --- a/layouts/partials/book-nav.html +++ b/layouts/partials/book/nav-auto.html @@ -12,27 +12,29 @@ {{ end }} -<nav role="navigation" class="pure-menu"> - {{ partial "book-brand" . }} +<nav role="navigation"> + {{ partial "book/nav-brand" . }} - <ul class="pure-menu-list pure-menu-root"> + <ul> {{ range .Scratch.Get "BookSections" }} {{ template "book-section" (dict "Section" . "CurrentPage" $.Permalink) }} {{ end }} </ul> + + {{ partial "book/nav-after" . }} </nav> <!-- Single section of menu (recursive) --> {{ define "book-section" }} - <li class="pure-menu-item"> + <li {{ if .Section.Params.booktopsection }}class="book-nav-section"{{ end }}> {{ template "book-heading" .Section }} - <ul class="pure-menu-list"> + <ul> {{ range .Section.Sections }} {{ template "book-section" (dict "Section" . "CurrentPage" $.CurrentPage) }} {{ end }} {{ range .Section.Pages }} - <li class="pure-menu-item"> - <a href="{{ .RelPermalink }}" class="pure-menu-link {{ if eq $.CurrentPage .Permalink }}active{{ end }}"> + <li> + <a href="{{ .RelPermalink }}" class="{{ if eq $.CurrentPage .Permalink }}active{{ end }}"> {{ default .Title (.File | humanize | title) }} </a> </li> @@ -49,13 +51,13 @@ {{ $title := default .Title $title }} {{ if .Content }} -<a href="{{ .RelPermalink }}" class="pure-menu-link {{ if .IsSection }}section{{ end }}"> - {{- $title -}} +<a href="{{ .RelPermalink }}"> + {{- $title -}} </a> {{ else }} -<span class="pure-menu-heading {{ if .IsSection }}section{{ end }}"> +<a> {{- $title -}} -</span> +</a> {{ end }} {{ end }} diff --git a/layouts/partials/book-brand.html b/layouts/partials/book/nav-brand.html index 5a2c9cb..5a2c9cb 100644 --- a/layouts/partials/book-brand.html +++ b/layouts/partials/book/nav-brand.html diff --git a/layouts/partials/book/nav-bundle.html b/layouts/partials/book/nav-bundle.html new file mode 100644 index 0000000..46665ad --- /dev/null +++ b/layouts/partials/book/nav-bundle.html @@ -0,0 +1,5 @@ +<nav role="navigation"> + {{ partial "book/nav-brand" . }} + {{ with .Site.GetPage .Site.Params.BookMenuBundle }}{{ .Content }}{{ end }} + {{ partial "book/nav-after" . }} +</nav> diff --git a/layouts/partials/book/nav.html b/layouts/partials/book/nav.html new file mode 100644 index 0000000..cc24df7 --- /dev/null +++ b/layouts/partials/book/nav.html @@ -0,0 +1,5 @@ +{{ if .Site.Params.BookMenuBundle }} + {{ partial "book/nav-bundle" . }} +{{ else }} + {{ partial "book/nav-auto" . }} +{{ end }}
\ No newline at end of file diff --git a/layouts/partials/book/toc.html b/layouts/partials/book/toc.html new file mode 100644 index 0000000..aca3785 --- /dev/null +++ b/layouts/partials/book/toc.html @@ -0,0 +1 @@ +{{ .Page.TableOfContents }}
\ No newline at end of file |