167 lines
7.4 KiB
Cheetah
167 lines
7.4 KiB
Cheetah
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no">
|
|
<title>{{.Subject}}</title>
|
|
<style>
|
|
blockquote { padding-left: 1em; margin: 1em 0; border-left: 2px solid #A58B5D; color: #666; }
|
|
{{if .ReviewComments}}
|
|
.review { padding-left: 1em; margin: 1em 0; }
|
|
.review > pre { padding: 1em; border-left: 2px solid #A58B5D; background: #F8F9FA; overflow-x: auto; }
|
|
{{end}}
|
|
</style>
|
|
</head>
|
|
<body style="margin:0;padding:0;background-color:#E8E8E8;font-family:system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;">
|
|
<table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" style="background-color:#E8E8E8;">
|
|
<tr>
|
|
<td align="center" style="padding:24px 0;">
|
|
<!-- Container -->
|
|
<table role="presentation" cellpadding="0" cellspacing="0" border="0" width="600" style="max-width:600px;width:100%;border-radius:8px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,0.08);">
|
|
<!-- Header -->
|
|
<tr>
|
|
<td align="center" style="background-color:#FFFFFF;padding:28px 24px;border-bottom:3px solid #A58B5D;">
|
|
<img src="https://biters.it/wp-content/uploads/2023/03/brand-1-2.png" alt="Biters" width="160" height="auto" style="display:block;margin:0 auto;border:0;outline:none;">
|
|
</td>
|
|
</tr>
|
|
<!-- Body -->
|
|
<tr>
|
|
<td style="background-color:#FFFFFF;padding:24px;">
|
|
<!-- Mention notice -->
|
|
{{if .IsMention}}
|
|
<table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:16px;">
|
|
<tr>
|
|
<td style="background-color:#FFF8E1;border-left:4px solid #A58B5D;border-radius:0 4px 4px 0;padding:10px 16px;font-size:13px;color:#7A6A3A;font-family:system-ui,-apple-system,sans-serif;">
|
|
{{.locale.Tr "mail.issue.x_mentioned_you" .Doer.Name }}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
{{end}}
|
|
<!-- Action summary -->
|
|
<table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:16px;">
|
|
<tr>
|
|
<td style="font-size:14px;color:#555555;line-height:1.6;font-family:system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;">
|
|
{{if eq .ActionName "push"}}
|
|
{{if .Comment.IsForcePush}}
|
|
{{$oldCommitLink := printf "<a href='%s/commit/%s' style='color:#A58B5D;'><code>%s</code></a>" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.OldCommit (ShortSha .Comment.OldCommit)}}
|
|
{{$newCommitLink := printf "<a href='%s/commit/%s' style='color:#A58B5D;'><code>%s</code></a>" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.NewCommit (ShortSha .Comment.NewCommit)}}
|
|
{{.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}}
|
|
{{else 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}}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<!-- Content -->
|
|
{{if ne .Body ""}}
|
|
<table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:16px;">
|
|
<tr>
|
|
<td style="background-color:#F8F9FA;border-left:4px solid #A58B5D;border-radius:0 4px 4px 0;padding:16px 20px;font-size:14px;color:#333333;line-height:1.6;font-family:system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;">
|
|
{{.Body }}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
{{else if eq .ActionName "new"}}
|
|
<table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:16px;">
|
|
<tr>
|
|
<td style="background-color:#F8F9FA;border-left:4px solid #A58B5D;border-radius:0 4px 4px 0;padding:16px 20px;font-size:14px;color:#333333;line-height:1.6;font-family:system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;">
|
|
{{.locale.Tr "mail.issue.action.new" .Doer.Name .Issue.Index }}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
{{end}}
|
|
<!-- Review comments -->
|
|
{{- range .ReviewComments}}
|
|
<table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:12px;">
|
|
<tr>
|
|
<td style="font-size:12px;color:#888888;padding-bottom:4px;font-family:system-ui,-apple-system,sans-serif;">
|
|
{{$.locale.Tr "mail.issue.in_tree_path" .TreePath}}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="background-color:#F8F9FA;border-left:4px solid #A58B5D;border-radius:0 4px 4px 0;padding:12px 16px;">
|
|
<pre style="margin:0 0 8px 0;padding:8px;background:#EAEEF2;border-radius:4px;font-size:12px;overflow-x:auto;">{{.Patch}}</pre>
|
|
<div style="font-size:14px;color:#333333;line-height:1.6;">{{.RenderedContent | SanitizeHTML}}</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
{{end -}}
|
|
<!-- Push commits -->
|
|
{{if eq .ActionName "push"}}
|
|
<table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:16px;">
|
|
<tr>
|
|
<td style="padding:8px 0;">
|
|
{{range .Comment.Commits}}
|
|
<table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:4px;">
|
|
<tr>
|
|
<td style="font-size:13px;font-family:system-ui,-apple-system,sans-serif;">
|
|
<a href="{{$.Comment.Issue.PullRequest.BaseRepo.HTMLURL}}/commit/{{.ID}}" style="color:#A58B5D;text-decoration:none;font-family:monospace;">{{ShortSha .ID.String}}</a>
|
|
<span style="color:#333333;"> — {{.Summary}}</span>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
{{end}}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
{{end}}
|
|
<!-- CTA Button -->
|
|
<table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%">
|
|
<tr>
|
|
<td align="center" style="padding:8px 0;">
|
|
<a href="{{.Link}}" style="display:inline-block;background-color:#FFFFFF;color:#1A2A48;text-decoration:none;font-size:14px;font-weight:600;padding:12px 32px;border-radius:6px;border:2px solid #A58B5D;font-family:system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;">Visualizza su Gitea</a>
|
|
</td>
|
|
</tr>
|
|
{{if .CanReply}}
|
|
<tr>
|
|
<td align="center" style="padding-top:4px;font-size:12px;color:#888888;font-family:system-ui,-apple-system,sans-serif;">
|
|
{{.locale.Tr "mail.reply"}}
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<!-- Footer -->
|
|
<tr>
|
|
<td align="center" style="background-color:#F0F0F0;padding:24px;">
|
|
<table role="presentation" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td align="center" style="padding-bottom:10px;">
|
|
<img src="https://biters.it/wp-content/uploads/2023/06/Logo-Biters-Negativo-Bianco-e-Nero-1-854x1024.png" alt="Biters" width="40" height="auto" style="display:block;margin:0 auto;border:0;outline:none;opacity:0.4;">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center" style="font-size:12px;color:#888888;font-family:system-ui,-apple-system,sans-serif;">
|
|
Powered by <a href="https://biters.it" style="color:#A58B5D;text-decoration:none;font-weight:600;">Biters</a>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|