Monorepo for Tangled tangled.org

appview/pages: add expandable legend to repo index template #552

merged opened by ansxor.ca targeting master from ansxor.ca/core: appview/pages/repo-index-legend

This improves the bar containing the languages at the top of the repo index by making it a <details> element which expands into a legend describing what colours represents each language in the bar.

Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:brka7yc4gssxdquiwpii22pr/sh.tangled.repo.pull/3lxscmehtgf22
+6 -2
Interdiff #0 β†’ #1
+6 -2
appview/pages/templates/repo/index.html
··· 47 47 <div class="px-4 py-2 bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600 flex items-center gap-4 flex-wrap"> 48 48 {{ range $value := .Languages }} 49 49 <div 50 - class="flex items-center gap-2 text-xs" 50 + class="flex flex-grow items-center gap-2 text-xs align-items-center justify-center" 51 51 > 52 - <div class="rounded-full h-2 w-2" style="background-color: {{ $value.Color }}"></div> 52 + <div 53 + class="rounded-full h-2 w-2" 54 + style="background: radial-gradient(circle at 35% 35%, color-mix(in srgb, {{ $value.Color }} 70%, white), {{ $value.Color }} 30%, color-mix(in srgb, {{ $value.Color }} 85%, black));" 55 + > 56 + </div> 53 57 <div>{{ or $value.Name "Other" }} 54 58 <span class="text-gray-500 dark:text-gray-400"> 55 59 {{ if lt $value.Percentage 0.05 }}

History

4 rounds 5 comments
sign up or login to add to the discussion
1 commit
expand
appview/pages: add expandable legend to repo index template
expand 1 comment

Excellent, thanks again!

pull request successfully merged
2 commits
expand
appview/pages: add expandable legend to repo index template
appview/pages: add spacing and different orb design for language legend
expand 1 comment

Looks good! If you could just squash the commit into one (with the first message), we're good to go!

2 commits
expand
appview/pages: add expandable legend to repo index template
appview/pages: add spacing and different orb design for language legend
expand 1 comment

ignore this one, used the wrong email to commit

1 commit
expand
appview/pages: add expandable legend to repo index template
expand 2 comments

Hey, thanks for this patchβ€”this looks really good! One tiny improvement that we could make would be to space out the languages evenly? Kinda like how Forgejo does it (for example: https://codeberg.org/forgejo/forgejo).

Otherwise, very very nice.

Also, for the language color circles, perhaps we can do the same "spheres" as seen here? Keeps it consistent. :)