{{ define "main" }} {{ if .Site.Params.list.showHero | default false }} {{ $heroStyle := print "partials/hero/" .Site.Params.list.heroStyle ".html" }} {{ if templates.Exists $heroStyle }} {{ partial $heroStyle . }} {{ else }} {{ partial "partials/hero/basic.html" . }} {{ end }} {{- end -}} {{ $toc := and (.Params.showTableOfContents | default (.Site.Params.list.showTableOfContents | default false)) (in .TableOfContents " {{ if .Params.showBreadcrumbs | default (.Site.Params.list.showBreadcrumbs | default false) }} {{ partial "breadcrumbs.html" . }} {{ end }}

{{ .Title }}

{{ partial "article-meta-list.html" (dict "context" . "scope" "single") }}
{{ if $toc }}
{{ partial "toc.html" . }}
{{ end }}
{{ .Content | emojify }}
{{ if gt .Pages 0 }} {{ if .Site.Params.list.cardView | default false }} {{ $cardViewScreenWidth := .Site.Params.list.cardViewScreenWidth}} {{ if not $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }} {{ if $cardViewScreenWidth }}
{{ else }}
{{ end }} {{ end }} {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} {{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}

{{ .Key }}

{{ else }} {{ end }} {{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }} {{ if $cardViewScreenWidth}}
{{ else }}
{{ end }} {{ end }} {{ range .Pages }} {{ if $cardViewScreenWidth }}
{{ else }}
{{ end }} {{ partial "article-link-card.html" . }}
{{ end }} {{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}
{{ end }} {{ end }} {{ if not $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}
{{ end }} {{ else }}
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} {{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}

{{ .Key }}

{{ end }} {{ range .Pages }} {{ partial "article-link.html" . }} {{ end }} {{ end }}
{{ partial "pagination.html" . }} {{ end }} {{ else }}

{{ i18n "list.no_articles" | emojify }}

{{ end }} {{ end }}