{{ partial "head.html" . }}
<!-- Header Start -->
{{ partial "header.html" . }}
<!-- Header End -->

<div class="container center mt-3 mb-3">
    {{ if .Params.bannertemplate }}
    {{ partial .Params.bannertemplate . }}
    {{else}}
    {{ partial "hellug-banner.html" . }}
    {{end}}
</div>

{{ partial "breadcrump.html"}}

<main>
    <div class="container">
        <div class="row">
            <div class="col-md-9">
                {{.Content}}

                <!-- Articles Section -->
                {{ $articlelimit := 10 }}
                {{ $articlenum := len .Pages }}
                {{ $counter := 0 }}
                {{ $recentpostlimit := (sub now.Unix 6153600 ) }}
                {{ range first $articlelimit .Pages }}
                {{ $counter = add $counter 1 }}
                {{ if eq $counter 1 }}
                <!-- First Post -->
                <div class="card card-border-primary mb-3">
                    <div class="card-header">
                        <h3 class="card-title"><a href="{{.Permalink}}">{{ .Title }}</a></h3>
                            <span class="article-date">{{ dateFormat "02/01/2006" .Date }}</span>
                            {{ if lt $recentpostlimit .Date.Unix }}
                            <span class="badge bg-secondary">Nέο</span>
                        {{ end }}
                    </div>
                    <div class="card-body">
                        {{ .Summary }}

                        <p><a href="{{.Permalink}}" class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-zoom-in"></span>Περισσότερα...</a>
                        </p>
                    </div>
                </div>
                <!-- First Post End -->
                {{else}}
                <div class="card card-border-default mb-2">
                    <div class="card-header">
                        <h4 class="card-title"><a href="{{.Permalink}}">{{ .Title }}</a></h4>
                            <span class="article-date">{{ dateFormat "02/01/2006" .Date }}</span>
                            {{ if lt $recentpostlimit .Date.Unix }}
                            <span class="badge bg-secondary">Nέο</span>
                        {{ end }}
                    </div>
                    <div class="card-body">
                        {{ .Summary }}
                        <p><a href="{{.Permalink}}" class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-zoom-in"></span>Περισσότερα...</a>
                        </p>
                    </div>
                </div>
                {{ end }}
                {{ end }}
                <!-- End Articles Section -->

                {{ if gt $articlenum $articlelimit }}
                <!-- Older Articles Summary -->
                <div class="card card-default">
                    <div class="card-header">
                        <h4 class="card-title">Παλαιότερα άρθρα</a></h4>
                    </div>
                    <div class="card-body">
                        <ul>
                            {{ range after 10 .Pages }}
                            <li><a href="{{.Permalink}}">{{ .Title }}</a>
                                <span class="article-date">{{ dateFormat "02/01/2006" .Date }}</span> </li>
                            {{ end }}
                        </ul>
                    </div>
                </div>

                <!-- End Older Articles -->
                {{ end }}
            </div>

            <!-- Column 2 start -->
            {{ partial "column2.html" . }}
            <!-- Column 2 end -->
        </div>
    </div>
</main>
<!-- Footer Start -->
{{ partial "footer.html" . }}
<!-- Footer End -->
