Files
GiteaMailTemplates/themes/aurora/mail/repo/release.tmpl
T
KenanZhu 92d2ba9889
Release / Validate Templates (push) Canceled after 0s
Release / Package & Release (push) Canceled after 0s
fix: support Gitea 28.0.0 mail templates
2026-10-02 19:44:20 +08:00

167 lines
6.8 KiB
Cheetah

<!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" />
<meta name="x-apple-disable-message-reformatting" />
<title>
{{.Subject}}
</title>
<style type="text/css">
/* Base */
body,.ExternalClass,.ReadMsgBody { background-color:#0a0815 }
.email-wrap { max-width:600px;margin:40px auto;font-family:system-ui,-apple-system,sans-serif }
/* Header */
.email-logo { display:block;margin:0 auto 14px;border:0;outline:none;opacity:0.5 }
.email-brand { font-size:16px;font-weight:300;color:#ffffff66;letter-spacing:4px;text-transform:uppercase }
.email-header { padding:0 0 32px;text-align:center }
/* Card */
.email-card { padding:48px 40px;background:#191432cc;border:1px solid #0d948833;box-shadow:0 0 60px #0d948814,0 0 120px #6366f10a }
.email-heading { margin:0 0 20px;font-size:24px;font-weight:300;color:#ccfbf1;line-height:1.3;letter-spacing:-.5px }
.email-text { margin:0 0 24px;font-size:14px;line-height:2;color:#d2fcf5e0;font-weight:300 }
.email-subtext { margin:0;font-size:13px;line-height:1.8;color:#b4c3d7f2;font-weight:300 }
/* Divider */
.email-divider { height:1px;background:linear-gradient(90deg,transparent,#0d94884d,transparent) }
/* Button */
.email-btn-row { padding:40px 40px;text-align:center }
.email-btn { display:inline-block;padding:16px 48px;font-size:14px;font-weight:400;color:#e0f5f3!important;text-decoration:none;background:#0d94882e;border:1px solid #0d94884d;letter-spacing:1px }
.email-btn-table { margin:0 0 32px }
/* Fallback link */
.email-link-box { border:1px solid #0d94882e;background:#0d948808 }
.email-link-label { margin:0 0 8px;font-size:11px;color:#b4fceebf;font-weight:300 }
.email-link-url { margin:0;font-size:11px;font-family:monospace;color:#99f6e4;background:#00000033;padding:10px 12px;border:1px solid #0d948826;word-break:break-all }
/* Footer */
.email-footer { padding:32px 0 0;text-align:center }
.email-footer-text { margin:0;font-size:11px;color:#a0afc88c;font-weight:300 }
.email-footer-link { color:#5eead480;text-decoration:none;font-weight:400 }
/* Typography utilities */
.card-body h1,.card-body h2,.card-body h3,.card-body h4,.card-body h5,.card-body h6 { color:#ccfbf1!important }
.card-body a,.card-body a:link,.card-body a:visited { color:#5eead4!important;text-decoration:underline!important }
.card-body a:hover,.card-body a:active { color:#99f6e4!important }
.card-body li { color:#d2fcf5e0!important }
/* Content */
.aurora-content,.aurora-content * { color:#d2fcf5e0!important }
.aurora-content a,.aurora-content a:link,.aurora-content a:visited { color:#5eead4!important;text-decoration:underline!important }
.aurora-content a:hover,.aurora-content a:active { color:#99f6e4!important }
.aurora-content code,.aurora-content pre { color:#99f6e4!important;background:#0000004d!important;border-color:#0d948833!important }
.aurora-content blockquote { color:#ffffff99!important }
.aurora-content h1,.aurora-content h2,.aurora-content h3,.aurora-content h4,.aurora-content h5,.aurora-content h6 { color:#ccfbf1!important }
.aurora-content hr { border-color:#0d94884d!important }
.aurora-content img { border:0;max-width:100%!important }
/* Responsive */
@media only screen and (max-width:480px) {
.email-card { padding:32px 20px!important }
.email-btn-row { padding:24px 20px!important }
.email-heading { font-size:20px!important }
}
</style>
</head>
<body style="margin:0;padding:0;background:#0a0815;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;">
<center style="width:100%;table-layout:fixed;">
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="email-wrap">
<!-- Floating Title -->
<tr>
<td class="email-header">
<img src="{{AppUrl}}assets/img/favicon.png" alt="logo" width="24" height="24" class="email-logo" />
<span class="email-brand">{{AppName}}</span>
</td>
</tr>
<!-- Card -->
<tr>
<td class="email-card card-body">
<p class="email-heading"></p>
<p class="email-text">
{{$release_url := HTMLFormat "<a href=\047%s\047>%s</a>" .Release.HTMLURL .Release.TagName}}
{{$repo_url := HTMLFormat "<a href=\047%s\047>%s</a>" .Release.Repo.HTMLURL .Release.Repo.FullName}}
{{.locale.Tr "mail.release.new.text" .Release.Publisher.Name $release_url $repo_url}}
<h4>{{.locale.Tr "mail.release.title" .Release.Title}}</h4>
{{if .Release.RenderedNote}}
<p class="email-text">{{.locale.Tr "mail.release.note"}}</p>
<div class="aurora-content" style="font-size:14px;line-height:2;">{{.Release.RenderedNote}}</div>
{{end}}
<p class="email-text">{{.locale.Tr "mail.release.downloads"}}</p>
<ul>
{{if not .DisableDownloadSourceArchives}}
<li><a href="{{.Release.Repo.HTMLURL}}/archive/{{.Release.TagName | PathEscapeSegments}}.zip">{{.locale.Tr "mail.release.download.zip"}}</a></li>
<li><a href="{{.Release.Repo.HTMLURL}}/archive/{{.Release.TagName | PathEscapeSegments}}.tar.gz">{{.locale.Tr "mail.release.download.targz"}}</a></li>
{{end}}
{{if .Release.Attachments}}
{{range .Release.Attachments}}
<li><a href="{{.DownloadURL}}">{{.Name}} ({{.Size | FormatByteSize}})</a></li>
{{end}}
{{end}}
</ul>
</p>
<p class="email-subtext"></p>
</td>
</tr>
<!-- Divider -->
<tr>
<td class="email-divider"></td>
</tr>
<!-- Button & Link -->
<tr>
<td class="email-btn-row">
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="email-btn-table">
<tr>
<td align="center">
<a href="{{.Link}}" class="email-btn">{{.locale.Tr "mail.view_it_on" AppName}}</a>
</td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="email-link-box">
<tr>
<td style="padding:16px 18px;">
<p class="email-link-label">{{.locale.Tr "mail.link_not_working_do_paste"}}</p>
<p class="email-link-url">{{.Link}}</p>
</td>
</tr>
</table>
</td>
</tr>
<!-- Footer -->
<tr>
<td class="email-footer">
<p class="email-footer-text">
&copy;
<a href="{{AppUrl}}" class="email-footer-link">{{AppName}}</a>
</p>
</td>
</tr>
</table>
</center>
</body>
</html>