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

123 lines
5.5 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:#e2e8f2 }
/* Header */
.email-logo { display:inline-block;margin:0 auto 8px;border:0;outline:none }
.email-brand { margin:0;font-size:18px;font-weight:700;color:#1e293b;letter-spacing:-0.3px }
.email-header { padding:28px 32px 18px;background:linear-gradient(135deg,#dbeafe,#e0e7ff,#e8f0fe);border-bottom:1px solid #3b82f61a;text-align:center }
/* Card */
.email-card { max-width:600px;margin:24px auto;background:#ffffff;border-radius:16px;box-shadow:0 2px 4px #0000000f,0 8px 24px #0000000f,0 0 0 1px #0000000a;overflow:hidden }
.email-heading { margin:20px 0 8px;font-size:17px;font-weight:600;color:#1e293b }
.email-subheading { margin:20px 0 8px;font-weight:600;color:#1e293b }
.email-text { margin:0 0 16px;font-size:15px;line-height:1.6;color:#475569 }
/* Content */
blockquote { padding-left:1em;margin:1em 0;border-left:2px solid #dbeafe;color:#64748b }
ul { margin:12px 0 16px;padding-left:20px }
li { margin-bottom:6px;font-size:14px;line-height:1.5;color:#475569 }
.email-content { margin:12px 0 16px;font-size:14px;line-height:1.6;color:#475569 }
/* Button */
.email-btn-row { margin:16px 0 24px;border-collapse:separate }
.email-btn { display:inline-block;padding:14px 40px;font-size:15px;font-weight:600;color:#ffffff!important;text-decoration:none;background-color:#3b82f6;border-radius:40px;border:1px solid #3b82f6;letter-spacing:0.2px }
/* Fallback link */
.email-link-box { background:linear-gradient(135deg,#eff4fd,#f5f7fe);border:1px solid #3b82f61a;border-radius:12px;padding:16px 18px;margin:24px 0 16px;box-shadow:inset 0 1px 0 #ffffffe6 }
.email-link-label { margin:0 0 8px;font-size:13px;color:#64748b;line-height:1.5 }
.email-link-url { margin:0;font-size:13px;color:#3b82f6;background:#ffffff;padding:10px 12px;border-radius:8px;border:1px solid #0000000f;word-break:break-all;font-family:monospace }
/* Footer */
.email-footer { padding:18px 32px 22px;background:linear-gradient(135deg,#f8f9fc,#f4f6fb);border-top:1px solid #0000000f;text-align:center }
.email-footer-text { margin:0;font-size:13px;color:#94a3b8 }
.email-footer-link { color:#3b82f6;text-decoration:none;font-weight:500 }
</style>
</head>
<body style="margin:0;padding:0;background:#e2e8f2;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;">
<center style="width:100%;table-layout:fixed;">
<div class="email-card">
<!-- Floating Title -->
<div class="email-header">
<img src="{{AppUrl}}assets/img/favicon.png" alt="logo" width="32" height="32" class="email-logo" />
<p class="email-brand">{{AppName}}</p>
</div>
<!-- Card -->
<div style="padding:32px 32px 24px;color:#334155;">
{{$release_url := HTMLFormat "<a href='%s' style='color:#3b82f6;text-decoration:none;font-weight:500;'>%s</a>" .Release.HTMLURL .Release.TagName}}
{{$repo_url := HTMLFormat "<a href='%s' style='color:#3b82f6;text-decoration:none;font-weight:500;'>%s</a>" .Release.Repo.HTMLURL .Release.Repo.FullName}}
<p class="email-text">
{{.locale.Tr "mail.release.new.text" .Release.Publisher.Name $release_url $repo_url}}
</p>
<h4 class="email-heading">{{.locale.Tr "mail.release.title" .Release.Title}}</h4>
{{if .Release.RenderedNote}}
{{.locale.Tr "mail.release.note"}}<br>
<div class="email-content">
{{.Release.RenderedNote}}
</div>
{{end}}
<p class="email-subheading">{{.locale.Tr "mail.release.downloads"}}</p>
<ul>
{{if not .DisableDownloadSourceArchives}}
<li>
<a href="{{.Release.Repo.HTMLURL}}/archive/{{.Release.TagName | PathEscapeSegments}}.zip" rel="nofollow" style="color:#3b82f6;text-decoration:none;font-weight:500;">{{.locale.Tr "mail.release.download.zip"}}</a>
</li>
<li>
<a href="{{.Release.Repo.HTMLURL}}/archive/{{.Release.TagName | PathEscapeSegments}}.tar.gz" rel="nofollow" style="color:#3b82f6;text-decoration:none;font-weight:500;">{{.locale.Tr "mail.release.download.targz"}}</a>
</li>
{{end}}
{{if .Release.Attachments}}
{{range .Release.Attachments}}
<li>
<a href="{{.DownloadURL}}" target="_blank" style="color:#3b82f6;text-decoration:none;font-weight:500;">{{.Name}} ({{.Size | FormatByteSize}})</a>
</li>
{{end}}
{{end}}
</ul>
<!-- Button -->
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="email-btn-row">
<tr>
<td align="center">
<a href="{{.Link}}" class="email-btn">{{.locale.Tr "mail.view_it_on" AppName}}</a>
</td>
</tr>
</table>
<!-- Fallback link -->
<div class="email-link-box">
<p class="email-link-label">{{.locale.Tr "mail.link_not_working_do_paste"}}</p>
<p class="email-link-url">{{.Link}}</p>
</div>
</div>
<!-- Footer -->
<div class="email-footer">
<p class="email-footer-text">
&copy;
<a href="{{AppUrl}}" class="email-footer-link">{{AppName}}</a>
</p>
</div>
</div>
</center>
</body>
</html>