Eric Bower
·
03 Sep 24
blog-aside.partial.tmpl
1{{define "blog-aside"}}
2<main class="flex">
3 <section class="flex-1 mr">
4 <div>
5 <h1 class="text-2xl font-bold mt-2">{{.Header.Title}}</h1>
6 {{if .Header.Bio}}<span>{{.Header.Bio}}</span>{{end}}
7 </div>
8
9 <div id="readme">
10 {{if .Readme.HasText}}
11 <section class="md">
12 {{.Readme.Contents}}
13 </section>
14 {{end}}
15 <ul>
16 {{range .Header.Nav}}
17 <li><a href="{{.URL}}" class="text-lg">{{.Text}}</a></li>
18 {{end}}
19 <li><a href="{{.RSSURL}}" class="text-lg">rss</a></li>
20 </ul>
21 <hr />
22 </div>
23
24 {{if .HasFilter}}
25 <a href={{.URL}}>clear filters</a>
26 {{end}}
27
28 <div class="posts group mt-2">
29 {{range .Posts}}
30 <article>
31 <div class="flex items-center">
32 <time datetime="{{.PublishAtISO}}" class="text-sm post-date">{{.PublishAt}}</time>
33 <span class="text-md flex-1 m-0 transform-none"><a href="{{.URL}}">{{.Title}}</a></span>
34 </div>
35 </article>
36 {{end}}
37 </div>
38 </section>
39
40 <aside>
41 {{if .Readme.HasText}}
42 <section class="md">
43 {{.Readme.Contents}}
44 </section>
45 {{end}}
46 <nav>
47 <ul>
48 {{range .Header.Nav}}
49 <li><a href="{{.URL}}" class="text-md transform-none">{{.Text}}</a></li>
50 {{end}}
51 <li><a href="{{.RSSURL}}" class="text-md transform-none">rss</a></li>
52 </ul>
53 </nav>
54 </aside>
55</main>
56{{end}}