summaryrefslogtreecommitdiff
path: root/themes/hugo-book/layouts/posts
diff options
context:
space:
mode:
Diffstat (limited to 'themes/hugo-book/layouts/posts')
-rw-r--r--themes/hugo-book/layouts/posts/list.html35
-rw-r--r--themes/hugo-book/layouts/posts/single.html8
2 files changed, 32 insertions, 11 deletions
diff --git a/themes/hugo-book/layouts/posts/list.html b/themes/hugo-book/layouts/posts/list.html
index aff32f5..0d7df53 100644
--- a/themes/hugo-book/layouts/posts/list.html
+++ b/themes/hugo-book/layouts/posts/list.html
@@ -1,22 +1,39 @@
{{ define "main" }}
{{ range sort .Paginator.Pages }}
- <article class="markdown book-post">
+ <article class="book-post markdown">
<h2>
- <a href="{{ .RelPermalink }}">{{ partial "docs/title.html" . }}</a>
+ <a href="{{ .RelPermalink }}">{{ partial "docs/title" . }}</a>
</h2>
- {{ partial "docs/post-meta" . }}
- <div class="book-post-content">
- {{- .Summary -}}
- {{ if .Truncated }}
- <a href="{{ .RelPermalink }}">...</a>
- {{ end }}
+ <div class="book-post-container flex gap">
+ <div>
+ {{ partial "docs/post-meta" . }}
+ <div class="book-post-content markdown-inner">
+ {{- .Summary | truncate 256 -}}
+ </div>
+ </div>
+ {{- $thumbnail := default "thumbnail.*" .Params.BookPostThumbnail -}}
+ {{- with or (.Resources.GetMatch $thumbnail) (resources.GetMatch $thumbnail) -}}
+ <div class="book-post-thumbnail">
+ <img src="{{ .RelPermalink }}" />
+ </div>
+ {{- end -}}
</div>
</article>
{{ end }}
+{{ end }}
- {{ template "_internal/pagination.html" . }}
+{{ define "toc-container" }}
+<aside class="book-toc">
+ <div class="book-toc-content">
+ {{ template "toc" . }}
+ </div>
+</aside>
{{ end }}
{{ define "toc" }}
{{ partial "docs/taxonomy" . }}
{{ end }}
+
+{{ define "footer" }}
+ {{ partial "docs/pagination.html" . }}
+{{ end }} \ No newline at end of file
diff --git a/themes/hugo-book/layouts/posts/single.html b/themes/hugo-book/layouts/posts/single.html
index cebdd11..232e14e 100644
--- a/themes/hugo-book/layouts/posts/single.html
+++ b/themes/hugo-book/layouts/posts/single.html
@@ -1,10 +1,10 @@
{{ define "main" }}
<article class="markdown book-post">
<h1>
- {{ partial "docs/title.html" . }}
+ {{ partial "docs/title" . }}
</h1>
{{ partial "docs/post-meta" . }}
- <div class="book-post-content">
+ <div class="book-post-content markdown-inner">
{{- .Content -}}
</div>
</article>
@@ -13,3 +13,7 @@
{{ define "toc" }}
{{ partial "docs/toc" . }}
{{ end }}
+
+{{ define "footer" }}
+ {{ partial "docs/post-prev-next" . }}
+{{ end }} \ No newline at end of file
Directive (EU) 2019/790, Article 4(3); all rights regarding Text and Data Mining (TDM) are reserved.