mmote.ru/themes/mmotium/layouts/partials/sidebar.html
MultiMote 1f80adaf1f
All checks were successful
Build and deploy mmote.ru / Build-And-Deploy (push) Successful in 22s
Вывод картинки поста и описания в боковой панели
2024-06-02 15:20:23 +03:00

43 lines
1.1 KiB
HTML

<section class="sidebar">
{{ if .IsPage }}
<div class="item">
{{- $thumb := .Page.Resources.Get .Params.featured_image -}}
{{if $thumb}}
<img class="thumb" alt="thumb" src="{{ ($thumb.Fit "300x300").RelPermalink }}">
{{end}}
{{ with .Description }}
<div>{{ . }}</div>
{{ end }}
{{ if strings.Contains .TableOfContents "li" }}
<div class="toc">
{{ .TableOfContents }}
</div>
{{ end }}
</div>
{{ end }}
<div class="item">
<h4>Категории</h4>
<div class="categories">
<ul>
{{ range .Site.Taxonomies.categories }}
<li><a href="{{ .Page.RelPermalink }}">{{ .Page.Title }}</a> {{/* .Count */}}</li>
{{ end }}
</ul>
</div>
</div>
<div class="item">
<p>
<a href="https://old.mmote.ru">Старый сайт</a>
</p>
<p>
<a href="https://t.me/mmotium">Telegram</a>
</p>
<p>
<!--commit-->
</p>
</div>
</section>