this repo has no description
1{{ define "title" }}{{ .RepoInfo.FullName }}{{ end }}
2
3{{ define "content" }}
4 <section id="repo-header" class="mb-4 p-2 dark:text-white">
5 <div class="text-lg flex flex-col sm:flex-row items-start gap-4 justify-between">
6 <!-- left items -->
7 <div class="flex flex-col gap-2">
8 <!-- repo owner / repo name -->
9 <div class="flex items-center gap-2 flex-wrap">
10 {{ template "user/fragments/picHandleLink" .RepoInfo.OwnerDid }}
11 <span class="select-none">/</span>
12 <a href="/{{ .RepoInfo.FullName }}" class="font-bold">{{ .RepoInfo.Name }}</a>
13 </div>
14
15 {{ if .RepoInfo.Source }}
16 {{ $sourceOwner := resolve .RepoInfo.Source.Did }}
17 <div class="flex items-center gap-1 text-sm flex-wrap">
18 {{ i "git-fork" "w-3 h-3 shrink-0" }}
19 <span>forked from</span>
20 <a class="underline" href="/{{ $sourceOwner }}/{{ .RepoInfo.Source.Name }}">
21 {{ $sourceOwner }}/{{ .RepoInfo.Source.Name }}
22 </a>
23 </div>
24 {{ end }}
25
26 <span class="flex flex-wrap items-center gap-x-4 gap-y-2 text-sm text-gray-600 dark:text-gray-300">
27 {{ if .RepoInfo.Description }}
28 {{ .RepoInfo.Description | description }}
29 {{ else }}
30 <span class="italic">this repo has no description</span>
31 {{ end }}
32
33 {{ with .RepoInfo.Website }}
34 <span class="flex items-center gap-1">
35 <span class="flex-shrink-0">{{ i "globe" "size-4" }}</span>
36 <a href="{{ . }}">{{ . | trimUriScheme }}</a>
37 </span>
38 {{ end }}
39
40 {{ if .RepoInfo.Topics }}
41 <div class="flex items-center gap-1 text-sm text-gray-600 dark:text-gray-300">
42 {{ range .RepoInfo.Topics }}
43 <span class="bg-gray-200 dark:bg-gray-700 rounded py-1/2 px-1 text-sm">{{ . }}</span>
44 {{ end }}
45 </div>
46 {{ end }}
47
48 </span>
49 </div>
50
51 <div class="w-full sm:w-fit grid grid-cols-3 gap-2 z-auto">
52 {{ template "repo/fragments/repoStar" .RepoInfo }}
53 <a
54 class="btn text-sm no-underline hover:no-underline flex items-center gap-2 group"
55 hx-boost="true"
56 href="/{{ .RepoInfo.FullName }}/fork"
57 >
58 {{ i "git-fork" "w-4 h-4" }}
59 fork
60 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }}
61 </a>
62 <a
63 class="btn text-sm no-underline hover:no-underline flex items-center gap-2 group"
64 href="/{{ .RepoInfo.FullName }}/feed.atom">
65 {{ i "rss" "size-4" }}
66 <span class="md:hidden">atom</span>
67 </a>
68 </div>
69 </div>
70 </section>
71
72 <section class="w-full flex flex-col" >
73 <nav class="w-full pl-4 overflow-auto">
74 <div class="flex z-60">
75 {{ $activeTabStyles := "-mb-px bg-white dark:bg-gray-800" }}
76 {{ $tabs := .RepoInfo.GetTabs }}
77 {{ $tabmeta := .RepoInfo.TabMetadata }}
78 {{ range $item := $tabs }}
79 {{ $key := index $item 0 }}
80 {{ $value := index $item 1 }}
81 {{ $icon := index $item 2 }}
82 {{ $meta := index $tabmeta $key }}
83 <a
84 href="/{{ $.RepoInfo.FullName }}{{ $value }}"
85 class="relative -mr-px group no-underline hover:no-underline"
86 hx-boost="true"
87 >
88 <div
89 class="px-4 py-1 mr-1 text-black dark:text-white min-w-[80px] text-center relative rounded-t whitespace-nowrap
90 {{ if eq $.Active $key }}
91 {{ $activeTabStyles }}
92 {{ else }}
93 group-hover:bg-gray-100/25 group-hover:dark:bg-gray-700/25
94 {{ end }}
95 "
96 >
97 <span class="flex items-center justify-center">
98 {{ i $icon "w-4 h-4 mr-2" }}
99 {{ $key }}
100 {{ if $meta }}
101 <span class="bg-gray-200 dark:bg-gray-700 rounded py-1/2 px-1 text-sm ml-1">{{ $meta }}</span>
102 {{ end }}
103 </span>
104 </div>
105 </a>
106 {{ end }}
107 </div>
108 </nav>
109 {{ block "repoContentLayout" . }}
110 <section class="bg-white dark:bg-gray-800 px-6 py-4 rounded relative w-full mx-auto dark:text-white">
111 {{ block "repoContent" . }}{{ end }}
112 </section>
113 {{ block "repoAfter" . }}{{ end }}
114 {{ end }}
115 </section>
116{{ end }}