summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorXinyu Zhou <i@sourcehut.net>2022-11-24 05:57:37 +0800
committerGitHub <noreply@github.com>2022-11-23 15:57:37 -0600
commite483ec3a00752349dd4aa326ae75b2bbdd45981f (patch)
treea940a2fdf76c5501f8216147f13f262bc4604d18 /models
parenta3c09fb36d7820076687e683c7dd6cbc6bf8cfb5 (diff)
downloadgitea-e483ec3a00752349dd4aa326ae75b2bbdd45981f.tar.gz
gitea-e483ec3a00752349dd4aa326ae75b2bbdd45981f.zip
Fix vertical align of committer avatar rendered by email address (#21884)
Committer avatar rendered by `func AvatarByEmail` are not vertical align as `func Avatar` does. - Replace literals `ui avatar` and `ui avatar vm` with the constant `DefaultAvatarClass`
Diffstat (limited to 'models')
-rw-r--r--models/avatars/avatar.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/models/avatars/avatar.go b/models/avatars/avatar.go
index 61f0ac19c3..dec264cea4 100644
--- a/models/avatars/avatar.go
+++ b/models/avatars/avatar.go
@@ -20,8 +20,12 @@ import (
"code.gitea.io/gitea/modules/setting"
)
-// DefaultAvatarPixelSize is the default size in pixels of a rendered avatar
-const DefaultAvatarPixelSize = 28
+const (
+ // DefaultAvatarClass is the default class of a rendered avatar
+ DefaultAvatarClass = "ui avatar vm"
+ // DefaultAvatarPixelSize is the default size in pixels of a rendered avatar
+ DefaultAvatarPixelSize = 28
+)
// EmailHash represents a pre-generated hash map (mainly used by LibravatarURL, it queries email server's DNS records)
type EmailHash struct {