57 lines
2.2 kB
1
{{ define "title" }}{{ .RepoInfo.FullName }}{{ end }}
2
3
{{ define "content" }}
4
<section id="repo-header" class="mb-4 py-2 px-6">
5
<p class="text-lg">
6
<a href="/{{ .RepoInfo.OwnerWithAt }}">{{ .RepoInfo.OwnerWithAt }}</a>
7
<span class="select-none">/</span>
8
<a href="/{{ .RepoInfo.FullName }}" class="font-bold">{{ .RepoInfo.Name }}</a>
9
</p>
10
<span>
11
{{ if .RepoInfo.Description }}
12
{{ .RepoInfo.Description }}
13
{{ else }}
14
<span class="italic">this repo has no description</span>
15
{{ end }}
16
</span>
17
</section>
18
<section id="repo-links" class="min-h-screen flex flex-col drop-shadow-sm">
19
<nav class="w-full mx-auto ml-4">
20
<div class="flex z-60">
21
{{ $activeTabStyles := "-mb-px bg-white" }}
22
{{ $tabs := .RepoInfo.GetTabs }}
23
{{ range $item := $tabs }}
24
{{ $key := index $item 0 }}
25
{{ $value := index $item 1 }}
26
<a
27
href="/{{ $.RepoInfo.FullName }}{{ $value }}"
28
class="relative -mr-px group no-underline hover:no-underline"
29
hx-boost="true"
30
>
31
<div
32
class="px-4 py-1 mr-1 text-black min-w-[80px] text-center relative rounded-t
33
{{ if eq $.Active $key }}
34
{{ $activeTabStyles }}
35
{{ else }}
36
group-hover:bg-gray-200
37
{{ end }}
38
"
39
>
40
{{ $key }}
41
</div>
42
</a>
43
{{ end }}
44
</div>
45
</nav>
46
<section
47
class="bg-white p-6 rounded relative z-20 w-full mx-auto drop-shadow-sm"
48
>
49
{{ block "repoContent" . }}{{ end }}
50
</section>
51
{{ block "repoAfter" . }}{{ end }}
52
</section>
53
{{ end }}
54
55
{{ define "layouts/repobase" }}
56
{{ template "layouts/base" . }}
57
{{ end }}
58