{{ define "main" }}

<section id="home">
  <ul>
    {{ $pages := where site.RegularPages "Type" "posts" }}
    {{ $paginator := .Paginate $pages }}
    {{ range $index, $page := $paginator.Pages }}

    <li {{if eq $index 0}}class="first" {{end}}>
      <h1><a href="{{ $page.Permalink }}" title="{{ $page.Title }}">{{ .Title }}</a></h1>
      {{ partial "aside" . }}
      {{ partial "featured_image" .}}
      <p>{{ .Summary }}</p>
      {{ if .Truncated }}
      <a href="{{ .RelPermalink }}">{{ T "readMore" }}</a>
      {{ end }}
    </li>
    {{ end }}
  </ul>
</section>

{{ template "_internal/pagination.html" . }}

{{ end }}
