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

<div class="pagewrap">
<div align="center" style="margin:4px;"> 
  {{ if .Params.bannertemplate }}
    {{ partial .Params.bannertemplate . }}
  {{else}}
    {{ partial "hellug-banner.html" . }}
  {{end}}
</div>

<div id="column1">

  {{.Content}}

<!-- Articles Section -->
<div class="well well-lg">
{{ $articlelimit := 5 }}
{{ $articlenum := len .Pages }}
{{ $counter := 0 }}
{{ $recentpostlimit := (sub now.Unix 31536000 ) }}
{{ range first $articlelimit .Pages }}
{{ $counter = add $counter 1 }}
{{ if eq $counter 1 }}
<!-- First Post -->
<div class="panel panel-primary">
    <div class="panel-heading">
        <h3 class="panel-title"><a href="{{.Permalink}}">{{ .Title }}</a>
        <span class="article-date">{{ dateFormat "02/01/2006" .Date }}</span>
    {{ if lt $recentpostlimit .Date.Unix }}
        <span class="label label-default">Nέο</span></h3>
    {{ end }}
    </div>
    <div class="panel-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="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title"><a href="{{.Permalink}}">{{ .Title }}</a>
            <span class="article-date">{{ dateFormat "02/01/2006" .Date }}</span>
    {{ if lt $recentpostlimit .Date.Unix }}
        <span class="label label-default">Nέο</span></h3>
    {{ end }}
    </div>
    <div class="panel-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="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">Παλαιότερα άρθρα</a>
    </div>
    <div class="panel-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></div>
</div>

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