theme-blog-ewen/layouts/partials/sidebar.html
2023-12-15 17:26:57 +01:00

76 lines
2.3 KiB
HTML

<div class="col-lg-4">
<div class="widgets">
{{ $currentPage := . }}
{{ if eq $currentPage.Type "blog" }}
<!-- category
<div class="widget">
<h4 class="widget-title">Category</h4>
{{- if isset .Site.Taxonomies "categories" }}
{{- if not (eq (len .Site.Taxonomies.categories) 0) }}
<ul class="list-unstyled">
{{- range $name, $items := .Site.Taxonomies.categories }}
<li><a href="{{ `categories/` | relLangURL }}{{ $name | urlize | lower }}/">{{ $name | title | humanize }}</a>
</li>
{{- end }}
</ul>
{{- end }}
{{- end }}
</div>-->
<!-- Tags -->
<div class="widget">
<h4 class="widget-title">Tag</h4>
{{- if isset .Site.Taxonomies "tags" }}
{{- if not (eq (len .Site.Taxonomies.tags) 0) }}
<ul class="list-inline">
{{- range $name, $items := .Site.Taxonomies.tags }}
<li class="list-inline-item"><a class="d-block p-2 bg-primary text-white"
href="{{ `tags/` | relLangURL }}{{ $name | urlize | lower }}/">{{ $name | humanize }}</a></li>
{{- end }}
</ul>
{{- end }}
{{- end }}
</div>
{{ end }}
<!-- about -->
<div class="widget">
{{ with .Site.GetPage "/about" }}
<h4 class="widget-title">{{ .Title | markdownify }}</h4>
{{ if .Params.Image }}
<img src="{{ .Params.Image | absURL }}" alt=""
class="img-fluid author-thumb-sm d-block mx-auto rounded-circle mb-4">
{{ end }}
<p>{{ .Summary }}</p>
<a href="{{ .Permalink }}" class="btn btn-outline-primary">Know more</a>
{{ end }}
</div>
<!-- social -->
<div class="widget">
<h4 class="widget-title">Social</h4>
<ul class="list-inline social-links">
{{- range sort .Site.Params.social "weight" "asc" -}}
<li class="list-inline-item">
<a aria-label="{{ .title }}" target="_blank" rel="noopener" href="{{ .link | safeURL }}">
<i class="{{ .icon }}"></i>
</a>
</li>
{{- end -}}
<li class="list-inline-item">
<a aria-label="rss" target="_blank" rel="noopener" href="{{ "/index.xml" | absLangURL }}">
<i class="fa-solid fa-rss"></i>
</a>
</li>
</ul>
</div>
</div>
</div>