chore(ui): improve hashbox (#8721)

Followup to https://codeberg.org/forgejo/forgejo/pulls/7822

* Fix signaturebox's background breaking out of hashbox and thus breaking it's rounded corners
* Fix a bug where an extra right margin was applied to signbox's avatar on pull request overview by unrelated rule
* Untangle hashbox's CSS from .label - it was not a good partnership between them. Some extra properties, some that we had to override
* Move CSS out of "repo.css" to a separate file - it's clearly not only related to repos

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8721
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
0ko 2025-08-03 05:49:24 +02:00
commit 4392dee96d
10 changed files with 117 additions and 109 deletions

View file

@ -26,13 +26,13 @@
{{if .ParentHashes}}
{{ctx.Locale.Tr "repo.diff.parent"}}
{{range .ParentHashes}}
<a class="ui primary sha label" href="{{$.RepoLink}}/commit/{{.String}}">
<a class="primary sha label" href="{{$.RepoLink}}/commit/{{.String}}">
<span class="shortsha">{{ShortSha .String}}</span>
</a>
{{end}}
{{end}}
{{ctx.Locale.Tr "repo.diff.commit"}}
<a class="ui primary sha label" href="{{$.RepoLink}}/commit/{{.SHA}}">
<a class="primary sha label" href="{{$.RepoLink}}/commit/{{.SHA}}">
<span class="shortsha">{{ShortSha .SHA}}</span>
</a>
</td>

View file

@ -417,7 +417,7 @@
<label>{{ctx.Locale.Tr "repo.settings.admin_indexer_commit_sha"}}</label>
<span class="field">
{{if .CodeIndexerStatus}}
<a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.CodeIndexerStatus.CommitSha}}">
<a rel="nofollow" class="sha label" href="{{.RepoLink}}/commit/{{.CodeIndexerStatus.CommitSha}}">
<span class="shortsha">{{ShortSha .CodeIndexerStatus.CommitSha}}</span>
</a>
{{else}}
@ -444,7 +444,7 @@
{{end}}
<span class="field">
{{if and .StatsIndexerStatus .StatsIndexerStatus.CommitSha}}
<a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.StatsIndexerStatus.CommitSha}}">
<a rel="nofollow" class="sha label" href="{{.RepoLink}}/commit/{{.StatsIndexerStatus.CommitSha}}">
<span class="shortsha">{{ShortSha .StatsIndexerStatus.CommitSha}}</span>
</a>
{{else}}

View file

@ -26,7 +26,7 @@
{{else}}
<span class="text red">{{svg "octicon-alert"}}</span>
{{end}}
<a class="ui primary sha label toggle button show-panel" data-panel="#info-{{.ID}}">
<a class="primary sha label toggle button show-panel" data-panel="#info-{{.ID}}">
<span class="shortsha">{{.UUID}}</span>
</a>
</div>