Eric Bower
·
03 Sep 24
blog-default.partial.tmpl
1{{define "blog-default"}}
2<header class="text-center">
3 <h1 class="text-2xl font-bold mt-2">{{.Header.Title}}</h1>
4 {{if .Header.Bio}}<span>{{.Header.Bio}}</span>{{end}}
5 <nav>
6 {{range .Header.Nav}}
7 <a href="{{.URL}}" class="text-lg transform-none">{{.Text}}</a> |
8 {{end}}
9 <a href="{{.RSSURL}}" class="text-lg transform-none">rss</a>
10 </nav>
11 <hr />
12</header>
13<main>
14 {{if .Readme.HasText}}
15 <section>
16 <article class="md">
17 {{.Readme.Contents}}
18 </article>
19 <hr />
20 </section>
21 {{end}}
22
23 <section class="posts group mt-2">
24 {{if .HasFilter}}
25 <a href={{.URL}}>clear filters</a>
26 {{end}}
27 {{range .Posts}}
28 <article>
29 <div class="flex items-center">
30 <time datetime="{{.PublishAtISO}}" class="text-sm post-date">{{.PublishAt}}</time>
31 <span class="text-md flex-1 m-0 transform-none"><a href="{{.URL}}">{{.Title}}</a></span>
32 </div>
33 </article>
34 {{end}}
35 </section>
36</main>
37{{end}}