repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

pico / prose / html
Eric Bower · 26 Jun 24

blog-default.partial.tmpl

 1{{define "blog-default"}}
 2<header class="text-center">
 3    <h1 class="text-2xl font-bold">{{.Header.Title}}</h1>
 4    {{if .Header.Bio}}<p class="text-lg">{{.Header.Bio}}</p>{{end}}
 5    <nav>
 6        {{range .Header.Nav}}
 7        <a href="{{.URL}}" class="text-lg">{{.Text}}</a> |
 8        {{end}}
 9        <a href="{{.RSSURL}}" class="text-lg">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">
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"><a href="{{.URL}}">{{.Title}}</a></span>
32            </div>
33        </article>
34        {{end}}
35    </section>
36</main>
37{{end}}