{{ define "main" }}
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
<main class="center mv4 content-width ph3">
  <ul class="list pa0">
    {{ range $paginator.Pages }}
    <li class="mb2">
      <a class="f4 heading-color heading-font fw6 no-underline" href="{{ .Permalink }}">{{ .Title }}</a>
      <p class="f5 mt1 silver">
        <time>{{ .Date.Format "02 Jan 2006" }}</time>
        {{ if or .Params.tags .Params.categories }} | {{ end }}
        {{ if isset .Params "categories" }}
        categories: [ {{ range .Params.categories }}<a href='{{ "/categories/" | relLangURL }}{{ . | urlize }}' class="link silver">{{ . }}</a> {{ end }} ]
        {{ end }}
        {{ if isset .Params "tags" }}
        tags: [ {{ range .Params.tags }}<a href='{{ "/tags/" | relLangURL }}{{ . | urlize }}' class="link silver">{{ . }}</a> {{ end }} ]
        {{ end }}
      </p>
    </li>
    {{ end }}
  </ul>
</main>
{{ partial "tag_cloud.html" . }}
{{ partial "pagination.html" . }}
{{ end }}