feat: issue template
This commit is contained in:
parent
d4d71f5ad1
commit
cb9e91d2fb
|
@ -3,4 +3,5 @@
|
||||||
Email templates for Forgejo/Gitea.
|
Email templates for Forgejo/Gitea.
|
||||||
|
|
||||||
## Installion
|
## Installion
|
||||||
|
|
||||||
Clone this repo into `custom/templates/mail` and restart Forgejo/Gitea.
|
Clone this repo into `custom/templates/mail` and restart Forgejo/Gitea.
|
179
issue/default.tmpl
Normal file
179
issue/default.tmpl
Normal file
|
@ -0,0 +1,179 @@
|
||||||
|
[{{.Repo}}] @{{.Doer.Name}}
|
||||||
|
{{if eq .ActionName "new"}}
|
||||||
|
created
|
||||||
|
{{else if eq .ActionName "comment"}}
|
||||||
|
commented on
|
||||||
|
{{else if eq .ActionName "close"}}
|
||||||
|
closed
|
||||||
|
{{else if eq .ActionName "reopen"}}
|
||||||
|
reopened
|
||||||
|
{{else}}
|
||||||
|
updated
|
||||||
|
{{end}}
|
||||||
|
{{if eq .ActionType "issue"}}
|
||||||
|
issue
|
||||||
|
{{else}}
|
||||||
|
pull request
|
||||||
|
{{end}}
|
||||||
|
#{{.Issue.Index}}: {{.Issue.Title}}
|
||||||
|
------------
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<!-- Compiled with Bootstrap Email version: 1.4.0 --><meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||||
|
<meta name="x-apple-disable-message-reformatting">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
|
<title>{{.Subject}}</title>
|
||||||
|
<style type="text/css">
|
||||||
|
body,table,td{font-family:Helvetica,Arial,sans-serif !important}.ExternalClass{width:100%}.ExternalClass,.ExternalClass p,.ExternalClass span,.ExternalClass font,.ExternalClass td,.ExternalClass div{line-height:150%}a{text-decoration:none}*{color:inherit}a[x-apple-data-detectors],u+#body a,#MessageViewBody a{color:inherit;text-decoration:none;font-size:inherit;font-family:inherit;font-weight:inherit;line-height:inherit}img{-ms-interpolation-mode:bicubic}table:not([class^=s-]){font-family:Helvetica,Arial,sans-serif;mso-table-lspace:0pt;mso-table-rspace:0pt;border-spacing:0px;border-collapse:collapse}table:not([class^=s-]) td{border-spacing:0px;border-collapse:collapse}@media screen and (max-width: 600px){.w-full,.w-full>tbody>tr>td{width:100% !important}.w-24,.w-24>tbody>tr>td{width:96px !important}.p-lg-10:not(table),.p-lg-10:not(.btn)>tbody>tr>td,.p-lg-10.btn td a{padding:0 !important}.p-3:not(table),.p-3:not(.btn)>tbody>tr>td,.p-3.btn td a{padding:12px !important}.p-6:not(table),.p-6:not(.btn)>tbody>tr>td,.p-6.btn td a{padding:24px !important}*[class*=s-lg-]>tbody>tr>td{font-size:0 !important;line-height:0 !important;height:0 !important}.s-4>tbody>tr>td{font-size:16px !important;line-height:16px !important;height:16px !important}.s-6>tbody>tr>td{font-size:24px !important;line-height:24px !important;height:24px !important}.s-10>tbody>tr>td{font-size:40px !important;line-height:40px !important;height:40px !important}}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body class="bg-light" style="outline: 0; width: 100%; min-width: 100%; height: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; font-family: Helvetica, Arial, sans-serif; line-height: 24px; font-weight: normal; font-size: 16px; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; color: #000000; margin: 0; padding: 0; border-width: 0;" bgcolor="#f7fafc">
|
||||||
|
<table class="bg-light body" valign="top" role="presentation" border="0" cellpadding="0" cellspacing="0" style="outline: 0; width: 100%; min-width: 100%; height: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; font-family: Helvetica, Arial, sans-serif; line-height: 24px; font-weight: normal; font-size: 16px; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; color: #000000; margin: 0; padding: 0; border-width: 0;" bgcolor="#f7fafc">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" style="line-height: 24px; font-size: 16px; margin: 0;" align="left" bgcolor="#f7fafc">
|
||||||
|
<table class="container" role="presentation" border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td align="center" style="line-height: 24px; font-size: 16px; margin: 0; padding: 0 16px;">
|
||||||
|
<!--[if (gte mso 9)|(IE)]>
|
||||||
|
<table align="center" role="presentation">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td width="600">
|
||||||
|
<![endif]-->
|
||||||
|
<table align="center" role="presentation" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 600px; margin: 0 auto;">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="line-height: 24px; font-size: 16px; margin: 0;" align="left">
|
||||||
|
<table class="s-10 w-full" role="presentation" border="0" cellpadding="0" cellspacing="0" style="width: 100%;" width="100%">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="line-height: 40px; font-size: 40px; width: 100%; height: 40px; margin: 0;" align="left" width="100%" height="40">
|
||||||
|
 
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<table class="ax-center" role="presentation" align="center" border="0" cellpadding="0" cellspacing="0" style="margin: 0 auto;">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="line-height: 24px; font-size: 16px; margin: 0;" align="left">
|
||||||
|
<img class="w-24" src="{{AppUrl}}/assets/img/logo.svg" style="height: auto; line-height: 100%; outline: none; text-decoration: none; display: block; width: 96px; border-style: none; border-width: 0;" width="96">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<table class="s-10 w-full" role="presentation" border="0" cellpadding="0" cellspacing="0" style="width: 100%;" width="100%">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="line-height: 40px; font-size: 40px; width: 100%; height: 40px; margin: 0;" align="left" width="100%" height="40">
|
||||||
|
 
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<table class="card p-6 p-lg-10 space-y-4" role="presentation" border="0" cellpadding="0" cellspacing="0" style="border-radius: 6px; border-collapse: separate !important; width: 100%; overflow: hidden; border: 1px solid #e2e8f0;" bgcolor="#ffffff">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="line-height: 24px; font-size: 16px; width: 100%; margin: 0; padding: 40px;" align="left" bgcolor="#ffffff">
|
||||||
|
<h1 class="h3 fw-700" style="padding-top: 0; padding-bottom: 0; font-weight: 700 !important; vertical-align: baseline; font-size: 28px; line-height: 33.6px; margin: 0;" align="left">
|
||||||
|
@{{.Doer.Name}}
|
||||||
|
{{if not (eq .Doer.FullName "")}}
|
||||||
|
({{.Doer.FullName}})
|
||||||
|
{{end}}
|
||||||
|
{{if eq .ActionName "new"}}
|
||||||
|
created
|
||||||
|
{{else if eq .ActionName "close"}}
|
||||||
|
closed
|
||||||
|
{{else if eq .ActionName "reopen"}}
|
||||||
|
reopened
|
||||||
|
{{else}}
|
||||||
|
updated
|
||||||
|
{{end}}
|
||||||
|
</h1>
|
||||||
|
<table class="s-4 w-full" role="presentation" border="0" cellpadding="0" cellspacing="0" style="width: 100%;" width="100%">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="line-height: 16px; font-size: 16px; width: 100%; height: 16px; margin: 0;" align="left" width="100%" height="16">
|
||||||
|
 
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{{if not (eq .Body "")}}
|
||||||
|
<p class="" style="line-height: 24px; font-size: 16px; width: 100%; margin: 0;" align="left">
|
||||||
|
{{.Body | Str2html}}
|
||||||
|
</p>
|
||||||
|
<table class="s-4 w-full" role="presentation" border="0" cellpadding="0" cellspacing="0" style="width: 100%;" width="100%">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="line-height: 16px; font-size: 16px; width: 100%; height: 16px; margin: 0;" align="left" width="100%" height="16">
|
||||||
|
 
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{{end}}
|
||||||
|
<table class="btn btn-primary p-3 fw-700" role="presentation" border="0" cellpadding="0" cellspacing="0" style="border-radius: 6px; border-collapse: separate !important; font-weight: 700 !important;">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="line-height: 24px; font-size: 16px; border-radius: 6px; font-weight: 700 !important; margin: 0;" align="center" bgcolor="#0d6efd">
|
||||||
|
<a href="{{.Link}}" style="color: #ffffff; font-size: 16px; font-family: Helvetica, Arial, sans-serif; text-decoration: none; border-radius: 6px; line-height: 20px; display: block; font-weight: 700 !important; white-space: nowrap; background-color: #0d6efd; padding: 12px; border: 1px solid #0d6efd;">Visit Issue</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<table class="s-6 w-full" role="presentation" border="0" cellpadding="0" cellspacing="0" style="width: 100%;" width="100%">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="line-height: 24px; font-size: 24px; width: 100%; height: 24px; margin: 0;" align="left" width="100%" height="24">
|
||||||
|
 
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="">
|
||||||
|
<p class="text-muted text-center" style="line-height: 24px; font-size: 16px; color: #718096; width: 100%; margin: 0;" align="center">{{AppName}}</p>
|
||||||
|
<p class="text-green-500 text-center" style="line-height: 24px; font-size: 16px; color: #198754; width: 100%; margin: 0;" align="center">
|
||||||
|
{{if .IsMention}}
|
||||||
|
You are receiving this because @{{.Doer.Name}} mentioned you.
|
||||||
|
{{end}}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<table class="s-6 w-full" role="presentation" border="0" cellpadding="0" cellspacing="0" style="width: 100%;" width="100%">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="line-height: 24px; font-size: 24px; width: 100%; height: 24px; margin: 0;" align="left" width="100%" height="24">
|
||||||
|
 
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<!--[if (gte mso 9)|(IE)]>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<![endif]-->
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
48
src/default.html
Normal file
48
src/default.html
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
|
||||||
|
<title>{{.Subject}}</title>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/* Add custom classes and styles that you want inlined here */
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body class="bg-light">
|
||||||
|
<div class="container">
|
||||||
|
<img class="ax-center my-10 w-24" src="{{AppUrl}}/assets/img/logo.svg" />
|
||||||
|
<div class="card p-6 p-lg-10 space-y-4">
|
||||||
|
<h1 class="h3 fw-700">
|
||||||
|
@{{.Doer.Name}}
|
||||||
|
|
||||||
|
{{if not (eq .Doer.FullName "")}}
|
||||||
|
({{.Doer.FullName}})
|
||||||
|
{{end}}
|
||||||
|
{{if eq .ActionName "new"}}
|
||||||
|
created
|
||||||
|
{{else if eq .ActionName "close"}}
|
||||||
|
closed
|
||||||
|
{{else if eq .ActionName "reopen"}}
|
||||||
|
reopened
|
||||||
|
{{else}}
|
||||||
|
updated
|
||||||
|
{{end}}
|
||||||
|
</h1>
|
||||||
|
{{if not (eq .Body "")}}
|
||||||
|
<p>
|
||||||
|
{{.Body | Str2html}}
|
||||||
|
</p>
|
||||||
|
{{end}}
|
||||||
|
<a class="btn btn-primary p-3 fw-700" href="{{.Link}}">Visit Issue</a>
|
||||||
|
</div>
|
||||||
|
<div class="my-6">
|
||||||
|
<p class="text-muted text-center">{{AppName}}</p>
|
||||||
|
<p class="text-green-500 text-center">
|
||||||
|
{{if .IsMention}}
|
||||||
|
You are receiving this because @{{.Doer.Name}} mentioned you.
|
||||||
|
{{end}}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in a new issue