aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKerwin Bryant <kerwin612@qq.com>2025-03-19 00:59:33 +0800
committerGitHub <noreply@github.com>2025-03-19 00:59:33 +0800
commitdcbf6c2d13b5ebd59a22a168f6d0d5bc0c013e87 (patch)
treeb673469e011dd7716190a23eabc1d16c718cd1ca /templates
parent1b4adc0255f0b0e4d2434bf6d7e12e5390b5fc8b (diff)
downloadgitea-dcbf6c2d13b5ebd59a22a168f6d0d5bc0c013e87.tar.gz
gitea-dcbf6c2d13b5ebd59a22a168f6d0d5bc0c013e87.zip
Optimize Layout Styles of Filelist (#33920)
Align items --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/view_list.tmpl12
1 files changed, 7 insertions, 5 deletions
diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl
index b4d27fb1e3..4745110dd2 100644
--- a/templates/repo/view_list.tmpl
+++ b/templates/repo/view_list.tmpl
@@ -14,19 +14,21 @@
{{$entry := $item.Entry}}
{{$commit := $item.Commit}}
{{$submoduleFile := $item.SubmoduleFile}}
- <div class="repo-file-cell name {{if not $commit}}notready{{end}}">
+ <div class="repo-file-cell name muted-links {{if not $commit}}notready{{end}}">
{{ctx.RenderUtils.RenderFileIcon $entry}}
{{if $entry.IsSubModule}}
{{$submoduleLink := $submoduleFile.SubmoduleWebLink ctx}}
{{if $submoduleLink}}
- <a class="muted" href="{{$submoduleLink.RepoWebLink}}">{{$entry.Name}}</a> <span class="at">@</span> <a href="{{$submoduleLink.CommitWebLink}}">{{ShortSha $submoduleFile.RefID}}</a>
+ <a class="entry-name" href="{{$submoduleLink.RepoWebLink}}" title="{{$entry.Name}}">{{$entry.Name}}</a>
+ @ <a class="text primary" href="{{$submoduleLink.CommitWebLink}}">{{ShortSha $submoduleFile.RefID}}</a>
{{else}}
- {{$entry.Name}} <span class="at">@</span> {{ShortSha $submoduleFile.RefID}}
+ <span class="entry-name" title="{{$entry.Name}}">{{$entry.Name}}</span>
+ @ {{ShortSha $submoduleFile.RefID}}
{{end}}
{{else}}
{{if $entry.IsDir}}
{{$subJumpablePathName := $entry.GetSubJumpablePathName}}
- <a class="muted" href="{{$.TreeLink}}/{{PathEscapeSegments $subJumpablePathName}}" title="{{$subJumpablePathName}}">
+ <a class="entry-name" href="{{$.TreeLink}}/{{PathEscapeSegments $subJumpablePathName}}" title="{{$subJumpablePathName}}">
{{$subJumpablePathFields := StringUtils.Split $subJumpablePathName "/"}}
{{$subJumpablePathFieldLast := (Eval (len $subJumpablePathFields) "-" 1)}}
{{if eq $subJumpablePathFieldLast 0}}
@@ -37,7 +39,7 @@
{{end}}
</a>
{{else}}
- <a class="muted" href="{{$.TreeLink}}/{{PathEscapeSegments $entry.Name}}" title="{{$entry.Name}}">{{$entry.Name}}</a>
+ <a class="entry-name" href="{{$.TreeLink}}/{{PathEscapeSegments $entry.Name}}" title="{{$entry.Name}}">{{$entry.Name}}</a>
{{end}}
{{end}}
</div>