diff options
author | Alex Shpak <alex-shpak@users.noreply.github.com> | 2018-11-25 13:30:25 +0100 |
---|---|---|
committer | Alex Shpak <alex-shpak@users.noreply.github.com> | 2018-11-25 13:30:25 +0100 |
commit | 76c251066fd34a26734bf1acdb1e041881e1c0af (patch) | |
tree | c332d7ae2bf0e45087fdcc33784dc99de9bcc98b /layouts/docs | |
parent | 461aafe99569a93838f823729aaf8d51fa693aaf (diff) |
Refactor templates and partials
Diffstat (limited to 'layouts/docs')
-rw-r--r-- | layouts/docs/baseof.html | 13 | ||||
-rw-r--r-- | layouts/docs/list.html | 10 | ||||
-rw-r--r-- | layouts/docs/single.html | 10 |
3 files changed, 21 insertions, 12 deletions
diff --git a/layouts/docs/baseof.html b/layouts/docs/baseof.html index 0f951cd..805e060 100644 --- a/layouts/docs/baseof.html +++ b/layouts/docs/baseof.html @@ -28,21 +28,14 @@ <div class="book-page"> {{ partial "docs/mobile-header" . }} - <article class="markdown"> - {{- .Content -}} - </article> + {{ template "main" . }} </div> - {{ $showToC := default (default true .Site.Params.BookShowToC) .Params.bookshowtoc }} - {{ if and ($showToC) (.Page.TableOfContents) }} - <aside class="book-toc fixed"> - {{ partial "docs/toc" . }} - </aside> - {{ end }} + {{ template "toc" . }} {{ partial "docs/inject/body" . }} {{ template "_internal/google_analytics_async.html" . }} </main> </body> -</html>
\ No newline at end of file +</html> diff --git a/layouts/docs/list.html b/layouts/docs/list.html index a54943b..ee001c9 100644 --- a/layouts/docs/list.html +++ b/layouts/docs/list.html @@ -1 +1,9 @@ -{{ define "." }} {{ end }}
\ No newline at end of file +{{ define "main" }} +<article class="markdown"> + {{- .Content -}} +</article> +{{ end }} + +{{ define "toc" }} + {{ partial "docs/toc" . }} +{{ end }} diff --git a/layouts/docs/single.html b/layouts/docs/single.html index a54943b..ee001c9 100644 --- a/layouts/docs/single.html +++ b/layouts/docs/single.html @@ -1 +1,9 @@ -{{ define "." }} {{ end }}
\ No newline at end of file +{{ define "main" }} +<article class="markdown"> + {{- .Content -}} +</article> +{{ end }} + +{{ define "toc" }} + {{ partial "docs/toc" . }} +{{ end }} |