summaryrefslogtreecommitdiffstats
path: root/templates/shared/webhook/icon.tmpl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
committerDaniel Baumann <daniel@debian.org>2024-12-12 23:57:56 +0100
commite68b9d00a6e05b3a941f63ffb696f91e554ac5ec (patch)
tree97775d6c13b0f416af55314eb6a89ef792474615 /templates/shared/webhook/icon.tmpl
parentInitial commit. (diff)
downloadforgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.tar.xz
forgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.zip
Adding upstream version 9.0.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to '')
-rw-r--r--templates/shared/webhook/icon.tmpl29
1 files changed, 29 insertions, 0 deletions
diff --git a/templates/shared/webhook/icon.tmpl b/templates/shared/webhook/icon.tmpl
new file mode 100644
index 0000000..3c84f11
--- /dev/null
+++ b/templates/shared/webhook/icon.tmpl
@@ -0,0 +1,29 @@
+{{$size := 26}}
+{{if .Size}}
+ {{$size = .Size}}
+{{end}}
+{{if eq .HookType "forgejo"}}
+ <img width="{{$size}}" height="{{$size}}" src="{{AssetUrlPrefix}}/img/forgejo.svg">
+{{else if eq .HookType "gitea"}}
+ {{svg "gitea-gitea" $size "img"}}
+{{else if eq .HookType "gogs"}}
+ <img width="{{$size}}" height="{{$size}}" src="{{AssetUrlPrefix}}/img/gogs.ico">
+{{else if eq .HookType "slack"}}
+ <img width="{{$size}}" height="{{$size}}" src="{{AssetUrlPrefix}}/img/slack.png">
+{{else if eq .HookType "discord"}}
+ <img width="{{$size}}" height="{{$size}}" src="{{AssetUrlPrefix}}/img/discord.png">
+{{else if eq .HookType "dingtalk"}}
+ <img width="{{$size}}" height="{{$size}}" src="{{AssetUrlPrefix}}/img/dingtalk.ico">
+{{else if eq .HookType "telegram"}}
+ <img width="{{$size}}" height="{{$size}}" src="{{AssetUrlPrefix}}/img/telegram.png">
+{{else if eq .HookType "msteams"}}
+ <img width="{{$size}}" height="{{$size}}" src="{{AssetUrlPrefix}}/img/msteams.png">
+{{else if eq .HookType "feishu"}}
+ <img width="{{$size}}" height="{{$size}}" src="{{AssetUrlPrefix}}/img/feishu.png">
+{{else if eq .HookType "matrix"}}
+ {{svg "gitea-matrix" $size "img"}}
+{{else if eq .HookType "wechatwork"}}
+ <img width="{{$size}}" height="{{$size}}" src="{{AssetUrlPrefix}}/img/wechatwork.png">
+{{else if eq .HookType "packagist"}}
+ <img width="{{$size}}" height="{{$size}}" src="{{AssetUrlPrefix}}/img/packagist.png">
+{{end}}