{{ define "main" }}

{{ $truncate := default true .Site.Params.truncate }}

{{ if .Content }}

<header>
  <h1 class="blog-post-title">
    <a class="text-dark text-decoration-none" href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
  </h1>
  <hr>
</header>
<section class="blog-post">
  {{ .Content }}
</section>
{{ end }}

{{ $paginator := .Paginate (where .Pages "Section" "in" .Site.Params.mainSections) }}
{{ range $paginator.Pages }}

<!-- {{ .Render "content" }} -->


<div class="container my-5 flex-grow-1">
  <div class="row justify-content-evenly">
    <div class="col-12 col-lg-3">
      {{ partial "focus.html" . }}
    </div>

    <div class="col-12 col-lg-6">
      {{ partial "news-main.html" . }}
    </div>

    <div class="col-12 col-lg-3 mt-5 pt-5 mt-lg-0 pt-lg-0">
      {{ partial "news-featured.html" . }}
    </div>

  </div>

  {{ partial "news-tab.html" . }}

 <div class="row mt-5 pt-5">
  <div class="col-12 col-lg-9">
    {{ partial "news-all.html" . }}
    {{ partial "paginator" . }}
  </div>
  <div class="col-12 col-lg-3">
    {{ partial "news-featured.html" . }}
  </div>
 </div>
</div>

<div class="top-btn">
<button>
  <svg xmlns="http://www.w3.org/2000/svg" width="35" height="35" fill="currentColor" class="bi bi-arrow-up-short" viewBox="0 0 16 16">
    <path fill-rule="evenodd" d="M8 12a.5.5 0 0 0 .5-.5V5.707l2.146 2.147a.5.5 0 0 0 .708-.708l-3-3a.5.5 0 0 0-.708 0l-3 3a.5.5 0 1 0 .708.708L7.5 5.707V11.5a.5.5 0 0 0 .5.5z"/>
  </svg>
</button>
</div>

<!-- {{ partial "paginator" . }} -->

{{ end }}
{{ end }}