{{ define "main" }}
    <main class="post instagram">
        <article>
            <div class="post-content">
                <div class="instagram-media">
                    {{ range .Params.Media }}
                        {{ partial "imgorvid.html" . }}
                    {{ end }}
                </div>

                {{ .Content }}
            </div>
        </article>

        <hr />

        <div class="post-info">
            <p>
                <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather"><rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path><line x1="17.5" y1="6.5" x2="17.5" y2="6.5"></line></svg>
                From <a href="../">Instagram archive</a>
            </p>
            {{ partial "tags.html" .Params.tags }}
            {{ partial "categories.html" . }}

            {{- if .GitInfo }}
			    <p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-git-commit"><circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line></svg><a href="{{ .Site.Params.gitUrl -}}{{ .GitInfo.Hash }}" target="_blank" rel="noopener">{{ .GitInfo.AbbreviatedHash }}</a> @ {{ if .Site.Params.dateformNum }}{{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local }}{{ else }}{{ dateFormat "2006-01-02" .GitInfo.AuthorDate.Local }}{{ end }}</p>
			{{- end }}

            <p>
                <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-calendar">
                  <rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
                  <line x1="16" y1="2" x2="16" y2="6"></line>
                  <line x1="8" y1="2" x2="8" y2="6"></line>
                  <line x1="3" y1="10" x2="21" y2="10"></line>
                </svg>
                {{ if .Site.Params.dateformNumTime }}
                  {{ dateFormat .Site.Params.dateformNumTime .Date.Local }}
                {{ else }}
                  {{ dateFormat "2006-01-02 15:04" .Date.Local }}
                {{ end }}
        
                {{ if .Lastmod }} 
                  {{ if not (eq .Lastmod .Date )}}
                    {{ if .Site.Params.dateformNumTime }}
                      ({{ i18n "lastModified" }}: {{ dateFormat .Site.Params.dateformNumTime .Lastmod.Local }})
                    {{ else }} 
                      ({{ i18n "lastModified" }}: {{ dateFormat "2006-01-02 15:04" .Lastmod.Local }})
                    {{ end }}
                  {{ end }}
                {{ end }}
              </p>

            {{ partial "pagination-single.html" . }}
  		</div>
    </main>
{{ end }}
