diff options
Diffstat (limited to 'themes/hugo-book/layouts/posts/list.html')
| -rw-r--r-- | themes/hugo-book/layouts/posts/list.html | 35 |
1 files changed, 26 insertions, 9 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 |
