blob: c872a0d0fe7b7d19d1f024bebae42e398d1f4e81 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package templates
import "go.alanpearce.eu/website/internal/config"
templ tagLink(tag string, attrs templ.Attributes) {
<a { attrs... } href={ templ.SafeURL("/tags/" + tag) }>#{ tag }</a>
}
templ TagsPage(config *config.Config, title string, tags []string, path string) {
@Page(config, PageSettings{
Title: title,
Path: path,
}) {
<h3 class="filter">Tags</h3>
<ul class="tags">
for _, tag := range tags {
<li class="h-feed">
@tagLink(tag, templ.Attributes{})
</li>
}
</ul>
}
}
|