forked from tangled.org/core
Monorepo for Tangled

appview: pages: add some kino icons to the repo tabs

We should make this optional...

authored by anirudh.fi and committed by Tangled d8a12dae 5a9057f4

Changed files
+12 -8
appview
pages
templates
layouts
+4 -4
appview/pages/pages.go
··· 292 292 293 293 func (r RepoInfo) GetTabs() [][]string { 294 294 tabs := [][]string{ 295 - {"overview", "/"}, 296 - {"issues", "/issues"}, 297 - {"pulls", "/pulls"}, 295 + {"overview", "/", "square-chart-gantt"}, 296 + {"issues", "/issues", "circle-dot"}, 297 + {"pulls", "/pulls", "git-pull-request"}, 298 298 } 299 299 300 300 if r.Roles.SettingsAllowed() { 301 - tabs = append(tabs, []string{"settings", "/settings"}) 301 + tabs = append(tabs, []string{"settings", "/settings", "cog"}) 302 302 } 303 303 304 304 return tabs
+8 -4
appview/pages/templates/layouts/repobase.html
··· 32 32 {{ range $item := $tabs }} 33 33 {{ $key := index $item 0 }} 34 34 {{ $value := index $item 1 }} 35 + {{ $icon := index $item 2 }} 35 36 {{ $meta := index $tabmeta $key }} 36 37 <a 37 38 href="/{{ $.RepoInfo.FullName }}{{ $value }}" ··· 47 48 {{ end }} 48 49 " 49 50 > 50 - {{ $key }} 51 - {{ if not (isNil $meta) }} 52 - <span class="bg-gray-200 dark:bg-gray-700 rounded py-1/2 px-1 text-sm">{{ $meta }}</span> 53 - {{ end }} 51 + <span class="flex items-center justify-center"> 52 + {{ i $icon "w-4 h-4 mr-2" }} 53 + {{ $key }} 54 + {{ if not (isNil $meta) }} 55 + <span class="bg-gray-200 dark:bg-gray-700 rounded py-1/2 px-1 text-sm ml-1">{{ $meta }}</span> 56 + {{ end }} 57 + </span> 54 58 </div> 55 59 </a> 56 60 {{ end }}