feat(ui): improve display of tags in commit list (#9257)

Followup to https://codeberg.org/forgejo/forgejo/pulls/8759, https://codeberg.org/forgejo/forgejo/pulls/9251. Addresses first part of https://codeberg.org/forgejo/forgejo/issues/9231.

* further polish up the looks of the labels
* restore IsRelease logic to only give accent border to tags with releases
    * for the preview I purposefully created a release for existing tag 5.13.1
* change height from 25px to 21.6px (https://codeberg.org/forgejo/forgejo/pulls/9257#issuecomment-7119712)

Preview:
- before: https://codeberg.org/attachments/6974996a-9c54-4f05-8742-31fb5f373448
- after: https://codeberg.org/attachments/18c99315-e968-4a09-a2d6-0403f23a1d4f

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9257
Reviewed-by: Beowulf <beowulf@beocode.eu>
This commit is contained in:
0ko 2025-09-12 14:31:08 +02:00
commit 3780b93fad
2 changed files with 10 additions and 5 deletions

View file

@ -1,3 +1,3 @@
<a class="ui label basic tag-label tw-p-1" href="{{.RepoLink}}/src/tag/{{.TagName|PathEscape}}">
{{svg "octicon-tag"}} {{.TagName}}
<a class="ui label basic tag-label {{if .IsRelease}}IsRelease{{end}}" href="{{.RepoLink}}/src/tag/{{.TagName|PathEscape}}">
{{svg "octicon-tag" 14}} {{.TagName}}
</a>

View file

@ -126,10 +126,15 @@
min-height: 240px;
}
.ui.label.basic.tag-label {
border-color: var(--color-primary);
.ui.ui.ui.tag-label {
margin-left: 0.25rem;
padding: 0.2rem 0.4rem;
gap: 0.3rem;
}
a.ui.label.basic.tag-label:hover {
.ui.ui.ui.tag-label.IsRelease {
border-color: var(--color-primary);
}
.ui.ui.ui.tag-label.IsRelease:hover {
border-color: var(--color-primary-dark-1);
}