70 lines
1.9 KiB
HTML
70 lines
1.9 KiB
HTML
{{ define "main" }}
|
|
{{ if .Content }}
|
|
<div class="index-content {{ if .Params.framed -}}framed{{- end -}}">
|
|
{{ .Content }}
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{ $PageContext := . }}
|
|
{{ if .IsHome }}
|
|
|
|
<div class="flex-container">
|
|
{{ range where $PageContext.Site.RegularPages "Type" "tiles" }}
|
|
|
|
{{ $count := partial "func/count_posts.html" ( dict "context" . "term" .Params.CorrespondingTagName ) }}
|
|
|
|
<div class="flex-item-left">
|
|
<figure >
|
|
|
|
{{if .Params.Cover }}
|
|
<!-- Cover image found -- found in tiles -->
|
|
<a href="https://{{ .Params.urlLink }}">
|
|
<img src="{{ .Params.Cover }}"
|
|
alt="{{ .Title | plainify | default " " }}"
|
|
title="{{ .Params.CoverCredit |plainify|default "Cover Image" }}" /></a>
|
|
|
|
{{ else }}
|
|
|
|
<!-- No cover image found -->
|
|
<a href="https://{{ .Params.urlLink }}">
|
|
{{ .Title | plainify | default " " }} </a>
|
|
|
|
{{ end }}
|
|
|
|
{{ if gt $count 0 }}
|
|
<figcaption class="transparentbackgroud post-meta">
|
|
<a href="tags/{{ .Params.CorrespondingTagName }}">
|
|
#{{ .Params.CorrespondingTagName | plainify }} <small>({{ $count }})</small> </a>
|
|
</figcaption >
|
|
{{ end }}
|
|
|
|
</figure>
|
|
</div>
|
|
|
|
{{ end }}
|
|
</div>
|
|
|
|
|
|
<div>
|
|
{{ range $.Site.Taxonomies.tags.ByCount }}
|
|
{{ $tag_name := .Name }}
|
|
{{ $has_tile := "false" }}
|
|
{{ range where $.Site.RegularPages "Type" "tiles" }}
|
|
{{ if eq .Params.correspondingTagName $tag_name }}
|
|
{{ $has_tile = "true" }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ if eq $has_tile "false" }}
|
|
<span class=" post-meta">
|
|
<a href="/tags/{{ .Name }}"> #{{ .Name }} <small>({{ .Count }})</small></a>
|
|
</span>
|
|
<span> </span>
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
|
|
{{ end }}
|