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:
commit
a2742887e8
140 files changed
+8747
No files matched your search
@@ -0,0 +1,70 @@
|
||||
<!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: #0d1117; }
|
||||
</style>
|
||||
</head>
|
||||
<body style="margin:0; padding:0; background-color:#0d1117; font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Courier New', monospace; -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:#161b22; border:2px solid #30363d;">
|
||||
|
||||
<div style="padding:24px 28px 16px; border-bottom:2px solid #30363d;">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="vertical-align:middle;">
|
||||
<span style="font-size:16px; font-weight:700; color:#00ff41; letter-spacing:0.5px;">> {{AppName}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div style="padding:28px 28px 20px; color:#c9d1d9;">
|
||||
{{$repo_url := HTMLFormat "<a href='%s' style='color:#58a6ff; text-decoration:none; font-weight:700;'>%s</a>" .Issue.Repo.HTMLURL .Issue.Repo.FullName}}
|
||||
{{$link := HTMLFormat "<a href='%s' style='color:#58a6ff; text-decoration:none; font-weight:700;'>#%d</a>" .Link .Issue.Index}}
|
||||
<p style="margin:0 0 20px; font-size:14px; line-height:1.6; color:#c9d1d9;">
|
||||
{{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:24px 0 20px; border-collapse:separate;">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<a href="{{.Link}}" style="display:inline-block; padding:11px 24px; font-size:14px; font-weight:700; color:#0d1117; text-decoration:none; background-color:#00ff41; border:2px solid #00ff41; font-family:'JetBrains Mono','Fira Code','Consolas',monospace; letter-spacing:0.5px;">$ view_issue</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="background:#0d1117; border:1px solid #30363d; padding:14px 16px; margin:20px 0 12px;">
|
||||
<p style="margin:0 0 6px; font-size:12px; color:#8b949e;">
|
||||
{{.locale.Tr "mail.link_not_working_do_paste"}}
|
||||
</p>
|
||||
<p style="margin:0; font-size:12px; color:#58a6ff; word-break:break-all; line-height:1.6;">
|
||||
┌─<br>
|
||||
│ {{.Link}}<br>
|
||||
└─
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="padding:16px 28px 20px; border-top:1px solid #30363d; background:#0d1117;">
|
||||
<p style="margin:0; font-size:12px; color:#484f58;">
|
||||
<span style="color:#8b949e;">#</span> © <a href="{{AppUrl}}" style="color:#58a6ff; text-decoration:none;">{{AppName}}</a>
|
||||
</p>
|
||||
<p style="margin:4px 0 0; font-size:11px; color:#484f58;">
|
||||
<span style="color:#8b949e;">#</span> if (!$expecting) { ignore(); }
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,130 @@
|
||||
<!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: #0d1117; }
|
||||
blockquote { padding-left: 1em; margin: 1em 0; border-left: 2px solid #30363d; color: #8b949e; }
|
||||
pre { background: #0d1117; padding: 12px; overflow-x: auto; font-size: 13px; line-height: 1.5; color: #c9d1d9; border: 1px solid #30363d; }
|
||||
hr { border: none; border-top: 1px solid #30363d; margin: 20px 0; }
|
||||
</style>
|
||||
</head>
|
||||
<body style="margin:0; padding:0; background-color:#0d1117; font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Courier New', monospace; -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:#161b22; border:2px solid #30363d;">
|
||||
|
||||
<div style="padding:24px 28px 16px; border-bottom:2px solid #30363d;">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="vertical-align:middle;">
|
||||
<span style="font-size:16px; font-weight:700; color:#00ff41; letter-spacing:0.5px;">> {{AppName}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div style="padding:28px 28px 20px; color:#c9d1d9;">
|
||||
{{if .IsMention}}<p style="margin:0 0 16px; font-size:14px; line-height:1.6; color:#c9d1d9;">{{.locale.Tr "mail.issue.x_mentioned_you" .Doer.Name}}</p>{{end}}
|
||||
{{if eq .ActionName "push"}}
|
||||
<p style="margin:0 0 16px; font-size:14px; line-height:1.6; color:#c9d1d9;">
|
||||
{{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:#58a6ff; text-decoration:none; font-weight:700;'>%[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:#58a6ff; text-decoration:none; font-weight:700;'>%[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:14px; line-height:1.6; color:#c9d1d9;">
|
||||
{{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:13px; color:#8b949e;">{{$.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:14px; line-height:1.6;">{{.RenderedContent}}</div>
|
||||
</div>
|
||||
{{end -}}
|
||||
|
||||
{{if eq .ActionName "push"}}
|
||||
<ul style="margin:16px 0; padding-left:18px;">
|
||||
{{range .Comment.Commits}}
|
||||
<li style="margin-bottom:6px; font-size:14px;">
|
||||
<a href="{{$.Comment.Issue.PullRequest.BaseRepo.HTMLURL}}/commit/{{.ID}}" style="color:#58a6ff; text-decoration:none; font-weight:700;">
|
||||
{{ShortSha .ID.String}}
|
||||
</a> — {{.MessageTitle}}
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
{{end}}
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="margin:24px 0 20px; border-collapse:separate;">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<a href="{{.Link}}" style="display:inline-block; padding:11px 24px; font-size:14px; font-weight:700; color:#0d1117; text-decoration:none; background-color:#00ff41; border:2px solid #00ff41; font-family:'JetBrains Mono','Fira Code','Consolas',monospace; letter-spacing:0.5px;">$ view_on_{{AppName}}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="background:#0d1117; border:1px solid #30363d; padding:14px 16px; margin:20px 0 12px;">
|
||||
<p style="margin:0 0 6px; font-size:12px; color:#8b949e;">
|
||||
{{.locale.Tr "mail.link_not_working_do_paste"}}
|
||||
</p>
|
||||
<p style="margin:0; font-size:12px; color:#58a6ff; word-break:break-all; line-height:1.6;">
|
||||
┌─<br>
|
||||
│ {{.Link}}<br>
|
||||
└─
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="padding:16px 28px 20px; border-top:1px solid #30363d; background:#0d1117;">
|
||||
<p style="margin:0; font-size:12px; color:#484f58;">
|
||||
<span style="color:#8b949e;">#</span> © <a href="{{AppUrl}}" style="color:#58a6ff; text-decoration:none;">{{AppName}}</a>
|
||||
</p>
|
||||
<p style="margin:4px 0 0; font-size:11px; color:#484f58;">
|
||||
<span style="color:#8b949e;">#</span> if (!$expecting) { ignore(); }
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user