interpeer/themes/main-theme/layouts/_default/list.html

33 lines
1.3 KiB
HTML

{{ define "main" }}
<div class="container mx-auto">
<div class="inline-flex mb-8">
<a href="/blog/"
class="inline-flex items-center px-4 py-3 border border-forest text-forest hover:bg-forest hover:text-white">
<span class="flex-1 h-full text-xl font-medium leading-7 text-center">All</span>
</a>
{{$currentpage := .Page.Data.Term}}
{{ range .Site.Taxonomies.categories }}
{{ if eq $currentpage .Page.Title}}
<a href="{{ .Page.Permalink }}" class="inline-flex items-center px-4 py-3 border bg-forest border-forest">
<span class="h-full text-xl font-medium leading-7 text-center text-white">{{ .Page.Title }}</span>
</a>
{{ else }}
<a href="{{ .Page.Permalink }}"
class="inline-flex items-center px-4 py-3 border border-forest text-forest hover:bg-forest hover:text-white">
<span class="h-full text-xl font-medium leading-7 text-center">{{ .Page.Title }}</span>
</a>
{{ end }}
{{ end }}
</div>
{{ $paginator := .Paginate (where .Pages "Type" "blog") }}
<div class="grid grid-cols-2 gap-16">
{{ range $paginator.Pages }}
{{ partial "cards/blog-item" . }}
{{ end }}
</div>
{{ template "partials/pagination.html" . }}
</div>
{{ end }}