forked from forgejo/forgejo
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
This commit is contained in:
parent
658e90a114
commit
c05701dd7d
13 changed files with 78 additions and 65 deletions
|
@ -10,23 +10,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.png">
|
||||
<img width="26" height="26" src="{{StaticUrlPrefix}}/img/dingtalk.png">
|
||||
{{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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue