mirror of
https://github.com/go-gitea/gitea.git
synced 2025-12-12 10:39:19 +01:00
fixes
This commit is contained in:
parent
092b7fd193
commit
11ed040990
@ -412,6 +412,7 @@ func Forks(ctx *context.Context) {
|
||||
}
|
||||
|
||||
pager := context.NewPagination(int(total), pageSize, page, 5)
|
||||
ctx.Data["ShowRepoOwnerAvatar"] = true
|
||||
ctx.Data["ShowRepoOwnerOnList"] = true
|
||||
ctx.Data["Page"] = pager
|
||||
ctx.Data["Repos"] = forks
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<div class="repo-header">
|
||||
<div class="flex-item tw-items-center">
|
||||
<div class="flex-item-leading">
|
||||
{{template "repo/icon" (dict "Repo" . "EnableRepoAvatar" "true" "Size" 24)}}
|
||||
{{template "repo/icon" (dict "Repo" . "Size" 24 "ShowRepoAvatar" true)}}
|
||||
</div>
|
||||
<div class="flex-item-main">
|
||||
<div class="flex-item-title tw-text-18">
|
||||
|
||||
@ -1,13 +1,17 @@
|
||||
{{/* Template Attributes:
|
||||
* Repo: The repo
|
||||
* EnableRepoAvatar: Enable repo avatars when non-nil
|
||||
* ShowRepoAvatar: Enable repo avatar when `true`
|
||||
* ShowRepoOwnerAvatar: Enable owner avatars when `true`
|
||||
* Size: Icon size in pixels, default is 16
|
||||
*
|
||||
* Note: Keep the icon logic in sync with web_src/js/utils/mappings.ts
|
||||
*/}}
|
||||
{{$size := or .Size 16}}
|
||||
{{$avatarLink := (.Repo.RelAvatarLink ctx)}}
|
||||
{{if and $avatarLink .EnableRepoAvatar}}
|
||||
|
||||
{{if .ShowRepoOwnerAvatar}}
|
||||
{{ctx.AvatarUtils.Avatar .Repo.Owner 24}}
|
||||
{{else if and $avatarLink .ShowRepoAvatar}}
|
||||
<img class="ui avatar tw-align-middle" src="{{$avatarLink}}" width="{{$size}}" height="{{$size}}" alt aria-hidden="true">
|
||||
{{else if .Repo.IsMirror}}
|
||||
{{svg "octicon-mirror" $size}}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
{{range .Repos}}
|
||||
<div class="flex-item">
|
||||
<div class="flex-item-leading">
|
||||
{{template "repo/icon" (dict "Repo" . "Size" 24 "EnableRepoAvatar" "true")}}
|
||||
{{template "repo/icon" (dict "Repo" . "Size" 24 "ShowRepoOwnerAvatar" $.ShowRepoOwnerAvatar)}}
|
||||
</div>
|
||||
<div class="flex-item-main">
|
||||
<div class="flex-item-header">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user