{{ define "main" }} {{ if .Content }}
{{ .Content }}
{{ end }} {{ $PageContext := . }} {{ if .IsHome }}
{{ range where $PageContext.Site.RegularPages "Type" "tiles" }} {{ $count := partial "func/count_posts.html" ( dict "context" . "term" .Params.CorrespondingTagName ) }}
{{if .Params.Cover }} {{ .Title | plainify | default {{ else }} {{ .Title | plainify | default " " }} {{ end }} {{ if gt $count 0 }} {{ end }}
{{ end }}
{{ 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" }} #{{ .Name }} ({{ .Count }})   {{end}} {{end}}
{{ end }} {{ end }}