Files
GiteaMailTemplates/themes/mono/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

153 lines
6.2 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:#fafafa }
.email-wrap { max-width:600px;margin:20px auto;font-family:system-ui,-apple-system,sans-serif;background:#fff;border:2px solid #000 }
/* Header */
.email-logo { display:inline-block;vertical-align:middle;margin-right:8px;border:0;outline:none }
.email-brand { font-size:14px;font-weight:900;color:#000;letter-spacing:-0.5px;text-transform:uppercase }
.email-brand-star { color:#e03131;margin-left:4px }
.email-header { padding:24px 32px 0 }
/* Card */
.email-card { padding:32px 0 0;vertical-align:top }
.email-heading { margin:0 0 32px;font-size:28px;font-weight:900;color:#000;line-height:1.1;letter-spacing:-1px }
.email-text { margin:0 0 8px;font-size:13px;line-height:1.8;color:#333;font-weight:500 }
.email-subtext { margin:0 0 32px;font-size:12px;line-height:1.8;color:#888;border-left:2px solid #e03131;padding-left:12px }
/* Button */
.email-btn-row { padding:0 32px 24px }
.email-btn { display:inline-block;padding:14px 32px;font-size:14px;font-weight:900;color:#000!important;text-decoration:none;border:2px solid #000;letter-spacing:-0.3px;text-transform:uppercase }
.email-btn-table { margin:0 }
/* Fallback link */
.email-link-box { margin-top:24px;border:1px solid #ccc;background:#f5f5f5 }
.email-link-label { margin:0 0 6px;font-size:11px;color:#888 }
.email-link-url { margin:0;font-size:11px;font-family:monospace;color:#000;background:#fff;padding:8px 10px;border:1px solid #000;word-break:break-all }
/* Footer */
.email-footer { padding:16px 32px;border-top:2px solid #000 }
.email-footer-text { margin:0;font-size:11px;color:#888 }
.email-footer-link { color:#e03131;text-decoration:underline;font-weight:600 }
/* Typography utilities */
.card-body a,.card-body a:link,.card-body a:visited { color:#000!important;text-decoration:underline!important;font-weight:600!important }
.card-body h4 { color:#000!important;margin:16px 0 8px!important;font-size:16px!important;font-weight:900!important }
.card-body ul { margin:0 0 16px!important;padding-left:20px!important }
/* Responsive */
@media only screen and (max-width:480px) {
.email-header { padding-left:16px!important;padding-right:16px!important }
.email-card { width:100%!important;display:block!important }
.resp-hide { display:none!important }
.email-btn { display:block!important;width:auto!important }
.email-heading { font-size:22px!important }
.email-footer { padding-left:16px!important;padding-right:16px!important }
}
</style>
</head>
<body style="margin:0;padding:0;background:#fafafa;-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">
<span class="email-brand">{{AppName}}<span class="email-brand-star">*</span></span>
</td>
</tr>
<!-- Card -->
<tr>
<td class="resp-pad" style="padding:0 32px;">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="60%" class="email-card card-body">
{{$release_url := HTMLFormat "<a href='%s'>%s</a>" .Release.HTMLURL .Release.TagName}}
{{$repo_url := HTMLFormat "<a href='%s'>%s</a>" .Release.Repo.HTMLURL .Release.Repo.FullName}}
<p class="email-heading">
{{.locale.Tr "mail.release.new.text" .Release.Publisher.Name $release_url $repo_url}}
</p>
<h4>{{.locale.Tr "mail.release.title" .Release.Title}}</h4>
{{if .Release.RenderedNote}}
{{.locale.Tr "mail.release.note"}}<br>
<div class="mono-content">{{.Release.RenderedNote}}</div>
{{end}}
<p style="margin:16px 0 8px;font-weight:900;color:#000;">{{.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>
</td>
<td width="40%" class="resp-hide" style="padding:32px 0 0;vertical-align:top;"></td>
</tr>
</table>
</td>
</tr>
<!-- Button & Link -->
<tr>
<td class="email-btn-row">
<table border="0" cellpadding="0" cellspacing="0" class="email-btn-table">
<tr>
<td>
<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:12px 16px;">
<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">
<a href="{{AppUrl}}" class="email-footer-link">{{AppName}}</a>
</p>
</td>
</tr>
</table>
</center>
</body>
</html>