···
{{ define "repoContent" }}
32
-
{{ block "branchSelector" . }}{{ end }}
32
+
<div class="flex items-center justify-between pb-5">
33
+
{{ block "branchSelector" . }}{{ end }}
34
+
<div class="flex md:hidden items-center gap-4">
35
+
<a href="/{{ .RepoInfo.FullName }}/commits/{{ .Ref | urlquery }}" class="inline-flex items-center text-sm gap-1">
36
+
{{ i "git-commit-horizontal" "w-4" "h-4" }} {{ .TotalCommits }}
38
+
<a href="/{{ .RepoInfo.FullName }}/branches" class="inline-flex items-center text-sm gap-1">
39
+
{{ i "git-branch" "w-4" "h-4" }} {{ len .Branches }}
41
+
<a href="/{{ .RepoInfo.FullName }}/tags" class="inline-flex items-center text-sm gap-1">
42
+
{{ i "tags" "w-4" "h-4" }} {{ len .Tags }}
<div class="grid grid-cols-1 md:grid-cols-2 gap-2">
{{ block "fileTree" . }}{{ end }}
{{ block "rightInfo" . }}{{ end }}
···
{{ define "branchSelector" }}
41
-
<div class="flex justify-between pb-5">
43
-
onchange="window.location.href = '/{{ .RepoInfo.FullName }}/tree/' + encodeURIComponent(this.value)"
44
-
class="p-1 border max-w-32 border-gray-200 bg-white dark:bg-gray-800 dark:text-white dark:border-gray-700"
46
-
<optgroup label="branches ({{len .Branches}})" class="bold text-sm">
47
-
{{ range .Branches }}
49
-
value="{{ .Reference.Name }}"
51
-
{{ if eq .Reference.Name $.Ref }}
55
-
{{ .Reference.Name }}
59
-
<optgroup label="tags ({{len .Tags}})" class="bold text-sm">
62
-
value="{{ .Reference.Name }}"
64
-
{{ if eq .Reference.Name $.Ref }}
68
-
{{ .Reference.Name }}
71
-
<option class="py-1" disabled>no tags found</option>
55
+
onchange="window.location.href = '/{{ .RepoInfo.FullName }}/tree/' + encodeURIComponent(this.value)"
56
+
class="p-1 border max-w-32 border-gray-200 bg-white dark:bg-gray-800 dark:text-white dark:border-gray-700"
58
+
<optgroup label="branches ({{len .Branches}})" class="bold text-sm">
59
+
{{ range .Branches }}
61
+
value="{{ .Reference.Name }}"
63
+
{{ if eq .Reference.Name $.Ref }}
67
+
{{ .Reference.Name }}
71
+
<optgroup label="tags ({{len .Tags}})" class="bold text-sm">
74
+
value="{{ .Reference.Name }}"
76
+
{{ if eq .Reference.Name $.Ref }}
80
+
{{ .Reference.Name }}
83
+
<option class="py-1" disabled>no tags found</option>
···
132
-
<div id="right-info" class="col-span-1">
143
+
<div id="right-info" class="hidden md:block col-span-1">
{{ block "commitLog" . }} {{ end }}
{{ block "branchList" . }} {{ end }}
{{ block "tagList" . }} {{ end }}
···
<div class="flex gap-2 items-center">
{{ i "git-commit-horizontal" "w-4 h-4" }} commits
146
-
{{ if lt (len .CommitsTrunc) .TotalCommits }}
147
-
<span class="hidden group-hover:flex gap-2 items-center text-sm text-gray-500 dark:text-gray-400 ">
148
-
view {{ .TotalCommits }} commits {{ i "chevron-right" "w-4 h-4" }}
157
+
<span class="hidden group-hover:flex gap-2 items-center text-sm text-gray-500 dark:text-gray-400 ">
158
+
view {{ .TotalCommits }} commits {{ i "chevron-right" "w-4 h-4" }}
<div class="flex flex-col gap-6">
···
<!-- git-branch icon is seemingly bigger than others at 4x4 -->
{{ i "git-branch" "w-3 h-3" }} branches
246
-
{{ if lt (len .BranchesTrunc) (len .Branches) }}
<span class="hidden group-hover:flex gap-2 items-center text-sm text-gray-500 dark:text-gray-400 ">
view {{ len .Branches }} branches {{ i "chevron-right" "w-4 h-4" }}
<div class="flex flex-col gap-1">
{{ range .BranchesTrunc }}
···
<div class="flex gap-2 items-center">
{{ i "tags" "w-4 h-4" }} tags
282
-
{{ if lt (len .TagsTrunc) (len .Tags) }}
<span class="hidden group-hover:flex gap-2 items-center text-sm text-gray-500 dark:text-gray-400 ">
view {{ len .Tags }} tags {{ i "chevron-right" "w-4 h-4" }}
<div class="flex flex-col gap-1">