forked from tangled.org/core
this repo has no description

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

We should make this optional...

Changed files
+12 -8
appview
pages
templates
layouts
+4 -4
appview/pages/pages.go
···
func (r RepoInfo) GetTabs() [][]string {
tabs := [][]string{
-
{"overview", "/"},
-
{"issues", "/issues"},
-
{"pulls", "/pulls"},
+
{"overview", "/", "square-chart-gantt"},
+
{"issues", "/issues", "circle-dot"},
+
{"pulls", "/pulls", "git-pull-request"},
}
if r.Roles.SettingsAllowed() {
-
tabs = append(tabs, []string{"settings", "/settings"})
+
tabs = append(tabs, []string{"settings", "/settings", "cog"})
}
return tabs
+8 -4
appview/pages/templates/layouts/repobase.html
···
{{ range $item := $tabs }}
{{ $key := index $item 0 }}
{{ $value := index $item 1 }}
+
{{ $icon := index $item 2 }}
{{ $meta := index $tabmeta $key }}
<a
href="/{{ $.RepoInfo.FullName }}{{ $value }}"
···
{{ end }}
"
>
-
{{ $key }}
-
{{ if not (isNil $meta) }}
-
<span class="bg-gray-200 dark:bg-gray-700 rounded py-1/2 px-1 text-sm">{{ $meta }}</span>
-
{{ end }}
+
<span class="flex items-center justify-center">
+
{{ i $icon "w-4 h-4 mr-2" }}
+
{{ $key }}
+
{{ if not (isNil $meta) }}
+
<span class="bg-gray-200 dark:bg-gray-700 rounded py-1/2 px-1 text-sm ml-1">{{ $meta }}</span>
+
{{ end }}
+
</span>
</div>
</a>
{{ end }}