blogotheme/layouts/_default/home.html

39 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}" dir="ltr">
{{ partial "head.html" . }}
<body class="list-body">
{{ partial "nav-bar.html" . }}
<main class="card-container side-gutter">
{{ if or (not (eq .Description "")) (not (eq .Title "")) -}}
{{- end }}
{{ with .Content -}}
<section class="list-header-content">
{{ . }}
</section>
{{- end }}
{{ $pages := .Pages }}
{{ if .IsHome }}
{{ $pages = .Site.RegularPages }}
{{ end }}
{{ $paginator := .Paginate (where $pages "Params.displayinlist" "!=" false) -}}
{{- range $paginator.Pages -}}
{{ .Render "li" }}
{{- end }}
{{ if or ($paginator.HasPrev) ($paginator.HasNext) -}}
<nav class="blog-card blog-card-feed">
{{ if $paginator.HasPrev }}<a href="{{ $paginator.Prev.URL }}" class="pagination-newer pagination-text">&lt; Newer Posts</a>{{ end }}
{{ if $paginator.HasNext }}<a href="{{ $paginator.Next.URL }}" class="pagination-older pagination-text">Older Posts &gt;</a>{{ end }}
</nav>
{{- end }}
</main>
{{ partial "scripts.html" . }}
</body>
</html>