creates article list partial
This commit is contained in:
@ -1,14 +1,24 @@
|
||||
{{ define "main" }}
|
||||
<h1 class="text-2xl font-bold">Topic: {{ .Title }}</h1>
|
||||
<ul class="mt-4 space-y-4">
|
||||
{{ range .Data.Pages }}
|
||||
<li class="border-l border-gray-300 pl-4">
|
||||
<p class="text-xs text-gray-800"><time datetime="{{ .Date.Format " 2006-01-02" }}">{{ .Date.Format "January 2, 2006"
|
||||
}}</time></p>
|
||||
<a class="font-bold hover:text-green-900 underline" href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
<p class="text-sm">{{ .Params.summary }}</p>
|
||||
{{ partial "tags.html" .}}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
<header class="my-8">
|
||||
<p class="text-center font-iosevka">Topic</p>
|
||||
<h1 class="text-4xl font-bold text-center capitalize">{{ .Title }}</h1>
|
||||
</header>
|
||||
<main class="container mx-auto">
|
||||
<ul class="mt-4 space-y-4">
|
||||
{{ partial "article-list.html" (dict "Pages" .Data.Pages) }}
|
||||
</ul>
|
||||
|
||||
<section>
|
||||
<h2 class="text-4xl my-8 font-iosevka text-center">Other Topics</h2>
|
||||
<div class="tag-cloud font-iosevka text-gray-600">
|
||||
{{ $tags := .Site.Taxonomies.tags }}
|
||||
{{ range $tag, $pages := $tags }}
|
||||
<a href="{{ "/tags/" | relLangURL }}{{ $tag | urlize }}" style="font-size: {{ add 1 (div (len $pages) 2) }}em;"
|
||||
class="tag text-sm inline-block p-2 my-1 border border-gray-100 rounded-lg hover:bg-yellow-100 whitespace-nowrap">
|
||||
{{ $tag }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
{{ end }}
|
Reference in New Issue
Block a user