mirror of
https://github.com/go-gitea/gitea
synced 2025-09-18 22:58:14 +00:00
Refactor and update mail templates (#35150)
- Moved mail templates to new directories. - Added new devtest ymls. - Embedded styles as much as possible. - Added new translation keys for actions email. --------- Signed-off-by: NorthRealm <155140859+NorthRealm@users.noreply.github.com> Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
3
templates/mail/user/auth/activate.devtest.yml
Normal file
3
templates/mail/user/auth/activate.devtest.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
DisplayName: User Display Name
|
||||
Code: The-Activation-Code
|
||||
ActiveCodeLives: 24h
|
17
templates/mail/user/auth/activate.tmpl
Normal file
17
templates/mail/user/auth/activate.tmpl
Normal file
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no">
|
||||
<title>{{.locale.Tr "mail.activate_account.title" (.DisplayName|DotEscape)}}</title>
|
||||
</head>
|
||||
|
||||
{{$activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}}
|
||||
<body>
|
||||
<p>{{.locale.Tr "mail.activate_account.text_1" (.DisplayName|DotEscape) AppName}}</p><br>
|
||||
<p>{{.locale.Tr "mail.activate_account.text_2" .ActiveCodeLives}}</p><p><a href="{{$activate_url}}">{{$activate_url}}</a></p><br>
|
||||
<p>{{.locale.Tr "mail.link_not_working_do_paste"}}</p>
|
||||
|
||||
<p>© <a href="{{AppUrl}}">{{AppName}}</a></p>
|
||||
</body>
|
||||
</html>
|
4
templates/mail/user/auth/activate_email.devtest.yml
Normal file
4
templates/mail/user/auth/activate_email.devtest.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
DisplayName: User Display Name
|
||||
Code: The-Activation-Code
|
||||
Email: admin@example.com
|
||||
ActiveCodeLives: 24h
|
17
templates/mail/user/auth/activate_email.tmpl
Normal file
17
templates/mail/user/auth/activate_email.tmpl
Normal file
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta Name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no">
|
||||
<title>{{.locale.Tr "mail.activate_email.title" (.DisplayName|DotEscape)}}</title>
|
||||
</head>
|
||||
|
||||
{{$activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}}
|
||||
<body>
|
||||
<p>{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}</p><br>
|
||||
<p>{{.locale.Tr "mail.activate_email.text" .ActiveCodeLives}}</p><p><a href="{{$activate_url}}">{{$activate_url}}</a></p><br>
|
||||
<p>{{.locale.Tr "mail.link_not_working_do_paste"}}</p>
|
||||
|
||||
<p>© <a href="{{AppUrl}}">{{AppName}}</a></p>
|
||||
</body>
|
||||
</html>
|
2
templates/mail/user/auth/register_notify.devtest.yml
Normal file
2
templates/mail/user/auth/register_notify.devtest.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
DisplayName: User Display Name
|
||||
Username: Username
|
18
templates/mail/user/auth/register_notify.tmpl
Normal file
18
templates/mail/user/auth/register_notify.tmpl
Normal file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no">
|
||||
<title>{{.locale.Tr "mail.register_notify.title" (.DisplayName|DotEscape) AppName}}</title>
|
||||
</head>
|
||||
|
||||
{{$set_pwd_url := printf "%[1]suser/forgot_password" AppUrl}}
|
||||
<body>
|
||||
<p>{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}</p><br>
|
||||
<p>{{.locale.Tr "mail.register_notify.text_1" AppName}}</p><br>
|
||||
<p>{{.locale.Tr "mail.register_notify.text_2" .Username}}</p><p><a href="{{AppUrl}}user/login">{{AppUrl}}user/login</a></p><br>
|
||||
<p>{{.locale.Tr "mail.register_notify.text_3" $set_pwd_url}}</p><br>
|
||||
|
||||
<p>© <a href="{{AppUrl}}">{{AppName}}</a></p>
|
||||
</body>
|
||||
</html>
|
3
templates/mail/user/auth/reset_passwd.devtest.yml
Normal file
3
templates/mail/user/auth/reset_passwd.devtest.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
DisplayName: User Display Name
|
||||
Code: The-Reset-Token
|
||||
ResetPwdCodeLives: 24h
|
17
templates/mail/user/auth/reset_passwd.tmpl
Normal file
17
templates/mail/user/auth/reset_passwd.tmpl
Normal file
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no">
|
||||
<title>{{.locale.Tr "mail.reset_password.title" (.DisplayName|DotEscape)}}</title>
|
||||
</head>
|
||||
|
||||
{{$recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}}
|
||||
<body>
|
||||
<p>{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}</p><br>
|
||||
<p>{{.locale.Tr "mail.reset_password.text" .ResetPwdCodeLives}}</p><p><a href="{{$recover_url}}">{{$recover_url}}</a></p><br>
|
||||
<p>{{.locale.Tr "mail.link_not_working_do_paste"}}</p>
|
||||
|
||||
<p>© <a href="{{AppUrl}}">{{AppName}}</a></p>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user