{{ define "main" }}

{{ .Scratch.Set "skipSeeAlso" true }}

{{ partial "primary_top.html" . }}

<p>{{ .Description }}</p>

<div class="release-grid">
    {{ $pages := (where .Site.Pages "Section" .Section) }}
    {{ $pages = sort $pages ".Params.publishdate" "desc" }}

    {{ $parent := .Page }}
    {{ $parentDir := (path.Dir .Page.File.Dir) }}

    <table>
        <tbody>
            {{ $decoration := .Params.decoration }}
            {{ range $pages }}
                {{ $pageLocation := (path.Dir (path.Dir .File.Dir)) }}
                {{ if eq $parentDir $pageLocation }}
                    <tr>
                        <td><a href="{{ .Permalink }}">Istio {{ .LinkTitle }}
                                {{- if $decoration -}}<i class="{{ $decoration }}" data-prefix="{{ .RelPermalink }}"></i>{{- end -}}
                            </a></td>
                        <td>{{ .PublishDate.Format (i18n "page_publish_date_format") -}}</td>
                    </tr>
                {{ end }}
            {{ end }}
        </tbody>
    </table>
</div>

{{ partial "primary_bottom.html" . }}

{{ end }}
