bobatheme/layouts/_default/single.html
BBaoVanC 7ffa6c068c
Improve figures
- Add option to disable border and caption
2021-10-27 09:49:21 -05:00

49 lines
1.0 KiB
HTML

{{ define "main" }}
<div class="post-title">
<h1>
{{ .Title | markdownify }}
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
</h1>
</div>
{{ partial "post-metadata.html" . }}
{{ if .Params.Toc }}
<div id="table-of-contents">
<details>
<summary>{{ i18n "table_of_contents" }}</summary>
{{ .TableOfContents }}
</details>
</div>
{{ end }}
{{ with .Resources.GetMatch "feature" }}
<div class="post-media">
{{ partial "figure.html" (dict "src" . "border" true) }}
</div>
{{ end }}
{{ .Content }}
{{ $related := .Site.RegularPages.Related . | first 5 }}
{{ with $related }}
<div class="see-also">
<h2>{{ i18n "see_also" }}</h2>
<ul>
{{ range . }}
<li>
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</li>
{{ end }}
</ul>
</div>
{{ end }}
{{ if .Params.comments }}
{{ partial "comments.html" . }}
{{ end }}
{{ end }}