Skip to content

Commit b4a3831

Browse files
GiteaBotsilverwind
andauthored
Fix border-radius on view, blame and code search (#30545) (#30560)
Backport #30545 by @silverwind Fixes: #30540 1. Fix all these boxes by adding `bottom attached` and removing a problematic CSS rule: <img width="1319" alt="Screenshot 2024-04-17 at 22 25 31" src="https://github.com/go-gitea/gitea/assets/115237/346445a4-4944-4003-a1ef-6f5b0eda624e"> <img width="643" alt="Screenshot 2024-04-17 at 22 21 18" src="https://github.com/go-gitea/gitea/assets/115237/10f17ed3-9ad6-48de-92fa-bac6621815b9"> 2. Change the "last commit" box to `ui segment` which has correct border-radius. Also included is a tiny tweak to make author name ellipse instead of wrap. <img width="1331" alt="Screenshot 2024-04-17 at 22 23 23" src="https://github.com/go-gitea/gitea/assets/115237/285fbd45-ced0-4d33-abe3-7384ffa03188"> Co-authored-by: silverwind <me@silverwind.io>
1 parent c9633f2 commit b4a3831

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

templates/repo/blame.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</div>
2929
</div>
3030
</h4>
31-
<div class="ui attached table unstackable segment">
31+
<div class="ui bottom attached table unstackable segment">
3232
<div class="file-view code-view unicode-escaped">
3333
{{if .IsFileTooLarge}}
3434
{{template "shared/filetoolarge" dict "RawFileLink" .RawFileLink}}

templates/repo/settings/lfs_file.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<a class="ui primary tiny button" href="{{.LFSFilesLink}}/find?oid={{.LFSFile.Oid}}&size={{.LFSFile.Size}}">{{ctx.Locale.Tr "repo.settings.lfs_findcommits"}}</a>
1212
</div>
1313
</h4>
14-
<div class="ui attached table unstackable segment">
14+
<div class="ui bottom attached table unstackable segment">
1515
{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
1616
<div class="file-view{{if .IsMarkup}} markup {{.MarkupType}}{{else if .IsPlainText}} plain-text{{else if .IsTextFile}} code-view{{end}}">
1717
{{if .IsFileTooLarge}}

templates/repo/view_file.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{{end}}
1212

1313
{{if not .ReadmeInList}}
14-
<div id="repo-file-commit-box" class="ui top attached header list-header tw-mb-4 tw-flex tw-justify-between">
14+
<div id="repo-file-commit-box" class="ui segment list-header tw-mb-4 tw-flex tw-justify-between">
1515
<div class="latest-commit">
1616
{{template "repo/latest_commit" .}}
1717
</div>
@@ -84,7 +84,7 @@
8484
{{end}}
8585
</div>
8686
</h4>
87-
<div class="ui attached table unstackable segment">
87+
<div class="ui bottom attached table unstackable segment">
8888
{{if not (or .IsMarkup .IsRenderedHTML)}}
8989
{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
9090
{{end}}

web_src/css/repo.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,6 @@ td .commit-summary {
435435
padding: 0 !important;
436436
}
437437

438-
.non-diff-file-content .attached.segment,
439438
.non-diff-file-content .pdfobject {
440439
border-radius: 0 0 var(--border-radius) var(--border-radius);
441440
}
@@ -2391,6 +2390,7 @@ tbody.commit-list {
23912390
.author-wrapper {
23922391
max-width: 180px;
23932392
align-self: center;
2393+
white-space: nowrap;
23942394
}
23952395

23962396
/* in the commit list, messages can wrap so we can use inline */

0 commit comments

Comments
 (0)