diff options
-rw-r--r-- | layouts/_default/single.html | 9 | ||||
-rw-r--r-- | layouts/partials/nextChapter.html | 10 | ||||
-rw-r--r-- | layouts/partials/previousChapter.html | 10 |
3 files changed, 27 insertions, 2 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 42a93b7..43f55b4 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,11 +1,16 @@ {{ define "main" }}
-<div>
+<div class="mb-4">
+ <small>{{ partial "previousChapter" . }}</small>
<h2>{{ .Title }}</h2>
<div class="ml-4 border-left border-primary pl-1">
{{ .Content }}
+ <div class="d-flex flex-row justify-content-around border-top pt-2 border-primary">
+ {{ partial "previousChapter" . }}
+ {{ partial "nextChapter" . }}
+ </div>
</div>
<div class="toTop navMenu menuItem" onclick="scrollToTop()">
- <i class="fas fa-angle-up"></i>
+ <i class="fas fa-angle-up"></i>
</div>
</div>
{{ end }}
diff --git a/layouts/partials/nextChapter.html b/layouts/partials/nextChapter.html new file mode 100644 index 0000000..9d1d588 --- /dev/null +++ b/layouts/partials/nextChapter.html @@ -0,0 +1,10 @@ +{{ if .PrevInSection }} +<div> + <a + href="{{ .PrevInSection.Permalink | relURL }}" + title="{{ .PrevInSection.Title }}" + > + Next Chapter > + </a> +</div> +{{ end }} diff --git a/layouts/partials/previousChapter.html b/layouts/partials/previousChapter.html new file mode 100644 index 0000000..de0e7ec --- /dev/null +++ b/layouts/partials/previousChapter.html @@ -0,0 +1,10 @@ +{{ if .NextInSection }} +<div> + <a + href="{{ .NextInSection.Permalink | relURL }}" + title="{{ .NextInSection.Title }}" + > + < Previous Chapter + </a> +</div> +{{ end }} |