mmote.ru/themes/mmotium/layouts/partials/sidebar.html

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>