diff options
author | silverwind <me@silverwind.io> | 2020-12-09 01:12:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-09 01:12:15 +0100 |
commit | c05701dd7d72aea75c67fbb07df928c192474686 (patch) | |
tree | 807d295c28ad57950120e0b14596168902efde0d /templates/repo | |
parent | 658e90a1141a03e5249770a6a670b818fe307e1d (diff) | |
download | gitea-c05701dd7d72aea75c67fbb07df928c192474686.tar.gz gitea-c05701dd7d72aea75c67fbb07df928c192474686.zip |
Fix frontpage avatars (#13853)
The frontpage uses a rather strange method to obtain the commit's avatar
which I've overlooked earlier. I don't exactly understand how it works
but this change fixes the wrong default avatars by using the function
that was in previous use.
Also introduced a few constants for size an size increase factor.
Fixes: https://github.com/go-gitea/gitea/issues/13844
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/release/list.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/settings/webhook/list.tmpl | 18 | ||||
-rw-r--r-- | templates/repo/settings/webhook/new.tmpl | 18 | ||||
-rw-r--r-- | templates/repo/view_list.tmpl | 4 |
4 files changed, 22 insertions, 22 deletions
diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index 70a614ff72..780a75ad89 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -90,7 +90,7 @@ <p class="text grey"> {{ if gt .Publisher.ID 0 }} <span class="author"> - {{avatar .Publisher 28 "img-10"}} + {{avatar .Publisher 20}} <a href="{{AppSubUrl}}/{{.Publisher.Name}}">{{.Publisher.Name}}</a> </span> {{ end }} @@ -117,7 +117,7 @@ {{if .OriginalAuthor}} {{svg "octicon-mark-github" 16 "mr-2"}}{{.OriginalAuthor}} {{else if .Publisher}} - {{avatar .Publisher 28 "img-10"}} + {{avatar .Publisher 20}} <a href="{{AppSubUrl}}/{{.Publisher.Name}}">{{.Publisher.GetDisplayName}}</a> {{else}} Ghost diff --git a/templates/repo/settings/webhook/list.tmpl b/templates/repo/settings/webhook/list.tmpl index 29994d8197..47ed37cc33 100644 --- a/templates/repo/settings/webhook/list.tmpl +++ b/templates/repo/settings/webhook/list.tmpl @@ -6,31 +6,31 @@ <div class="ui blue tiny button">{{.i18n.Tr "repo.settings.add_webhook"}}</div> <div class="menu"> <a class="item" href="{{.BaseLink}}/gitea/new"> - <img class="img-10" src="{{StaticUrlPrefix}}/img/gitea-sm.png">Gitea + <img width="20" height="20" src="{{StaticUrlPrefix}}/img/gitea-sm.png">Gitea </a> <a class="item" href="{{.BaseLink}}/gogs/new"> - <img class="img-10" src="{{StaticUrlPrefix}}/img/gogs.ico">Gogs + <img width="20" height="20" src="{{StaticUrlPrefix}}/img/gogs.ico">Gogs </a> <a class="item" href="{{.BaseLink}}/slack/new"> - <img class="img-10" src="{{StaticUrlPrefix}}/img/slack.png">Slack + <img width="20" height="20" src="{{StaticUrlPrefix}}/img/slack.png">Slack </a> <a class="item" href="{{.BaseLink}}/discord/new"> - <img class="img-10" src="{{StaticUrlPrefix}}/img/discord.png">Discord + <img width="20" height="20" src="{{StaticUrlPrefix}}/img/discord.png">Discord </a> <a class="item" href="{{.BaseLink}}/dingtalk/new"> - <img class="img-10" src="{{StaticUrlPrefix}}/img/dingtalk.ico">Dingtalk + <img width="20" height="20" src="{{StaticUrlPrefix}}/img/dingtalk.ico">Dingtalk </a> <a class="item" href="{{.BaseLink}}/telegram/new"> - <img class="img-10" src="{{StaticUrlPrefix}}/img/telegram.png">Telegram + <img width="20" height="20" src="{{StaticUrlPrefix}}/img/telegram.png">Telegram </a> <a class="item" href="{{.BaseLink}}/msteams/new"> - <img class="img-10" src="{{StaticUrlPrefix}}/img/msteams.png">Microsoft Teams + <img width="20" height="20" src="{{StaticUrlPrefix}}/img/msteams.png">Microsoft Teams </a> <a class="item" href="{{.BaseLink}}/feishu/new"> - <img class="img-10" src="{{StaticUrlPrefix}}/img/feishu.png">Feishu + <img width="20" height="20" src="{{StaticUrlPrefix}}/img/feishu.png">Feishu </a> <a class="item" href="{{.BaseLink}}/matrix/new"> - <img class="img-10" src="{{StaticUrlPrefix}}/img/matrix.svg">Matrix + <img width="20" height="20" src="{{StaticUrlPrefix}}/img/matrix.svg">Matrix </a> </div> </div> diff --git a/templates/repo/settings/webhook/new.tmpl b/templates/repo/settings/webhook/new.tmpl index fc78db8648..ac5d1886b2 100644 --- a/templates/repo/settings/webhook/new.tmpl +++ b/templates/repo/settings/webhook/new.tmpl @@ -8,23 +8,23 @@ {{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}} <div class="ui right"> {{if eq .HookType "gitea"}} - <img class="img-13" src="{{StaticUrlPrefix}}/img/gitea-sm.png"> + <img width="26" height="26" src="{{StaticUrlPrefix}}/img/gitea-sm.png"> {{else if eq .HookType "gogs"}} - <img class="img-13" src="{{StaticUrlPrefix}}/img/gogs.ico"> + <img width="26" height="26" src="{{StaticUrlPrefix}}/img/gogs.ico"> {{else if eq .HookType "slack"}} - <img class="img-13" src="{{StaticUrlPrefix}}/img/slack.png"> + <img width="26" height="26" src="{{StaticUrlPrefix}}/img/slack.png"> {{else if eq .HookType "discord"}} - <img class="img-13" src="{{StaticUrlPrefix}}/img/discord.png"> + <img width="26" height="26" src="{{StaticUrlPrefix}}/img/discord.png"> {{else if eq .HookType "dingtalk"}} - <img class="img-13" src="{{StaticUrlPrefix}}/img/dingtalk.ico"> + <img width="26" height="26" src="{{StaticUrlPrefix}}/img/dingtalk.ico"> {{else if eq .HookType "telegram"}} - <img class="img-13" src="{{StaticUrlPrefix}}/img/telegram.png"> + <img width="26" height="26" src="{{StaticUrlPrefix}}/img/telegram.png"> {{else if eq .HookType "msteams"}} - <img class="img-13" src="{{StaticUrlPrefix}}/img/msteams.png"> + <img width="26" height="26" src="{{StaticUrlPrefix}}/img/msteams.png"> {{else if eq .HookType "feishu"}} - <img class="img-13" src="{{StaticUrlPrefix}}/img/feishu.png"> + <img width="26" height="26" src="{{StaticUrlPrefix}}/img/feishu.png"> {{else if eq .HookType "matrix"}} - <img class="img-13" src="{{StaticUrlPrefix}}/img/matrix.svg"> + <img width="26" height="26" src="{{StaticUrlPrefix}}/img/matrix.svg"> {{end}} </div> </h4> diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index 651747f20a..3266a813e3 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -3,7 +3,7 @@ <tr class="commit-list"> <th colspan="2"> {{if .LatestCommitUser}} - {{avatar .LatestCommitUser 28 "img-12"}} + {{avatar .LatestCommitUser 24}} {{if .LatestCommitUser.FullName}} <a href="{{AppSubUrl}}/{{.LatestCommitUser.Name}}"><strong>{{.LatestCommitUser.FullName}}</strong></a> {{else}} @@ -11,7 +11,7 @@ {{end}} {{else}} {{if .LatestCommit.Author}} - {{avatarByEmail .LatestCommit.Author.Email .LatestCommit.Author.Name 28 "img-12"}} + {{avatarByEmail .LatestCommit.Author.Email .LatestCommit.Author.Name 24}} <strong>{{.LatestCommit.Author.Name}}</strong> {{end}} {{end}} |