https://blog.naskya.net/

[[ 🗃 ^wzWnj blog ]] :: [📥 Inbox] [📤 Outbox] [💥 Errbox] [🐤 Followers] [🤝 Collaborators] [🏗 Projects] [🛠 Commits]

Clone

HTTPS: git clone https://code.naskya.net/repos/wzWnj

SSH: git clone USERNAME@code.naskya.net:wzWnj

Branches

Tags

main :: themes / hugo-tania-custom / layouts / _default /

list.html

{{ define "main" }}

{{ $pages := .Pages }}
{{ $pages = (.Paginate $pages).Pages }}

<header>
  <div class="container">
    <h1>{{ .Title }}</h1>
    <p class="subtitle">
      <span class="count">{{ len .Pages }}</span> posts found.
    </p>
  </div>
</header>

<section>
  <div class="container">
    <section>
      <section>
        <div class="posts">
          {{ range $pages }}
          <div class="post">
            <a href="{{ .RelPermalink }}">
              <div class="post-row">
                <time>{{ .Date.Format "Jan 02" }}</time>
                <h3>{{ .Title }}</h3>
              </div>
              <!--<div class="new-post">New!</div>-->
            </a>
          </div>
          {{ end }}
        </div>
      </section>
    </section>
  </div>
</section>

{{- $scope := .Site }}
{{- $paginator := .Paginate (where $scope.RegularPages ".Params.type" "!=" "page") }}

{{- if gt $paginator.TotalPages 1}}
<section>
  <div class="container">
    <nav class="pagination">
      {{- if $paginator.HasPrev}}
      <div class="prev-page">
        <a href="{{ $paginator.Prev.URL }}">Previous Page</a>
      </div>
      {{ end }}
      {{- if $paginator.HasNext}}
      <div class="next-page">
        <a href="{{ $paginator.Next.URL }}">Next Page</a>
      </div>
      {{ end }}
    </nav>
  </div>
</section>
{{ end }}

{{ end }}

[See repo JSON]