diff options
-rw-r--r-- | assets/_utils.scss | 16 | ||||
-rw-r--r-- | assets/book.scss | 8 | ||||
-rw-r--r-- | exampleSite/content/_index.md | 2 | ||||
-rw-r--r-- | layouts/404.html | 6 | ||||
-rw-r--r-- | layouts/docs/baseof.html | 13 | ||||
-rw-r--r-- | layouts/docs/list.html | 10 | ||||
-rw-r--r-- | layouts/docs/single.html | 10 | ||||
-rw-r--r-- | layouts/partials/docs/toc.html | 7 | ||||
-rw-r--r-- | layouts/posts/baseof.html | 2 | ||||
-rw-r--r-- | layouts/posts/list.html | 10 | ||||
-rw-r--r-- | layouts/posts/single.html | 6 |
11 files changed, 57 insertions, 33 deletions
diff --git a/assets/_utils.scss b/assets/_utils.scss index fd773d3..bb0120c 100644 --- a/assets/_utils.scss +++ b/assets/_utils.scss @@ -26,6 +26,10 @@ margin: 0 auto; } +.hide { + display: none; +} + @mixin fixed { position: fixed; top: 0; @@ -34,6 +38,12 @@ overflow-y: auto; } -.hide { - display: none; -} +@mixin dark-links { + a { + color: $nav-link-color; + } + + a.active { + color: $color-link; + } +}
\ No newline at end of file diff --git a/assets/book.scss b/assets/book.scss index d476111..2032466 100644 --- a/assets/book.scss +++ b/assets/book.scss @@ -103,13 +103,7 @@ ul.pagination { @include fixed; } - a { - color: $nav-link-color; - } - - a.active { - color: $color-link; - } + @include dark-links; } .book-page { diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index 6cb0a37..772bbe8 100644 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -1,5 +1,5 @@ --- -title: Index +title: Introduction type: docs --- diff --git a/layouts/404.html b/layouts/404.html index ca630ee..06ca617 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -2,7 +2,9 @@ {{ define "main"}} <main id="main"> <div> - <h1 id="title"><a href="{{ "/docs" }}">Go Home</a></h1> + <h1 id="title"><a href="{{ "/" }}">Go Home</a></h1> </div> </main> -{{ end }}
\ No newline at end of file +{{ end }} + +{{ define "toc" }} {{ end }}
\ No newline at end of file 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 }} diff --git a/layouts/partials/docs/toc.html b/layouts/partials/docs/toc.html index aca3785..83c276d 100644 --- a/layouts/partials/docs/toc.html +++ b/layouts/partials/docs/toc.html @@ -1 +1,6 @@ -{{ .Page.TableOfContents }}
\ No newline at end of file +{{ $showToC := default (default true .Site.Params.BookShowToC) .Params.bookshowtoc }} + {{ if and ($showToC) (.Page.TableOfContents) }} + <aside class="book-toc fixed"> + {{ .Page.TableOfContents }} + </aside> +{{ end }} diff --git a/layouts/posts/baseof.html b/layouts/posts/baseof.html index 47371c0..fa97ee3 100644 --- a/layouts/posts/baseof.html +++ b/layouts/posts/baseof.html @@ -16,4 +16,4 @@ {{ template "_internal/google_analytics_async.html" . }} </body> -</html>
\ No newline at end of file +</html> diff --git a/layouts/posts/list.html b/layouts/posts/list.html index da13220..97873dd 100644 --- a/layouts/posts/list.html +++ b/layouts/posts/list.html @@ -5,14 +5,16 @@ <h2> <a href="{{ .Permalink }}">{{ .Title }}</a> </h2> - <h5>{{ .Date.Format "January 2, 2006" }}</h5> + <h5> + <strong>{{ .Date.Format "January 2, 2006" }}</strong> + </h5> <p> - {{ .Summary }} + {{- .Summary -}} {{ if .Truncated }} - <a href="{{ .Permalink }}">...</a> + <a href="{{ .Permalink }}">...</a> {{ end }} </p> </article> {{ end }} {{ template "_internal/pagination.html" . }} -{{ end }}
\ No newline at end of file +{{ end }} diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 9081faa..6b0712e 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -1,9 +1,11 @@ {{ define "main" }} <header> <h1>{{ .Title }}</h1> - <h5>{{ .Date.Format "January 2, 2006" }}</h5> + <h5> + <strong>{{ .Date.Format "January 2, 2006" }}</strong> + </h5> </header> <article class="markdown"> {{- .Content -}} </article> -{{ end }}
\ No newline at end of file +{{ end }} |