alfa
This commit is contained in:
28
themes/main-theme/layouts/blog/list.html
Normal file
28
themes/main-theme/layouts/blog/list.html
Normal file
@ -0,0 +1,28 @@
|
||||
{{ define "main" }}
|
||||
<div class="container mx-auto">
|
||||
|
||||
<div class="inline-flex mb-8">
|
||||
<a href="/blog/" class="inline-flex items-center justify-center w-24 flex-1 pl-4 pr-5 py-3 bg-forest">
|
||||
<span class="flex-1 h-full text-xl font-medium leading-7 text-center text-white">All</span>
|
||||
</a>
|
||||
{{ range .Site.Taxonomies.categories }}
|
||||
<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 }}
|
||||
</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 }}
|
||||
21
themes/main-theme/layouts/blog/single.html
Normal file
21
themes/main-theme/layouts/blog/single.html
Normal file
@ -0,0 +1,21 @@
|
||||
{{ define "main" }}
|
||||
<div class="max-w-2xl mx-auto">
|
||||
<h1 class="text-2xl font-medium leading-loose text-forest">{{ .Title }}</h1>
|
||||
{{ with .Params.categories }}
|
||||
<ul id="tags">
|
||||
{{ range . }}
|
||||
<li> <a class="underline text-salmon mr-1" href=" {{ " categories/" | absURL }}{{ . | urlize }}">{{ . }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
<section class="prose mt-5">
|
||||
<article>
|
||||
{{ .Content }}
|
||||
</article>
|
||||
</section>
|
||||
<hr class="text-forest">
|
||||
<p class="text-forest">Published on {{ .Date | time.Format ":date_short" }}</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user