{{ define "main" }}
    {{ $paginator := .Paginate .Data.Pages }}

    <main class="posts">
        {{ if .Params.ShowTitle }}
        <h1>{{ .Title }}</h1>
        {{ end }}

        {{ if .Content }}
            <div class="content">{{ .Content }}</div>
        {{ end }}

        {{ range $paginator.Pages.GroupByDate "2006" }}
            <div class="posts-group">
                <div class="post-year">{{ .Key }}</div>

                <ul class="posts-list">
                    {{ range .Pages }}
                        <li class="post-item">
                            <a href="{{.Permalink}}">
                                <span class="post-title">{{.Title}}</span>
                                <span class="post-day">
                                    {{ if .Site.Params.dateformShort }}
                                        {{ .Date.Format .Site.Params.dateformShort }}
                                    {{ else }}
                                        {{ .Date.Format "02 Jan"}}
                                    {{ end }}
                                </span>
                            </a>

                            <span class="post-metadata">
                            <svg style='top:10px; margin-right: 5px' xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-clock">
                                <circle cx="12" cy="12" r="10"></circle>
                                <polyline points="12 6 12 12 16 14"></polyline>
                            </svg>
                                {{ i18n "readingTime" .Page.ReadingTime }} read</span>

                            <span class="post-metadata">
                                     <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text">
          <path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path>
          <polyline points="14 2 14 8 20 8"></polyline>
          <line x1="16" y1="13" x2="8" y2="13"></line>
          <line x1="16" y1="17" x2="8" y2="17"></line>
          <polyline points="10 9 9 9 8 9"></polyline>
        </svg>
        {{ i18n "wordCount" .Page.WordCount }}
                            </span>
                        </li>
                    {{ end }}
                </ul>
            </div>
        {{ end }}
    {{ partial "pagination-list.html" . }}
    </main>
{{ end }}
