46 lines
1.5 kB
1
{{define "repoContent"}}
2
<main>
3
<div class="tree">
4
{{ $containerstyle := "py-1" }}
5
{{ $linkstyle := "no-underline hover:underline" }}
6
7
<div class="pb-2 text-base">
8
{{ range .BreadCrumbs }}
9
<a href="{{ index . 1}}" class="text-bold text-gray-500 {{ $linkstyle }}">{{ index . 0 }}</a> /
10
{{ end }}
11
</div>
12
13
{{ range .Files }}
14
{{ if not .IsFile }}
15
<div class="{{ $containerstyle }}">
16
<div class="flex justify-between items-center">
17
<a href="/{{ $.BaseTreeLink }}/{{ .Name }}" class="{{ $linkstyle }}">
18
<div class="flex items-center gap-2">
19
<i class="w-3 h-3 fill-current" data-lucide="folder"></i>{{ .Name }}
20
</div>
21
</a>
22
</div>
23
<time class="text-xs text-gray-500">{{ timeFmt .LastCommit.Author.When }}</time>
24
</div>
25
{{ end }}
26
{{ end }}
27
28
{{ range .Files }}
29
{{ if .IsFile }}
30
<div class="{{ $containerstyle }}">
31
32
<div class="flex justify-between items-center">
33
<a href="/{{ $.BaseBlobLink }}/{{ .Name }}" class="{{ $linkstyle }}">
34
<div class="flex items-center gap-2">
35
<i class="w-3 h-3" data-lucide="file"></i>{{ .Name }}
36
</div>
37
</a>
38
39
<time class="text-xs text-gray-500">{{ timeFmt .LastCommit.Author.When }}</time>
40
</div>
41
</div>
42
{{ end }}
43
{{ end }}
44
</div>
45
</main>
46
{{end}}
47