{{define "body"}}
<div class="page-header">
    <div class="row">
        <h2>{{.BodyTitle}}</h2>
    </div>
</div>
{{if .Admin}}
<div class="row mb-3">
    <div class="col-xs-5">
        <a class="btn btn-sm btn-primary" href="/section/new"><b>New Section</b></a>
    </div>
</div>
{{end}}
{{if .Data}}
<div class="row">
{{range $index, $item := .Data}}
    <div class="col-xs-4 section">
        <div class="card border-primary mx-auto">
        <div class="card-header">
            <strong><a href="/{{$item.Section}}">{{$item.Section}}</a></strong>
        </div>
        <div class="card-body">
            {{if $item.Pages}}
            {{range $page := $item.Pages}}
            <strong><a href="/{{$page.StoreTitle}}">{{$page.Title}}</a></strong><br>
            {{end}}
            {{else}}
            <strong>Empty section</strong>
            {{end}}
        </div>
        </div>
    </div>
    <div class="offset-1"></div>
{{end}}
</div>
{{end}}
{{end}}
