blob: 5e9878ac8e619f66802d185bf2dd32efa608f632 (
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 "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>
}
}
|