this repo has no description
at ci 5.2 kB view raw
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 "fragments/starBtn" 53 (dict "SubjectAt" .RepoInfo.RepoAt 54 "IsStarred" .RepoInfo.IsStarred 55 "StarCount" .RepoInfo.Stats.StarCount) }} 56 <a 57 class="btn text-sm no-underline hover:no-underline flex items-center gap-2 group" 58 hx-boost="true" 59 href="/{{ .RepoInfo.FullName }}/fork" 60 > 61 {{ i "git-fork" "w-4 h-4" }} 62 fork 63 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} 64 </a> 65 <a 66 class="btn text-sm no-underline hover:no-underline flex items-center gap-2 group" 67 href="/{{ .RepoInfo.FullName }}/feed.atom"> 68 {{ i "rss" "size-4" }} 69 <span class="md:hidden">atom</span> 70 </a> 71 </div> 72 </div> 73 </section> 74 75 <section class="w-full flex flex-col" > 76 <nav class="w-full pl-4 overflow-auto"> 77 <div class="flex z-60"> 78 {{ $activeTabStyles := "-mb-px bg-white dark:bg-gray-800" }} 79 {{ $tabs := .RepoInfo.GetTabs }} 80 {{ $tabmeta := .RepoInfo.TabMetadata }} 81 {{ range $item := $tabs }} 82 {{ $key := index $item 0 }} 83 {{ $value := index $item 1 }} 84 {{ $icon := index $item 2 }} 85 {{ $meta := index $tabmeta $key }} 86 <a 87 href="/{{ $.RepoInfo.FullName }}{{ $value }}" 88 class="relative -mr-px group no-underline hover:no-underline" 89 hx-boost="true" 90 > 91 <div 92 class="px-4 py-1 mr-1 text-black dark:text-white min-w-[80px] text-center relative rounded-t whitespace-nowrap 93 {{ if eq $.Active $key }} 94 {{ $activeTabStyles }} 95 {{ else }} 96 group-hover:bg-gray-100/25 group-hover:dark:bg-gray-700/25 97 {{ end }} 98 " 99 > 100 <span class="flex items-center justify-center"> 101 {{ i $icon "w-4 h-4 mr-2" }} 102 {{ $key }} 103 {{ if $meta }} 104 <span class="bg-gray-200 dark:bg-gray-700 rounded py-1/2 px-1 text-sm ml-1">{{ $meta }}</span> 105 {{ end }} 106 </span> 107 </div> 108 </a> 109 {{ end }} 110 </div> 111 </nav> 112 {{ block "repoContentLayout" . }} 113 <section class="bg-white dark:bg-gray-800 px-6 py-4 rounded relative w-full mx-auto dark:text-white"> 114 {{ block "repoContent" . }}{{ end }} 115 </section> 116 {{ block "repoAfter" . }}{{ end }} 117 {{ end }} 118 </section> 119{{ end }}