1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package main
templ homePage(repos []Repo) {
@base(s.SiteTitle) {
<table class="table-auto w-full border-collapse border-spacing-4">
<tr>
<th class="px-1 py-0.5 text-left">repository</th>
<th></th>
<th class="px-1 py-0.5 text-left">last commit</th>
</tr>
for _, repo := range repos {
<tr class="group">
<td class="group-hover:bg-zinc-100 px-1 py-0.5 border-4 border-zinc-50">
<a href={ templ.URL("/" + repo.pathname) } class="hover:underline">
{ repo.name }
</a>
</td>
<td class="group-hover:bg-zinc-100 px-1 py-0.5 border-4 border-zinc-50 text-sm">
{ repo.description }
</td>
<td class="group-hover:bg-zinc-100 px-1 py-0.5 border-4 border-zinc-50">
@commitComponent(repo, repo.commit, false)
</td>
</tr>
}
</table>
}
}
|