You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

69 lines
2.0 KiB

{{ 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 }}" target="_blank">
<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 }}" target="_blank">
{{ .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>&nbsp;</span>
{{end}}
{{end}}
</div>
{{ end }}
{{ end }}