chore(init): scaffold Gitea mail templates — 110 templates, 10 visual styles, drop-in deployment

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
KenanZhuandClaude Opus 4.8 committed 2026-06-03 18:10:22 +08:00
commit a2742887e8
140 files changed
+8747

No files matched your search

@@ -0,0 +1,68 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{.Subject}}</title>
<style type="text/css">
body, .ExternalClass, .ReadMsgBody { background-color: #fff7ed; }
</style>
</head>
<body style="margin:0; padding:0; background-color:#fff7ed; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%;">
<center style="width:100%; table-layout:fixed;">
<div style="max-width:600px; margin:20px auto; background:#ffffff; border-radius:16px; box-shadow:0 2px 16px rgba(234,88,12,0.08); overflow:hidden; border:1px solid #fed7aa;">
<div style="padding:28px 32px 16px; border-bottom:1px solid #fed7aa; background:linear-gradient(135deg, #fff7ed, #ffffff);">
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;">
<tr>
<td style="vertical-align:middle;">
<span style="font-size:15px;">&#x1f44b;</span>
<img src="{{AppUrl}}assets/img/favicon.png" alt="logo" width="30" height="30" style="display:inline-block; vertical-align:middle; margin:0 10px; border:0; outline:none;">
<span style="font-size:20px; font-weight:700; color:#9a3412; letter-spacing:-0.3px; vertical-align:middle; font-family:Georgia,'Times New Roman',serif;">{{AppName}}</span>
</td>
</tr>
</table>
</div>
<div style="padding:32px 32px 24px; color:#78350f;">
{{$repo_url := HTMLFormat "<a href='%s' style='color:#ea580c; text-decoration:none; font-weight:600;'>%s</a>" .Issue.Repo.HTMLURL .Issue.Repo.FullName}}
{{$link := HTMLFormat "<a href='%s' style='color:#ea580c; text-decoration:none; font-weight:600;'>#%d</a>" .Link .Issue.Index}}
<p style="margin:0 0 20px; font-size:16px; line-height:1.6; color:#78350f;">
{{if .IsPull}}
{{.locale.Tr "mail.issue_assigned.pull" .Doer.Name $link $repo_url}}
{{else}}
{{.locale.Tr "mail.issue_assigned.issue" .Doer.Name $link $repo_url}}
{{end}}
</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="margin:28px 0 24px; border-collapse:separate;">
<tr>
<td align="center">
<a href="{{.Link}}" style="display:inline-block; padding:14px 40px; font-size:16px; font-weight:600; color:#ffffff; text-decoration:none; background:linear-gradient(135deg, #ea580c, #c2410c); border-radius:50px; font-family:system-ui,sans-serif;">View on {{AppName}} &#x2197;&#xfe0f;</a>
</td>
</tr>
</table>
<div style="background:#fff7ed; border:1px solid #fed7aa; border-radius:12px; padding:16px 18px; margin:24px 0 16px;">
<p style="margin:0 0 8px; font-size:14px; color:#92400e; line-height:1.5;">
{{.locale.Tr "mail.link_not_working_do_paste"}}
</p>
<p style="margin:0; font-size:13px; color:#c2410c; background:#ffffff; padding:10px 12px; border-radius:8px; border:1px solid #fed7aa; word-break:break-all; font-family:monospace;">
{{.Link}}
</p>
</div>
</div>
<div style="padding:20px 32px 24px; background:#fff7ed; border-top:1px solid #fed7aa;">
<p style="margin:0; font-size:14px; color:#92400e;">
&copy; <a href="{{AppUrl}}" style="color:#ea580c; text-decoration:none; font-weight:600;">{{AppName}}</a>
</p>
<p style="margin:8px 0 0; font-size:13px; color:#a8a29e;">Built with &#x2764;&#xfe0f; by the community, for the community.</p>
</div>
</div>
</center>
</body>
</html>
+128
View File
@@ -0,0 +1,128 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{.Subject}}</title>
<style type="text/css">
body, .ExternalClass, .ReadMsgBody { background-color: #fff7ed; }
blockquote { padding-left: 1em; margin: 1em 0; border-left: 3px solid #fdba74; color: #92400e; }
pre { background: #fff7ed; padding: 12px; border-radius: 8px; overflow-x: auto; font-size: 14px; line-height: 1.5; border: 1px solid #fed7aa; }
hr { border: none; border-top: 1px solid #fed7aa; margin: 20px 0; }
</style>
</head>
<body style="margin:0; padding:0; background-color:#fff7ed; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%;">
<center style="width:100%; table-layout:fixed;">
<div style="max-width:600px; margin:20px auto; background:#ffffff; border-radius:16px; box-shadow:0 2px 16px rgba(234,88,12,0.08); overflow:hidden; border:1px solid #fed7aa;">
<div style="padding:28px 32px 16px; border-bottom:1px solid #fed7aa; background:linear-gradient(135deg, #fff7ed, #ffffff);">
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;">
<tr>
<td style="vertical-align:middle;">
<span style="font-size:15px;">&#x1f44b;</span>
<img src="{{AppUrl}}assets/img/favicon.png" alt="logo" width="30" height="30" style="display:inline-block; vertical-align:middle; margin:0 10px; border:0; outline:none;">
<span style="font-size:20px; font-weight:700; color:#9a3412; letter-spacing:-0.3px; vertical-align:middle; font-family:Georgia,'Times New Roman',serif;">{{AppName}}</span>
</td>
</tr>
</table>
</div>
<div style="padding:32px 32px 24px; color:#78350f;">
{{if .IsMention}}<p style="margin:0 0 16px; font-size:16px; line-height:1.6; color:#78350f;">{{.locale.Tr "mail.issue.x_mentioned_you" .Doer.Name}}</p>{{end}}
{{if eq .ActionName "push"}}
<p style="margin:0 0 16px; font-size:16px; line-height:1.6; color:#78350f;">
{{if .Comment.IsForcePush}}
{{$oldCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.OldCommit}}
{{$oldShortSha := ShortSha .Comment.OldCommit}}
{{$oldCommitLink := HTMLFormat "<a href='%[1]s' style='color:#ea580c; text-decoration:none; font-weight:600;'>%[2]s</a>" $oldCommitUrl $oldShortSha}}
{{$newCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.NewCommit}}
{{$newShortSha := ShortSha .Comment.NewCommit}}
{{$newCommitLink := HTMLFormat "<a href='%[1]s' style='color:#ea580c; text-decoration:none; font-weight:600;'>%[2]s</a>" $newCommitUrl $newShortSha}}
{{.locale.Tr "mail.issue.action.force_push" .Doer.Name .Comment.Issue.PullRequest.HeadBranch $oldCommitLink $newCommitLink}}
{{else}}
{{.locale.TrN (len .Comment.Commits) "mail.issue.action.push_1" "mail.issue.action.push_n" .Doer.Name .Comment.Issue.PullRequest.HeadBranch (len .Comment.Commits)}}
{{end}}
</p>
{{end}}
<p style="margin:0 0 16px; font-size:16px; line-height:1.6; color:#78350f;">
{{if eq .ActionName "close"}}
{{.locale.Tr "mail.issue.action.close" .Doer.Name .Issue.Index}}
{{else if eq .ActionName "reopen"}}
{{.locale.Tr "mail.issue.action.reopen" .Doer.Name .Issue.Index}}
{{else if eq .ActionName "merge"}}
{{.locale.Tr "mail.issue.action.merge" .Doer.Name .Issue.Index .Issue.PullRequest.BaseBranch}}
{{else if eq .ActionName "approve"}}
{{.locale.Tr "mail.issue.action.approve" .Doer.Name}}
{{else if eq .ActionName "reject"}}
{{.locale.Tr "mail.issue.action.reject" .Doer.Name}}
{{else if eq .ActionName "review"}}
{{.locale.Tr "mail.issue.action.review" .Doer.Name}}
{{else if eq .ActionName "review_dismissed"}}
{{.locale.Tr "mail.issue.action.review_dismissed" .Doer.Name .Comment.Review.Reviewer.Name}}
{{else if eq .ActionName "ready_for_review"}}
{{.locale.Tr "mail.issue.action.ready_for_review" .Doer.Name}}
{{end}}
{{- if eq .Body ""}}
{{if eq .ActionName "new"}}
{{.locale.Tr "mail.issue.action.new" .Doer.Name .Issue.Index}}
{{end}}
{{else}}
{{.Body}}
{{end -}}
</p>
{{- range .ReviewComments}}
<hr>
<p style="margin:8px 0; font-size:14px; color:#92400e;">{{$.locale.Tr "mail.issue.in_tree_path" .TreePath}}</p>
<div style="padding-left: 1em; margin: 1em 0;">
<pre>{{.Patch}}</pre>
<div style="margin-top:8px; font-size:15px; line-height:1.6;">{{.RenderedContent}}</div>
</div>
{{end -}}
{{if eq .ActionName "push"}}
<ul style="margin:16px 0; padding-left:20px;">
{{range .Comment.Commits}}
<li style="margin-bottom:6px; font-size:15px;">
<a href="{{$.Comment.Issue.PullRequest.BaseRepo.HTMLURL}}/commit/{{.ID}}" style="color:#ea580c; text-decoration:none; font-weight:600;">
{{ShortSha .ID.String}}
</a> &mdash; {{.MessageTitle}}
</li>
{{end}}
</ul>
{{end}}
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="margin:28px 0 24px; border-collapse:separate;">
<tr>
<td align="center">
<a href="{{.Link}}" style="display:inline-block; padding:14px 40px; font-size:16px; font-weight:600; color:#ffffff; text-decoration:none; background:linear-gradient(135deg, #ea580c, #c2410c); border-radius:50px; font-family:system-ui,sans-serif;">View on {{AppName}} &#x2197;&#xfe0f;</a>
</td>
</tr>
</table>
<div style="background:#fff7ed; border:1px solid #fed7aa; border-radius:12px; padding:16px 18px; margin:24px 0 16px;">
<p style="margin:0 0 8px; font-size:14px; color:#92400e; line-height:1.5;">
{{.locale.Tr "mail.link_not_working_do_paste"}}
</p>
<p style="margin:0; font-size:13px; color:#c2410c; background:#ffffff; padding:10px 12px; border-radius:8px; border:1px solid #fed7aa; word-break:break-all; font-family:monospace;">
{{.Link}}
</p>
</div>
</div>
<div style="padding:20px 32px 24px; background:#fff7ed; border-top:1px solid #fed7aa;">
<p style="margin:0; font-size:14px; color:#92400e;">
&copy; <a href="{{AppUrl}}" style="color:#ea580c; text-decoration:none; font-weight:600;">{{AppName}}</a>
</p>
<p style="margin:8px 0 0; font-size:13px; color:#a8a29e;">Built with &#x2764;&#xfe0f; by the community, for the community.</p>
</div>
</div>
</center>
</body>
</html>