commit a2742887e8b1d3a16458692ddefbb7616a836370 Author: KenanZhu <3471685733@qq.com> Date: Wed Jun 3 18:10:22 2026 +0800 chore(init): scaffold Gitea mail templates — 110 templates, 10 visual styles, drop-in deployment Co-Authored-By: Claude Opus 4.8 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..02ac5bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,22 @@ +# Dependencies +node_modules/ +vendor/ + +# OS files +.DS_Store +Thumbs.db +Desktop.ini + +# Editor files +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# Build artifacts +*.zip +*.tar.gz + +# Generated preview data (run: go run ./tools/build-preview.go) +preview/rendered.js diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..7a6d216 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,64 @@ +# AGENTS.md — Gitea Mail Templates + +## Project Overview + +A curated collection of email template themes (10 visual styles) for self-hosted Gitea instances. Each theme contains 11 Go `html/template` files covering all Gitea notification email types. + +## Repository Layout + +``` +themes/ # Template themes (5 styles, 11 .tmpl each = 55 source files) + horizon/ # Enterprise / Corporate + terminal/ # Developers / Tech + ember/ # Community / Open Source + bloom/ # Creative / Startup (glassmorphism) + heritage/ # Education / Research +tools/ # Go build tooling + build-preview.go # Pre-renders all templates into preview/rendered.js + go.mod # Go module (stdlib only, zero dependencies) +preview/ # Browser-based live preview + index.html # SPA with style/template/client/viewport switching + rendered.js # Pre-rendered HTML (generated, committed for clone-and-preview) +docs/ # Multi-language documentation +``` + +## Working With Templates + +### Template Files +- All `.tmpl` files use Go `html/template` syntax +- Must use only Gitea's built-in template functions: `AppUrl`, `DotEscape`, `QueryEscape`, `ShortSha`, `HTMLFormat`, `PathEscapeSegments`, `FileSize` +- Must use only official Gitea translation keys (`mail.*` namespace) +- Never reference `.DisplayName` in templates where the data context lacks it (collaborator, transfer, release, workflow_run, assigned, default) +- Each style must have all 11 template types + +### Adding a New Theme +1. Create `themes//` with the full `mail/` directory structure +2. Write all 11 `.tmpl` files with unique visual design +3. Run `go run ./tools/build-preview.go` to regenerate preview data +4. Add the theme to the `` in `preview/index.html` +7. Submit a PR with screenshots of rendered emails + +### Style Guidelines + +- Each style must include **all 11 template types** listed in the README +- Use only Gitea's built-in template functions — check the [Gitea source](https://github.com/go-gitea/gitea) for reference +- Translation keys must come from Gitea's official locale files (`mail.*` namespace) +- **Never reference `.DisplayName`** in templates where the data context lacks it (collaborator, transfer, release, workflow_run, assigned, default) +- Design for 600px max-width email clients +- Test against major email clients (Gmail, Outlook, Apple Mail) when possible + +### Bug Reports + +If a template doesn't render correctly: + +1. Check that all referenced Go template variables exist — compare against the Gitea source mail templates +2. Verify translation keys match Gitea's locale files +3. Confirm `.DisplayName` isn't used in templates that lack it +4. Regenerate the preview: `go run ./tools/build-preview.go` +5. Open an issue with: the style name, which email type, and the error or unexpected output + +### Documentation Improvements + +Documentation updates, preview screenshots, installation guides, and translations are always welcome. + +--- + +## Development Setup + +No build tools or dependencies are needed — these are raw Go HTML templates. + +### Previewing Locally + +1. Open `preview/index.html` directly in a browser — no server needed +2. Use the theme switcher, template selector, and client mode toggles to review designs +3. Toggle between Modern, Gmail, Outlook, and Raw source modes to verify degradation + +### Regenerating Previews + +```bash +go run ./tools/build-preview.go +``` + +This renders all templates (themes auto-discovered from the themes/ directory) using Go's native `html/template` package and writes the output to `preview/rendered.js`. + +### Integration Testing + +Deploy the templates to a Gitea instance and use the admin test email feature: +**Site Administration > Configuration > Mailer > Send Test Email** + +--- + +## Commit Conventions + +- `style(horizon|terminal|ember|bloom|heritage|neon|mono|terra|ink|aurora):` — template changes +- `preview:` — preview tooling changes +- `tools:` — Go build script changes +- `docs:` — documentation and translations +- `fix:` — bug fixes +- `project:` — README, LICENSE, AGENTS.md, meta + +--- + +## Translations + +- [English](CONTRIBUTING.md) +- [Simplified Chinese](docs/CONTRIBUTING.zh-CN.md) +- [Traditional Chinese](docs/CONTRIBUTING.zh-TW.md) +- [Russian](docs/CONTRIBUTING.ru.md) +- [Japanese](docs/CONTRIBUTING.ja.md) +- [Korean](docs/CONTRIBUTING.ko.md) + +--- + +## License + +By contributing, you agree that your contributions will be licensed under the MIT License. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..fcaccaf --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Gitea Mail Templates Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..5bd06a8 --- /dev/null +++ b/README.md @@ -0,0 +1,191 @@ +# Gitea Mail Templates + +A curated collection of professionally designed, audience-driven email templates for self-hosted [Gitea](https://about.gitea.com) instances. + +> **110 template files — 10 visual styles, 11 email types each** + +--- + +## Philosophy + +Most self-hosted Gitea instances use the default plain email templates. This project provides **ready-to-deploy, visually polished alternatives** — each designed for a specific community or audience, so you can pick the one that feels right for your users. + +Every template is a drop-in replacement. All Go template variables, translation keys, and Gitea data contexts are fully compatible. **No patches, no plugins, no forks required.** + +--- + +## Style Gallery + +| Preview | Style | Audience | Character | +|---|---|---|---| +| ![Horizon](docs/images/horizon.png) | **Horizon** | Enterprise / Corporate | Blue accent, slate typography, centered cards | +| ![Terminal](docs/images/terminal.png) | **Terminal** | Developers / Tech | Dark mode, monospace, green CLI accents | +| ![Ember](docs/images/ember.png) | **Ember** | Community / Open Source | Warm amber, rounded, humanist, inclusive | +| ![Bloom](docs/images/bloom.png) | **Bloom** | Creative / Startup | Frosted glass, soft blue light, iridescent accents | +| ![Heritage](docs/images/heritage.png) | **Heritage** | Education / Research | Navy and gold, serif, classic, authoritative | +| ![Neon](docs/images/neon.png) | **Neon** | Gaming / Web3 / Creative Tech | Cyberpunk neon glow, hot pink & cyan, synthwave energy | +| ![Mono](docs/images/mono.png) | **Mono** | Design Studios / Editorial | Swiss brutalist, black & white, red accent, zero radius | +| ![Terra](docs/images/terra.png) | **Terra** | Sustainability / Wellness | Warm earth tones, organic textures, humanist serif | +| ![Ink](docs/images/ink.png) | **Ink** | Publishing / News / Literature | Editorial print, navy & gold, newspaper layout, drop caps | +| ![Aurora](docs/images/aurora.png) | **Aurora** | Premium SaaS / Mindfulness | Ethereal light gradients, deep purple & teal, atmospheric glow | + +> Images are 600px screenshots from the [live preview](preview/index.html). See [docs/images/README.md](docs/images/README.md) for capture instructions. + +[**Live preview gallery**](preview/index.html) — open in a browser for an interactive style switcher with desktop/mobile viewports and email client simulation (Modern, Gmail, Outlook, Raw source). + +--- + +## Installation + +### Quick Start + +Choose a style, then copy the `mail/` directory into your Gitea custom templates path: + +```bash +# Locate your Gitea custom directory +# (set by GITEA_CUSTOM; defaults shown below) + +# Copy templates (example: Horizon style) +cp -r themes/horizon/mail/* /var/lib/gitea/custom/templates/mail/ + +# Restart Gitea +systemctl restart gitea +``` + +### Custom Directory Location + +| Platform | Default Path | +|---|---| +| Linux (binary) | `/var/lib/gitea/custom` | +| Linux (Docker) | `/data/gitea` | +| Windows | `C:\gitea\custom` | + +### Switching Styles + +Overwrite the files with a different style. All templates share the exact same variable structure — no configuration changes needed. + +```bash +cp -r themes/terminal/mail/* /var/lib/gitea/custom/templates/mail/ +systemctl restart gitea +``` + +### Confirming It Works + +Send a test email from the Gitea admin panel: +**Site Administration > Configuration > Mailer > Send Test Email** + +--- + +## Preview + +A live preview tool is included to browse all styles and email types without deploying to a Gitea instance. + +### Quick Start + +First, generate the preview data (requires Go): + +```bash +go run ./tools/build-preview.go +``` + +Then open `preview/index.html` directly in a browser. No server required. + +> `preview/rendered.js` is generated and git-ignored. Re-run the command after modifying templates. + +### Features + +- Theme switcher — toggle between all 5 visual styles +- Template switcher — browse all 11 email types +- Client simulation — Modern, Gmail (no ` + + + + + +
+
+
+
+
+ Loading pre-rendered templates... +
+ +
+
+ + +
+ + + + + \ No newline at end of file diff --git a/themes/aurora/mail/org/team_invite.tmpl b/themes/aurora/mail/org/team_invite.tmpl new file mode 100644 index 0000000..4920392 --- /dev/null +++ b/themes/aurora/mail/org/team_invite.tmpl @@ -0,0 +1,50 @@ + + + + + + + {{AppName}} - Team Invitation + + + +
+ + + + + + + + + + +
+ logo + {{AppName}} +
+

{{.locale.Tr "mail.hi_user_x" .Invite.Email}}

+

{{.locale.Tr "mail.team_invite.text_1" (DotEscape .Inviter.DisplayName) (DotEscape .Team.Name) (DotEscape .Organization.DisplayName)}}

+

{{.locale.Tr "mail.team_invite.text_2"}}

+
+ +
+ Accept Invitation +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.InviteURL}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/aurora/mail/repo/actions/workflow_run.tmpl b/themes/aurora/mail/repo/actions/workflow_run.tmpl new file mode 100644 index 0000000..f2cb5f2 --- /dev/null +++ b/themes/aurora/mail/repo/actions/workflow_run.tmpl @@ -0,0 +1,50 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + + +
+ logo + {{AppName}} +
+

+

{{.Repo.FullName}} - {{.Run.WorkflowID}}: {{.RunStatusText}}

+

+
+ +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Run.HTMLURL}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/aurora/mail/repo/collaborator.tmpl b/themes/aurora/mail/repo/collaborator.tmpl new file mode 100644 index 0000000..5939605 --- /dev/null +++ b/themes/aurora/mail/repo/collaborator.tmpl @@ -0,0 +1,50 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + + +
+ logo + {{AppName}} +
+

+

{{.locale.Tr "mail.repo.collaborator.added.text"}} {{.RepoName}}.

+

+
+ +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/aurora/mail/repo/issue/assigned.tmpl b/themes/aurora/mail/repo/issue/assigned.tmpl new file mode 100644 index 0000000..540fe3b --- /dev/null +++ b/themes/aurora/mail/repo/issue/assigned.tmpl @@ -0,0 +1,50 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + + +
+ logo + {{AppName}} +
+

+

{{$repo_url := HTMLFormat "%s" .Issue.Repo.HTMLURL .Issue.Repo.FullName}}{{$link := HTMLFormat "#%d" .Link .Issue.Index}}{{if .IsPull}}{{.locale.Tr "mail.issue_assigned.pull" .Doer.Name $link $repo_url}}{{else}}{{.locale.Tr "mail.issue_assigned.issue" .Doer.Name $link $repo_url}}{{end}}

+

+
+ +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/aurora/mail/repo/issue/default.tmpl b/themes/aurora/mail/repo/issue/default.tmpl new file mode 100644 index 0000000..42c8eb4 --- /dev/null +++ b/themes/aurora/mail/repo/issue/default.tmpl @@ -0,0 +1,50 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + + +
+ logo + {{AppName}} +
+

+

{{if .IsMention}}

{{.locale.Tr "mail.issue.x_mentioned_you" .Doer.Name}}

{{end}}{{if eq .ActionName "push"}}

{{if .Comment.IsForcePush}}{{$oldCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.OldCommit}}{{$oldShortSha := ShortSha .Comment.OldCommit}}{{$oldCommitLink := HTMLFormat "%[2]s" $oldCommitUrl $oldShortSha}}{{$newCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.NewCommit}}{{$newShortSha := ShortSha .Comment.NewCommit}}{{$newCommitLink := HTMLFormat "%[2]s" $newCommitUrl $newShortSha}}{{.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}}

{{end}}

{{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}}{{- if eq .Body ""}}{{if eq .ActionName "new"}}{{.locale.Tr "mail.issue.action.new" .Doer.Name .Issue.Index}}{{end}}{{else}}{{.Body}}{{end -}}

{{- range .ReviewComments}}

{{$.locale.Tr "mail.issue.in_tree_path" .TreePath}}

{{.Patch}}
{{.RenderedContent}}
{{end -}}{{if eq .ActionName "push"}}{{end}}

+

+
+ +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/aurora/mail/repo/release.tmpl b/themes/aurora/mail/repo/release.tmpl new file mode 100644 index 0000000..47a0f00 --- /dev/null +++ b/themes/aurora/mail/repo/release.tmpl @@ -0,0 +1,54 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + + +
+ logo + {{AppName}} +
+

+

{{$release_url := HTMLFormat "%s" .Release.HTMLURL .Release.TagName}}{{$repo_url := HTMLFormat "%s" .Release.Repo.HTMLURL .Release.Repo.FullName}}{{.locale.Tr "mail.release.new.text" .Release.Publisher.Name $release_url $repo_url}} +

{{.locale.Tr "mail.release.title" .Release.Title}}

+{{if .Release.RenderedNote}}
{{.Release.RenderedNote}}
{{end}} +

{{.locale.Tr "mail.release.downloads"}}

+

+

+
+ +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/aurora/mail/repo/transfer.tmpl b/themes/aurora/mail/repo/transfer.tmpl new file mode 100644 index 0000000..2d33b0a --- /dev/null +++ b/themes/aurora/mail/repo/transfer.tmpl @@ -0,0 +1,50 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + + +
+ logo + {{AppName}} +
+

+

{{$url := HTMLFormat "%[2]s" .Link .Repo}}{{.Subject}}. {{.locale.Tr "mail.repo.transfer.body" $url}}

+

+
+ +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/aurora/mail/user/auth/activate.tmpl b/themes/aurora/mail/user/auth/activate.tmpl new file mode 100644 index 0000000..0e905bd --- /dev/null +++ b/themes/aurora/mail/user/auth/activate.tmpl @@ -0,0 +1,50 @@ + + + + + + + {{.locale.Tr "mail.activate_account.title" (.DisplayName|DotEscape)}} + + + +
+ + + + + + + + + + +
+ logo + {{AppName}} +
+

{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}

+

{{.locale.Tr "mail.activate_account.text_1" (.DisplayName|DotEscape) AppName}}

+

{{.locale.Tr "mail.activate_account.text_2" .ActiveCodeLives}}

+
+ {{$activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}} +
+ Activate Account +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{$activate_url}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/aurora/mail/user/auth/activate_email.tmpl b/themes/aurora/mail/user/auth/activate_email.tmpl new file mode 100644 index 0000000..a5f7839 --- /dev/null +++ b/themes/aurora/mail/user/auth/activate_email.tmpl @@ -0,0 +1,50 @@ + + + + + + + {{.locale.Tr "mail.activate_email.title" (.DisplayName|DotEscape)}} + + + +
+ + + + + + + + + + +
+ logo + {{AppName}} +
+

{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}

+

{{.locale.Tr "mail.activate_email.text" .ActiveCodeLives}}

+

+
+ {{$activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}} +
+ Verify Email Address +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{$activate_url}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/aurora/mail/user/auth/register_notify.tmpl b/themes/aurora/mail/user/auth/register_notify.tmpl new file mode 100644 index 0000000..e6c55de --- /dev/null +++ b/themes/aurora/mail/user/auth/register_notify.tmpl @@ -0,0 +1,52 @@ + + + + + + + {{.locale.Tr "mail.register_notify.title" (.DisplayName|DotEscape) AppName}} + + + +
+ + + + + + + + + + +
+ logo + {{AppName}} +
+

{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}

+

{{.locale.Tr "mail.register_notify.text_1" AppName}}

+

{{.locale.Tr "mail.register_notify.text_2" .Username}} +{{$set_pwd_url := printf "%suser/forgot_password" AppUrl}} +{{.locale.Tr "mail.register_notify.text_3" $set_pwd_url}}

+
+ +
+ Go to {{AppName}} +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{AppUrl}}user/login

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/aurora/mail/user/auth/reset_passwd.tmpl b/themes/aurora/mail/user/auth/reset_passwd.tmpl new file mode 100644 index 0000000..23b1369 --- /dev/null +++ b/themes/aurora/mail/user/auth/reset_passwd.tmpl @@ -0,0 +1,50 @@ + + + + + + + {{.locale.Tr "mail.reset_password.title" (.DisplayName|DotEscape)}} + + + +
+ + + + + + + + + + +
+ logo + {{AppName}} +
+

{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}

+

{{.locale.Tr "mail.reset_password.text" .ResetPwdCodeLives}}

+

+
+ {{$recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}} +
+ Reset Password +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{$recover_url}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/bloom/mail/org/team_invite.tmpl b/themes/bloom/mail/org/team_invite.tmpl new file mode 100644 index 0000000..536f28a --- /dev/null +++ b/themes/bloom/mail/org/team_invite.tmpl @@ -0,0 +1,65 @@ + + + + + + {{AppName}} · Team Invitation + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" .Invite.Email}} +

+

+ {{.locale.Tr "mail.team_invite.text_1" (DotEscape .Inviter.DisplayName) (DotEscape .Team.Name) (DotEscape .Organization.DisplayName)}} +

+

+ {{.locale.Tr "mail.team_invite.text_2"}} +

+ + + + + +
+ Accept Invitation +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.InviteURL}} +

+
+ +

+ {{.locale.Tr "mail.team_invite.text_3" .Invite.Email}} +

+
+ +
+

+ © {{AppName}} +

+

Sent via Gitea Mail Templates

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/bloom/mail/repo/actions/workflow_run.tmpl b/themes/bloom/mail/repo/actions/workflow_run.tmpl new file mode 100644 index 0000000..4923285 --- /dev/null +++ b/themes/bloom/mail/repo/actions/workflow_run.tmpl @@ -0,0 +1,65 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+

+ {{.Repo.FullName}} — {{.Run.WorkflowID}}: {{.RunStatusText}} +

+ + + + + + + +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Run.HTMLURL}} +

+
+
+ +
+

+ © {{AppName}} +

+

Sent via Gitea Mail Templates

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/bloom/mail/repo/collaborator.tmpl b/themes/bloom/mail/repo/collaborator.tmpl new file mode 100644 index 0000000..26b653f --- /dev/null +++ b/themes/bloom/mail/repo/collaborator.tmpl @@ -0,0 +1,56 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+

+ {{.locale.Tr "mail.repo.collaborator.added.text"}} {{.RepoName}}. +

+ + + + + +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+ +
+

+ © {{AppName}} +

+

Sent via Gitea Mail Templates

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/bloom/mail/repo/issue/assigned.tmpl b/themes/bloom/mail/repo/issue/assigned.tmpl new file mode 100644 index 0000000..f206ab2 --- /dev/null +++ b/themes/bloom/mail/repo/issue/assigned.tmpl @@ -0,0 +1,61 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+ {{$repo_url := HTMLFormat "%s" .Issue.Repo.HTMLURL .Issue.Repo.FullName}} + {{$link := HTMLFormat "#%d" .Link .Issue.Index}} +

+ {{if .IsPull}} + {{.locale.Tr "mail.issue_assigned.pull" .Doer.Name $link $repo_url}} + {{else}} + {{.locale.Tr "mail.issue_assigned.issue" .Doer.Name $link $repo_url}} + {{end}} +

+ + + + + +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+ +
+

+ © {{AppName}} +

+

Sent via Gitea Mail Templates

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/bloom/mail/repo/issue/default.tmpl b/themes/bloom/mail/repo/issue/default.tmpl new file mode 100644 index 0000000..8a0e30d --- /dev/null +++ b/themes/bloom/mail/repo/issue/default.tmpl @@ -0,0 +1,121 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+ {{if .IsMention}}

{{.locale.Tr "mail.issue.x_mentioned_you" .Doer.Name}}

{{end}} + {{if eq .ActionName "push"}} +

+ {{if .Comment.IsForcePush}} + {{$oldCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.OldCommit}} + {{$oldShortSha := ShortSha .Comment.OldCommit}} + {{$oldCommitLink := HTMLFormat "%[2]s" $oldCommitUrl $oldShortSha}} + + {{$newCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.NewCommit}} + {{$newShortSha := ShortSha .Comment.NewCommit}} + {{$newCommitLink := HTMLFormat "%[2]s" $newCommitUrl $newShortSha}} + + {{.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}} +

+ {{end}} +

+ {{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}} + + {{- if eq .Body ""}} + {{if eq .ActionName "new"}} + {{.locale.Tr "mail.issue.action.new" .Doer.Name .Issue.Index}} + {{end}} + {{else}} + {{.Body}} + {{end -}} +

+ + {{- range .ReviewComments}} +
+

{{$.locale.Tr "mail.issue.in_tree_path" .TreePath}}

+
+
{{.Patch}}
+
{{.RenderedContent}}
+
+ {{end -}} + + {{if eq .ActionName "push"}} + + {{end}} + + + + + +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+ +
+

+ © {{AppName}} +

+

Sent via Gitea Mail Templates

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/bloom/mail/repo/release.tmpl b/themes/bloom/mail/repo/release.tmpl new file mode 100644 index 0000000..7e5af55 --- /dev/null +++ b/themes/bloom/mail/repo/release.tmpl @@ -0,0 +1,87 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+ {{$release_url := HTMLFormat "%s" .Release.HTMLURL .Release.TagName}} + {{$repo_url := HTMLFormat "%s" .Release.Repo.HTMLURL .Release.Repo.FullName}} +

+ {{.locale.Tr "mail.release.new.text" .Release.Publisher.Name $release_url $repo_url}} +

+ +

{{.locale.Tr "mail.release.title" .Release.Title}}

+ + {{if .Release.RenderedNote}} +
+ {{.Release.RenderedNote}} +
+ {{end}} + +

{{.locale.Tr "mail.release.downloads"}}

+ + + + + + +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+ +
+

+ © {{AppName}} +

+

Sent via Gitea Mail Templates

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/bloom/mail/repo/transfer.tmpl b/themes/bloom/mail/repo/transfer.tmpl new file mode 100644 index 0000000..fd06ed9 --- /dev/null +++ b/themes/bloom/mail/repo/transfer.tmpl @@ -0,0 +1,56 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+ {{$url := HTMLFormat "%[2]s" .Link .Repo}} +

+ {{.Subject}}. {{.locale.Tr "mail.repo.transfer.body" $url}} +

+ + + + + +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+ +
+

+ © {{AppName}} +

+

Sent via Gitea Mail Templates

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/bloom/mail/user/auth/activate.tmpl b/themes/bloom/mail/user/auth/activate.tmpl new file mode 100644 index 0000000..6f57a57 --- /dev/null +++ b/themes/bloom/mail/user/auth/activate.tmpl @@ -0,0 +1,62 @@ + + + + + + {{.locale.Tr "mail.activate_account.title" (.DisplayName|DotEscape)}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.activate_account.text_1" (.DisplayName|DotEscape) AppName}} +

+

+ {{.locale.Tr "mail.activate_account.text_2" .ActiveCodeLives}} +

+ + {{$activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}} + + + + +
+ Activate Account +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{$activate_url}} +

+
+
+ +
+

+ © {{AppName}} +

+

Sent via Gitea Mail Templates

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/bloom/mail/user/auth/activate_email.tmpl b/themes/bloom/mail/user/auth/activate_email.tmpl new file mode 100644 index 0000000..5efe806 --- /dev/null +++ b/themes/bloom/mail/user/auth/activate_email.tmpl @@ -0,0 +1,59 @@ + + + + + + {{.locale.Tr "mail.activate_email.title" (.DisplayName|DotEscape)}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.activate_email.text" .ActiveCodeLives}} +

+ + {{$activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}} + + + + +
+ Verify Email Address +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{$activate_url}} +

+
+
+ +
+

+ © {{AppName}} +

+

Sent via Gitea Mail Templates

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/bloom/mail/user/auth/register_notify.tmpl b/themes/bloom/mail/user/auth/register_notify.tmpl new file mode 100644 index 0000000..af1c0c5 --- /dev/null +++ b/themes/bloom/mail/user/auth/register_notify.tmpl @@ -0,0 +1,66 @@ + + + + + + {{.locale.Tr "mail.register_notify.title" (.DisplayName|DotEscape) AppName}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.register_notify.text_1" AppName}} +

+

+ {{.locale.Tr "mail.register_notify.text_2" .Username}} +

+ + + + + +
+ Go to {{AppName}} +
+ + {{$set_pwd_url := printf "%suser/forgot_password" AppUrl}} +

+ {{.locale.Tr "mail.register_notify.text_3" $set_pwd_url}} +

+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{AppUrl}}user/login +

+
+
+ +
+

+ © {{AppName}} +

+

Sent via Gitea Mail Templates

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/bloom/mail/user/auth/reset_passwd.tmpl b/themes/bloom/mail/user/auth/reset_passwd.tmpl new file mode 100644 index 0000000..1709339 --- /dev/null +++ b/themes/bloom/mail/user/auth/reset_passwd.tmpl @@ -0,0 +1,59 @@ + + + + + + {{.locale.Tr "mail.reset_password.title" (.DisplayName|DotEscape)}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.reset_password.text" .ResetPwdCodeLives}} +

+ + {{$recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}} + + + + +
+ Reset Password +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{$recover_url}} +

+
+
+ +
+

+ © {{AppName}} +

+

Sent via Gitea Mail Templates

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/ember/mail/org/team_invite.tmpl b/themes/ember/mail/org/team_invite.tmpl new file mode 100644 index 0000000..a9781de --- /dev/null +++ b/themes/ember/mail/org/team_invite.tmpl @@ -0,0 +1,74 @@ + + + + + + {{AppName}} · Team Invitation + + + + +
+
+ +
+ + + + +
+ 👋 + logo + {{AppName}} +
+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" .Invite.Email}} +

+ +

+ {{.locale.Tr "mail.team_invite.text_1" (DotEscape .Inviter.DisplayName) (DotEscape .Team.Name) (DotEscape .Organization.DisplayName)}} +

+ +

+ {{.locale.Tr "mail.team_invite.text_2"}} +

+ + + + + +
+ Join the Team 🤝 +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.InviteURL}} +

+
+ +

+ {{.locale.Tr "mail.team_invite.text_3" .Invite.Email}} +

+
+ +
+

+ © {{AppName}} +

+

Built with ❤️ by the community, for the community.

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/ember/mail/repo/actions/workflow_run.tmpl b/themes/ember/mail/repo/actions/workflow_run.tmpl new file mode 100644 index 0000000..642cc5b --- /dev/null +++ b/themes/ember/mail/repo/actions/workflow_run.tmpl @@ -0,0 +1,72 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ + + + +
+ 👋 + logo + {{AppName}} +
+
+ +
+

+ {{.Repo.FullName}} — {{.Run.WorkflowID}}: {{.RunStatusText}} +

+ + + + + + + +
+ View Workflow Run ⚙️ +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Run.HTMLURL}} +

+
+
+ +
+

+ © {{AppName}} +

+

Built with ❤️ by the community, for the community.

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/ember/mail/repo/collaborator.tmpl b/themes/ember/mail/repo/collaborator.tmpl new file mode 100644 index 0000000..022ff3b --- /dev/null +++ b/themes/ember/mail/repo/collaborator.tmpl @@ -0,0 +1,63 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ + + + +
+ 👋 + logo + {{AppName}} +
+
+ +
+

+ {{.locale.Tr "mail.repo.collaborator.added.text"}} {{.RepoName}}. +

+ + + + + +
+ View Repository 🔍 +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+ +
+

+ © {{AppName}} +

+

Built with ❤️ by the community, for the community.

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/ember/mail/repo/issue/assigned.tmpl b/themes/ember/mail/repo/issue/assigned.tmpl new file mode 100644 index 0000000..37175e2 --- /dev/null +++ b/themes/ember/mail/repo/issue/assigned.tmpl @@ -0,0 +1,68 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ + + + +
+ 👋 + logo + {{AppName}} +
+
+ +
+ {{$repo_url := HTMLFormat "%s" .Issue.Repo.HTMLURL .Issue.Repo.FullName}} + {{$link := HTMLFormat "#%d" .Link .Issue.Index}} +

+ {{if .IsPull}} + {{.locale.Tr "mail.issue_assigned.pull" .Doer.Name $link $repo_url}} + {{else}} + {{.locale.Tr "mail.issue_assigned.issue" .Doer.Name $link $repo_url}} + {{end}} +

+ + + + + +
+ View on {{AppName}} ↗️ +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+ +
+

+ © {{AppName}} +

+

Built with ❤️ by the community, for the community.

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/ember/mail/repo/issue/default.tmpl b/themes/ember/mail/repo/issue/default.tmpl new file mode 100644 index 0000000..9645e8b --- /dev/null +++ b/themes/ember/mail/repo/issue/default.tmpl @@ -0,0 +1,128 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ + + + +
+ 👋 + logo + {{AppName}} +
+
+ +
+ {{if .IsMention}}

{{.locale.Tr "mail.issue.x_mentioned_you" .Doer.Name}}

{{end}} + {{if eq .ActionName "push"}} +

+ {{if .Comment.IsForcePush}} + {{$oldCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.OldCommit}} + {{$oldShortSha := ShortSha .Comment.OldCommit}} + {{$oldCommitLink := HTMLFormat "%[2]s" $oldCommitUrl $oldShortSha}} + + {{$newCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.NewCommit}} + {{$newShortSha := ShortSha .Comment.NewCommit}} + {{$newCommitLink := HTMLFormat "%[2]s" $newCommitUrl $newShortSha}} + + {{.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}} +

+ {{end}} +

+ {{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}} + + {{- if eq .Body ""}} + {{if eq .ActionName "new"}} + {{.locale.Tr "mail.issue.action.new" .Doer.Name .Issue.Index}} + {{end}} + {{else}} + {{.Body}} + {{end -}} +

+ + {{- range .ReviewComments}} +
+

{{$.locale.Tr "mail.issue.in_tree_path" .TreePath}}

+
+
{{.Patch}}
+
{{.RenderedContent}}
+
+ {{end -}} + + {{if eq .ActionName "push"}} + + {{end}} + + + + + +
+ View on {{AppName}} ↗️ +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+ +
+

+ © {{AppName}} +

+

Built with ❤️ by the community, for the community.

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/ember/mail/repo/release.tmpl b/themes/ember/mail/repo/release.tmpl new file mode 100644 index 0000000..a269c3c --- /dev/null +++ b/themes/ember/mail/repo/release.tmpl @@ -0,0 +1,94 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ + + + +
+ 👋 + logo + {{AppName}} +
+
+ +
+ {{$release_url := HTMLFormat "%s" .Release.HTMLURL .Release.TagName}} + {{$repo_url := HTMLFormat "%s" .Release.Repo.HTMLURL .Release.Repo.FullName}} +

+ {{.locale.Tr "mail.release.new.text" .Release.Publisher.Name $release_url $repo_url}} +

+ +

{{.locale.Tr "mail.release.title" .Release.Title}}

+ + {{if .Release.RenderedNote}} +
+ {{.Release.RenderedNote}} +
+ {{end}} + +

{{.locale.Tr "mail.release.downloads"}}

+ + + + + + +
+ See the Release 🚀 +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+ +
+

+ © {{AppName}} +

+

Built with ❤️ by the community, for the community.

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/ember/mail/repo/transfer.tmpl b/themes/ember/mail/repo/transfer.tmpl new file mode 100644 index 0000000..0241868 --- /dev/null +++ b/themes/ember/mail/repo/transfer.tmpl @@ -0,0 +1,63 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ + + + +
+ 👋 + logo + {{AppName}} +
+
+ +
+ {{$url := HTMLFormat "%[2]s" .Link .Repo}} +

+ {{.Subject}}. {{.locale.Tr "mail.repo.transfer.body" $url}} +

+ + + + + +
+ View Transfer 📦 +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+ +
+

+ © {{AppName}} +

+

Built with ❤️ by the community, for the community.

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/ember/mail/user/auth/activate.tmpl b/themes/ember/mail/user/auth/activate.tmpl new file mode 100644 index 0000000..13ae475 --- /dev/null +++ b/themes/ember/mail/user/auth/activate.tmpl @@ -0,0 +1,69 @@ + + + + + + {{.locale.Tr "mail.activate_account.title" (.DisplayName|DotEscape)}} + + + + +
+
+ +
+ + + + +
+ 👋 + logo + {{AppName}} +
+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.activate_account.text_1" (.DisplayName|DotEscape) AppName}} +

+

+ {{.locale.Tr "mail.activate_account.text_2" .ActiveCodeLives}} +

+ + {{$activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}} + + + + +
+ Activate Your Account → +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{$activate_url}} +

+
+
+ +
+

+ © {{AppName}} +

+

Built with ❤️ by the community, for the community.

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/ember/mail/user/auth/activate_email.tmpl b/themes/ember/mail/user/auth/activate_email.tmpl new file mode 100644 index 0000000..a6fd687 --- /dev/null +++ b/themes/ember/mail/user/auth/activate_email.tmpl @@ -0,0 +1,66 @@ + + + + + + {{.locale.Tr "mail.activate_email.title" (.DisplayName|DotEscape)}} + + + + +
+
+ +
+ + + + +
+ 👋 + logo + {{AppName}} +
+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.activate_email.text" .ActiveCodeLives}} +

+ + {{$activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}} + + + + +
+ Verify Your Email → +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{$activate_url}} +

+
+
+ +
+

+ © {{AppName}} +

+

Built with ❤️ by the community, for the community.

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/ember/mail/user/auth/register_notify.tmpl b/themes/ember/mail/user/auth/register_notify.tmpl new file mode 100644 index 0000000..5c4b1c3 --- /dev/null +++ b/themes/ember/mail/user/auth/register_notify.tmpl @@ -0,0 +1,73 @@ + + + + + + {{.locale.Tr "mail.register_notify.title" (.DisplayName|DotEscape) AppName}} + + + + +
+
+ +
+ + + + +
+ 👋 + logo + {{AppName}} +
+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.register_notify.text_1" AppName}} +

+

+ {{.locale.Tr "mail.register_notify.text_2" .Username}} +

+ + + + + +
+ Welcome to {{AppName}} 🎉 +
+ + {{$set_pwd_url := printf "%suser/forgot_password" AppUrl}} +

+ {{.locale.Tr "mail.register_notify.text_3" $set_pwd_url}} +

+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{AppUrl}}user/login +

+
+
+ +
+

+ © {{AppName}} +

+

Built with ❤️ by the community, for the community.

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/ember/mail/user/auth/reset_passwd.tmpl b/themes/ember/mail/user/auth/reset_passwd.tmpl new file mode 100644 index 0000000..c8b2a20 --- /dev/null +++ b/themes/ember/mail/user/auth/reset_passwd.tmpl @@ -0,0 +1,66 @@ + + + + + + {{.locale.Tr "mail.reset_password.title" (.DisplayName|DotEscape)}} + + + + +
+
+ +
+ + + + +
+ 👋 + logo + {{AppName}} +
+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.reset_password.text" .ResetPwdCodeLives}} +

+ + {{$recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}} + + + + +
+ Reset Your Password 🔒 +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{$recover_url}} +

+
+
+ +
+

+ © {{AppName}} +

+

Built with ❤️ by the community, for the community.

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/heritage/mail/org/team_invite.tmpl b/themes/heritage/mail/org/team_invite.tmpl new file mode 100644 index 0000000..89723a5 --- /dev/null +++ b/themes/heritage/mail/org/team_invite.tmpl @@ -0,0 +1,67 @@ + + + + + + {{AppName}} · Team Invitation + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" .Invite.Email}} +

+ +

+ {{.locale.Tr "mail.team_invite.text_1" (DotEscape .Inviter.DisplayName) (DotEscape .Team.Name) (DotEscape .Organization.DisplayName)}} +

+ +

+ {{.locale.Tr "mail.team_invite.text_2"}} +

+ + + + + +
+ Accept Invitation → +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.InviteURL}} +

+
+ +

+ {{.locale.Tr "mail.team_invite.text_3" .Invite.Email}} +

+
+ +
+

+ © {{AppName}} +

+

Established · Trusted · Open

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/heritage/mail/repo/actions/workflow_run.tmpl b/themes/heritage/mail/repo/actions/workflow_run.tmpl new file mode 100644 index 0000000..d42a555 --- /dev/null +++ b/themes/heritage/mail/repo/actions/workflow_run.tmpl @@ -0,0 +1,65 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+

+ {{.Repo.FullName}} — {{.Run.WorkflowID}}: {{.RunStatusText}} +

+ + + + + + + +
+ View Workflow Run → +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Run.HTMLURL}} +

+
+
+ +
+

+ © {{AppName}} +

+

Established · Trusted · Open

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/heritage/mail/repo/collaborator.tmpl b/themes/heritage/mail/repo/collaborator.tmpl new file mode 100644 index 0000000..ec7e3fa --- /dev/null +++ b/themes/heritage/mail/repo/collaborator.tmpl @@ -0,0 +1,56 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+

+ {{.locale.Tr "mail.repo.collaborator.added.text"}} {{.RepoName}}. +

+ + + + + +
+ View Repository → +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+ +
+

+ © {{AppName}} +

+

Established · Trusted · Open

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/heritage/mail/repo/issue/assigned.tmpl b/themes/heritage/mail/repo/issue/assigned.tmpl new file mode 100644 index 0000000..e21b913 --- /dev/null +++ b/themes/heritage/mail/repo/issue/assigned.tmpl @@ -0,0 +1,61 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+ {{$repo_url := HTMLFormat "%s" .Issue.Repo.HTMLURL .Issue.Repo.FullName}} + {{$link := HTMLFormat "#%d" .Link .Issue.Index}} +

+ {{if .IsPull}} + {{.locale.Tr "mail.issue_assigned.pull" .Doer.Name $link $repo_url}} + {{else}} + {{.locale.Tr "mail.issue_assigned.issue" .Doer.Name $link $repo_url}} + {{end}} +

+ + + + + +
+ View on {{AppName}} → +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+ +
+

+ © {{AppName}} +

+

Established · Trusted · Open

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/heritage/mail/repo/issue/default.tmpl b/themes/heritage/mail/repo/issue/default.tmpl new file mode 100644 index 0000000..98be6f0 --- /dev/null +++ b/themes/heritage/mail/repo/issue/default.tmpl @@ -0,0 +1,121 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+ {{if .IsMention}}

{{.locale.Tr "mail.issue.x_mentioned_you" .Doer.Name}}

{{end}} + {{if eq .ActionName "push"}} +

+ {{if .Comment.IsForcePush}} + {{$oldCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.OldCommit}} + {{$oldShortSha := ShortSha .Comment.OldCommit}} + {{$oldCommitLink := HTMLFormat "%[2]s" $oldCommitUrl $oldShortSha}} + + {{$newCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.NewCommit}} + {{$newShortSha := ShortSha .Comment.NewCommit}} + {{$newCommitLink := HTMLFormat "%[2]s" $newCommitUrl $newShortSha}} + + {{.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}} +

+ {{end}} +

+ {{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}} + + {{- if eq .Body ""}} + {{if eq .ActionName "new"}} + {{.locale.Tr "mail.issue.action.new" .Doer.Name .Issue.Index}} + {{end}} + {{else}} + {{.Body}} + {{end -}} +

+ + {{- range .ReviewComments}} +
+

{{$.locale.Tr "mail.issue.in_tree_path" .TreePath}}

+
+
{{.Patch}}
+
{{.RenderedContent}}
+
+ {{end -}} + + {{if eq .ActionName "push"}} + + {{end}} + + + + + +
+ View on {{AppName}} → +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+ +
+

+ © {{AppName}} +

+

Established · Trusted · Open

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/heritage/mail/repo/release.tmpl b/themes/heritage/mail/repo/release.tmpl new file mode 100644 index 0000000..8a26d36 --- /dev/null +++ b/themes/heritage/mail/repo/release.tmpl @@ -0,0 +1,87 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+ {{$release_url := HTMLFormat "%s" .Release.HTMLURL .Release.TagName}} + {{$repo_url := HTMLFormat "%s" .Release.Repo.HTMLURL .Release.Repo.FullName}} +

+ {{.locale.Tr "mail.release.new.text" .Release.Publisher.Name $release_url $repo_url}} +

+ +

{{.locale.Tr "mail.release.title" .Release.Title}}

+ + {{if .Release.RenderedNote}} +
+ {{.Release.RenderedNote}} +
+ {{end}} + +

{{.locale.Tr "mail.release.downloads"}}

+ + + + + + +
+ See the Release → +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+ +
+

+ © {{AppName}} +

+

Established · Trusted · Open

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/heritage/mail/repo/transfer.tmpl b/themes/heritage/mail/repo/transfer.tmpl new file mode 100644 index 0000000..ef61d80 --- /dev/null +++ b/themes/heritage/mail/repo/transfer.tmpl @@ -0,0 +1,56 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+ {{$url := HTMLFormat "%[2]s" .Link .Repo}} +

+ {{.Subject}}. {{.locale.Tr "mail.repo.transfer.body" $url}} +

+ + + + + +
+ View Transfer → +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+ +
+

+ © {{AppName}} +

+

Established · Trusted · Open

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/heritage/mail/user/auth/activate.tmpl b/themes/heritage/mail/user/auth/activate.tmpl new file mode 100644 index 0000000..f6b2c3b --- /dev/null +++ b/themes/heritage/mail/user/auth/activate.tmpl @@ -0,0 +1,62 @@ + + + + + + {{.locale.Tr "mail.activate_account.title" (.DisplayName|DotEscape)}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.activate_account.text_1" (.DisplayName|DotEscape) AppName}} +

+

+ {{.locale.Tr "mail.activate_account.text_2" .ActiveCodeLives}} +

+ + {{$activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}} + + + + +
+ Activate Account → +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{$activate_url}} +

+
+
+ +
+

+ © {{AppName}} +

+

Established · Trusted · Open

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/heritage/mail/user/auth/activate_email.tmpl b/themes/heritage/mail/user/auth/activate_email.tmpl new file mode 100644 index 0000000..0e52164 --- /dev/null +++ b/themes/heritage/mail/user/auth/activate_email.tmpl @@ -0,0 +1,59 @@ + + + + + + {{.locale.Tr "mail.activate_email.title" (.DisplayName|DotEscape)}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.activate_email.text" .ActiveCodeLives}} +

+ + {{$activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}} + + + + +
+ Verify Email Address → +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{$activate_url}} +

+
+
+ +
+

+ © {{AppName}} +

+

Established · Trusted · Open

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/heritage/mail/user/auth/register_notify.tmpl b/themes/heritage/mail/user/auth/register_notify.tmpl new file mode 100644 index 0000000..d22ee14 --- /dev/null +++ b/themes/heritage/mail/user/auth/register_notify.tmpl @@ -0,0 +1,66 @@ + + + + + + {{.locale.Tr "mail.register_notify.title" (.DisplayName|DotEscape) AppName}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.register_notify.text_1" AppName}} +

+

+ {{.locale.Tr "mail.register_notify.text_2" .Username}} +

+ + + + + +
+ Proceed to Login → +
+ + {{$set_pwd_url := printf "%suser/forgot_password" AppUrl}} +

+ {{.locale.Tr "mail.register_notify.text_3" $set_pwd_url}} +

+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{AppUrl}}user/login +

+
+
+ +
+

+ © {{AppName}} +

+

Established · Trusted · Open

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/heritage/mail/user/auth/reset_passwd.tmpl b/themes/heritage/mail/user/auth/reset_passwd.tmpl new file mode 100644 index 0000000..961db38 --- /dev/null +++ b/themes/heritage/mail/user/auth/reset_passwd.tmpl @@ -0,0 +1,59 @@ + + + + + + {{.locale.Tr "mail.reset_password.title" (.DisplayName|DotEscape)}} + + + + +
+
+ +
+ logo +

{{AppName}}

+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.reset_password.text" .ResetPwdCodeLives}} +

+ + {{$recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}} + + + + +
+ Reset Password → +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{$recover_url}} +

+
+
+ +
+

+ © {{AppName}} +

+

Established · Trusted · Open

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/horizon/mail/org/team_invite.tmpl b/themes/horizon/mail/org/team_invite.tmpl new file mode 100644 index 0000000..7e7ee1c --- /dev/null +++ b/themes/horizon/mail/org/team_invite.tmpl @@ -0,0 +1,76 @@ + + + + + + {{AppName}} · Team Invitation + + + + +
+
+ +
+ + + + +
+ logo + {{AppName}} +
+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" .Invite.Email}} +

+ +

+ {{.locale.Tr "mail.team_invite.text_1" (DotEscape .Inviter.DisplayName) (DotEscape .Team.Name) (DotEscape .Organization.DisplayName)}} +

+ +

+ {{.locale.Tr "mail.team_invite.text_2"}} +

+ + + + + +
+ Accept Invitation +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.InviteURL}} +

+
+ +

+ {{.locale.Tr "mail.team_invite.text_3" .Invite.Email}} +

+ +
+
+ +
+

+ © {{AppName}} +

+

Secure team invitation – if you weren’t expecting this, please ignore this email.

+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/themes/horizon/mail/repo/actions/workflow_run.tmpl b/themes/horizon/mail/repo/actions/workflow_run.tmpl new file mode 100644 index 0000000..f4e165c --- /dev/null +++ b/themes/horizon/mail/repo/actions/workflow_run.tmpl @@ -0,0 +1,73 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ + + + +
+ logo + {{AppName}} +
+
+ +
+

+ {{.Repo.FullName}} {{.Run.WorkflowID}}: {{.RunStatusText}} +

+ + + + + + + +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Run.HTMLURL}} +

+
+
+
+ +
+

+ © {{AppName}} +

+

Secure workflow run notification – if you didn’t expect this, please ignore this email.

+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/themes/horizon/mail/repo/collaborator.tmpl b/themes/horizon/mail/repo/collaborator.tmpl new file mode 100644 index 0000000..d1193ed --- /dev/null +++ b/themes/horizon/mail/repo/collaborator.tmpl @@ -0,0 +1,63 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ + + + +
+ logo + {{AppName}} +
+
+ +
+

+ {{.locale.Tr "mail.repo.collaborator.added.text"}} {{.RepoName}}. +

+ + + + + +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+
+ +
+

+ © {{AppName}} +

+

Secure repository collaboration notification – if you didn’t expect this, please ignore this email.

+
+ +
+
+ +
+ + diff --git a/themes/horizon/mail/repo/issue/assigned.tmpl b/themes/horizon/mail/repo/issue/assigned.tmpl new file mode 100644 index 0000000..3a82f44 --- /dev/null +++ b/themes/horizon/mail/repo/issue/assigned.tmpl @@ -0,0 +1,69 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ + + + +
+ logo + {{AppName}} +
+
+ +
+ {{$repo_url := HTMLFormat "%s" .Issue.Repo.HTMLURL .Issue.Repo.FullName}} + {{$link := HTMLFormat "#%d" .Link .Issue.Index}} +

+ {{if .IsPull}} + {{.locale.Tr "mail.issue_assigned.pull" .Doer.Name $link $repo_url}} + {{else}} + {{.locale.Tr "mail.issue_assigned.issue" .Doer.Name $link $repo_url}} + {{end}} +

+ + + + + +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+
+ +
+

+ © {{AppName}} +

+

Secure issue assignment notification – if you didn’t expect this, please ignore this email.

+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/themes/horizon/mail/repo/issue/default.tmpl b/themes/horizon/mail/repo/issue/default.tmpl new file mode 100644 index 0000000..a746771 --- /dev/null +++ b/themes/horizon/mail/repo/issue/default.tmpl @@ -0,0 +1,129 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ + + + +
+ logo + {{AppName}} +
+
+ +
+ {{if .IsMention}}

{{.locale.Tr "mail.issue.x_mentioned_you" .Doer.Name}}

{{end}} + {{if eq .ActionName "push"}} +

+ {{if .Comment.IsForcePush}} + {{$oldCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.OldCommit}} + {{$oldShortSha := ShortSha .Comment.OldCommit}} + {{$oldCommitLink := HTMLFormat "%[2]s" $oldCommitUrl $oldShortSha}} + + {{$newCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.NewCommit}} + {{$newShortSha := ShortSha .Comment.NewCommit}} + {{$newCommitLink := HTMLFormat "%[2]s" $newCommitUrl $newShortSha}} + + {{.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}} +

+ {{end}} +

+ {{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}} + + {{- if eq .Body ""}} + {{if eq .ActionName "new"}} + {{.locale.Tr "mail.issue.action.new" .Doer.Name .Issue.Index}} + {{end}} + {{else}} + {{.Body}} + {{end -}} +

+ + {{- range .ReviewComments}} +
+

{{$.locale.Tr "mail.issue.in_tree_path" .TreePath}}

+
+
{{.Patch}}
+
{{.RenderedContent}}
+
+ {{end -}} + + {{if eq .ActionName "push"}} + + {{end}} + + + + + +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+
+ +
+

+ © {{AppName}} +

+

Secure notification – if you didn’t expect this, please ignore this email.

+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/themes/horizon/mail/repo/release.tmpl b/themes/horizon/mail/repo/release.tmpl new file mode 100644 index 0000000..435cd25 --- /dev/null +++ b/themes/horizon/mail/repo/release.tmpl @@ -0,0 +1,95 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ + + + +
+ logo + {{AppName}} +
+
+ +
+ {{$release_url := HTMLFormat "%s" .Release.HTMLURL .Release.TagName}} + {{$repo_url := HTMLFormat "%s" .Release.Repo.HTMLURL .Release.Repo.FullName}} +

+ {{.locale.Tr "mail.release.new.text" .Release.Publisher.Name $release_url $repo_url}} +

+ +

{{.locale.Tr "mail.release.title" .Release.Title}}

+ + {{if .Release.RenderedNote}} +
+ {{.Release.RenderedNote}} +
+ {{end}} + +

{{.locale.Tr "mail.release.downloads"}}

+ + + + + + +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+
+ +
+

+ © {{AppName}} +

+

Secure release notification – if you didn’t expect this, please ignore this email.

+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/themes/horizon/mail/repo/transfer.tmpl b/themes/horizon/mail/repo/transfer.tmpl new file mode 100644 index 0000000..aafbc91 --- /dev/null +++ b/themes/horizon/mail/repo/transfer.tmpl @@ -0,0 +1,64 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ + + + +
+ logo + {{AppName}} +
+
+ +
+ {{$url := HTMLFormat "%[2]s" .Link .Repo}} +

+ {{.Subject}}. {{.locale.Tr "mail.repo.transfer.body" $url}} +

+ + + + + +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{.Link}} +

+
+
+
+ +
+

+ © {{AppName}} +

+

Secure repository transfer notification – if you didn’t expect this, please ignore this email.

+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/themes/horizon/mail/user/auth/activate.tmpl b/themes/horizon/mail/user/auth/activate.tmpl new file mode 100644 index 0000000..9113e9c --- /dev/null +++ b/themes/horizon/mail/user/auth/activate.tmpl @@ -0,0 +1,70 @@ + + + + + + {{.locale.Tr "mail.activate_account.title" (.DisplayName|DotEscape)}} + + + + +
+
+ +
+ + + + +
+ logo + {{AppName}} +
+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.activate_account.text_1" (.DisplayName|DotEscape) AppName}} +

+

+ {{.locale.Tr "mail.activate_account.text_2" .ActiveCodeLives}} +

+ + {{$activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}} + + + + +
+ Activate Account +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{$activate_url}} +

+
+
+
+ +
+

+ © {{AppName}} +

+

Secure account activation – if you didn’t register, please ignore this email.

+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/themes/horizon/mail/user/auth/activate_email.tmpl b/themes/horizon/mail/user/auth/activate_email.tmpl new file mode 100644 index 0000000..96be7ef --- /dev/null +++ b/themes/horizon/mail/user/auth/activate_email.tmpl @@ -0,0 +1,67 @@ + + + + + + {{.locale.Tr "mail.activate_email.title" (.DisplayName|DotEscape)}} + + + + +
+
+ +
+ + + + +
+ logo + {{AppName}} +
+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.activate_email.text" .ActiveCodeLives}} +

+ + {{$activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}} + + + + +
+ Verify Email Address +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{$activate_url}} +

+
+
+
+ +
+

+ © {{AppName}} +

+

Secure email verification – if you didn’t request this, please ignore this email.

+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/themes/horizon/mail/user/auth/register_notify.tmpl b/themes/horizon/mail/user/auth/register_notify.tmpl new file mode 100644 index 0000000..5697863 --- /dev/null +++ b/themes/horizon/mail/user/auth/register_notify.tmpl @@ -0,0 +1,73 @@ + + + + + + {{.locale.Tr "mail.register_notify.title" (.DisplayName|DotEscape) AppName}} + + + + +
+
+ +
+ + + + +
+ logo + {{AppName}} +
+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.register_notify.text_1" AppName}} +

+

+ {{.locale.Tr "mail.register_notify.text_2" .Username}} +

+ + + + + +
+ Log in to {{AppName}} +
+ + {{$set_pwd_url := printf "%suser/forgot_password" AppUrl}} +

+ {{.locale.Tr "mail.register_notify.text_3" $set_pwd_url}} +

+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{AppUrl}}user/login +

+
+
+
+ +
+

+ © {{AppName}} +

+

Secure registration confirmation – if you didn’t register, please ignore this email.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/themes/horizon/mail/user/auth/reset_passwd.tmpl b/themes/horizon/mail/user/auth/reset_passwd.tmpl new file mode 100644 index 0000000..468ae6d --- /dev/null +++ b/themes/horizon/mail/user/auth/reset_passwd.tmpl @@ -0,0 +1,66 @@ + + + + + + {{.locale.Tr "mail.reset_password.title" (.DisplayName|DotEscape)}} + + + + +
+
+ +
+ + + + +
+ logo + {{AppName}} +
+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.reset_password.text" .ResetPwdCodeLives}} +

+ + {{$recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}} + + + + +
+ Reset Password +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ {{$recover_url}} +

+
+
+
+ +
+

+ © {{AppName}} +

+

Secure password reset link – if you didn’t request this, please ignore this email.

+
+ +
+
+
+ + \ No newline at end of file diff --git a/themes/ink/mail/org/team_invite.tmpl b/themes/ink/mail/org/team_invite.tmpl new file mode 100644 index 0000000..27df363 --- /dev/null +++ b/themes/ink/mail/org/team_invite.tmpl @@ -0,0 +1,60 @@ + + + + + + + {{AppName}} - Team Invitation + + + +
+ + + + + + + + + + + + +
+ logo + {{AppName}}
+ Gitea Mail Templates +
+

+ D{{.locale.Tr "mail.hi_user_x" .Invite.Email}} +

+

{{.locale.Tr "mail.team_invite.text_1" (DotEscape .Inviter.DisplayName) (DotEscape .Team.Name) (DotEscape .Organization.DisplayName)}}

+

{{.locale.Tr "mail.team_invite.text_2"}}

+ +
+ Activate Account » +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.InviteURL}}

+
+
+

Quick Info

+ + + +
From
{{AppName}}
Expires
{{.ActiveCodeLives}}
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/ink/mail/repo/actions/workflow_run.tmpl b/themes/ink/mail/repo/actions/workflow_run.tmpl new file mode 100644 index 0000000..5c0fb86 --- /dev/null +++ b/themes/ink/mail/repo/actions/workflow_run.tmpl @@ -0,0 +1,60 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + + + + +
+ logo + {{AppName}}
+ Gitea Mail Templates +
+

+ D +

+

{{.Repo.FullName}} - {{.Run.WorkflowID}}: {{.RunStatusText}}

+

+ +
+ Activate Account » +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Run.HTMLURL}}

+
+
+

Quick Info

+ + + +
From
{{AppName}}
Expires
{{.ActiveCodeLives}}
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/ink/mail/repo/collaborator.tmpl b/themes/ink/mail/repo/collaborator.tmpl new file mode 100644 index 0000000..41f79e6 --- /dev/null +++ b/themes/ink/mail/repo/collaborator.tmpl @@ -0,0 +1,60 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + + + + +
+ logo + {{AppName}}
+ Gitea Mail Templates +
+

+ D +

+

{{.locale.Tr "mail.repo.collaborator.added.text"}} {{.RepoName}}.

+

+ +
+ Activate Account » +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

Quick Info

+ + + +
From
{{AppName}}
Expires
{{.ActiveCodeLives}}
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/ink/mail/repo/issue/assigned.tmpl b/themes/ink/mail/repo/issue/assigned.tmpl new file mode 100644 index 0000000..cf40df3 --- /dev/null +++ b/themes/ink/mail/repo/issue/assigned.tmpl @@ -0,0 +1,60 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + + + + +
+ logo + {{AppName}}
+ Gitea Mail Templates +
+

+ D +

+

{{$repo_url := HTMLFormat "%s" .Issue.Repo.HTMLURL .Issue.Repo.FullName}}{{$link := HTMLFormat "#%d" .Link .Issue.Index}}{{if .IsPull}}{{.locale.Tr "mail.issue_assigned.pull" .Doer.Name $link $repo_url}}{{else}}{{.locale.Tr "mail.issue_assigned.issue" .Doer.Name $link $repo_url}}{{end}}

+

+ +
+ Activate Account » +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

Quick Info

+ + + +
From
{{AppName}}
Expires
{{.ActiveCodeLives}}
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/ink/mail/repo/issue/default.tmpl b/themes/ink/mail/repo/issue/default.tmpl new file mode 100644 index 0000000..14a18b3 --- /dev/null +++ b/themes/ink/mail/repo/issue/default.tmpl @@ -0,0 +1,60 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + + + + +
+ logo + {{AppName}}
+ Gitea Mail Templates +
+

+ D +

+

{{if .IsMention}}

{{.locale.Tr "mail.issue.x_mentioned_you" .Doer.Name}}

{{end}}{{if eq .ActionName "push"}}

{{if .Comment.IsForcePush}}{{$oldCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.OldCommit}}{{$oldShortSha := ShortSha .Comment.OldCommit}}{{$oldCommitLink := HTMLFormat "%[2]s" $oldCommitUrl $oldShortSha}}{{$newCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.NewCommit}}{{$newShortSha := ShortSha .Comment.NewCommit}}{{$newCommitLink := HTMLFormat "%[2]s" $newCommitUrl $newShortSha}}{{.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}}

{{end}}

{{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}}{{- if eq .Body ""}}{{if eq .ActionName "new"}}{{.locale.Tr "mail.issue.action.new" .Doer.Name .Issue.Index}}{{end}}{{else}}{{.Body}}{{end -}}

{{- range .ReviewComments}}

{{$.locale.Tr "mail.issue.in_tree_path" .TreePath}}

{{.Patch}}
{{.RenderedContent}}
{{end -}}{{if eq .ActionName "push"}}{{end}}

+

+ +
+ Activate Account » +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

Quick Info

+ + + +
From
{{AppName}}
Expires
{{.ActiveCodeLives}}
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/ink/mail/repo/release.tmpl b/themes/ink/mail/repo/release.tmpl new file mode 100644 index 0000000..44444e6 --- /dev/null +++ b/themes/ink/mail/repo/release.tmpl @@ -0,0 +1,64 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + + + + +
+ logo + {{AppName}}
+ Gitea Mail Templates +
+

+ D +

+

{{$release_url := HTMLFormat "%s" .Release.HTMLURL .Release.TagName}}{{$repo_url := HTMLFormat "%s" .Release.Repo.HTMLURL .Release.Repo.FullName}}{{.locale.Tr "mail.release.new.text" .Release.Publisher.Name $release_url $repo_url}} +

{{.locale.Tr "mail.release.title" .Release.Title}}

+{{if .Release.RenderedNote}}
{{.Release.RenderedNote}}
{{end}} +

{{.locale.Tr "mail.release.downloads"}}

+

+

+ +
+ Activate Account » +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

Quick Info

+ + + +
From
{{AppName}}
Expires
{{.ActiveCodeLives}}
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/ink/mail/repo/transfer.tmpl b/themes/ink/mail/repo/transfer.tmpl new file mode 100644 index 0000000..da91ad3 --- /dev/null +++ b/themes/ink/mail/repo/transfer.tmpl @@ -0,0 +1,60 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + + + + +
+ logo + {{AppName}}
+ Gitea Mail Templates +
+

+ D +

+

{{$url := HTMLFormat "%[2]s" .Link .Repo}}{{.Subject}}. {{.locale.Tr "mail.repo.transfer.body" $url}}

+

+ +
+ Activate Account » +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

Quick Info

+ + + +
From
{{AppName}}
Expires
{{.ActiveCodeLives}}
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/ink/mail/user/auth/activate.tmpl b/themes/ink/mail/user/auth/activate.tmpl new file mode 100644 index 0000000..735bcb8 --- /dev/null +++ b/themes/ink/mail/user/auth/activate.tmpl @@ -0,0 +1,60 @@ + + + + + + + {{.locale.Tr "mail.activate_account.title" (.DisplayName|DotEscape)}} + + + +
+ + + + + + + + + + + + +
+ logo + {{AppName}}
+ Gitea Mail Templates +
+

+ D{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

{{.locale.Tr "mail.activate_account.text_1" (.DisplayName|DotEscape) AppName}}

+

{{.locale.Tr "mail.activate_account.text_2" .ActiveCodeLives}}

+ {{$activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}} +
+ Activate Account » +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{$activate_url}}

+
+
+

Quick Info

+ + + +
From
{{AppName}}
Expires
{{.ActiveCodeLives}}
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/ink/mail/user/auth/activate_email.tmpl b/themes/ink/mail/user/auth/activate_email.tmpl new file mode 100644 index 0000000..631ef56 --- /dev/null +++ b/themes/ink/mail/user/auth/activate_email.tmpl @@ -0,0 +1,60 @@ + + + + + + + {{.locale.Tr "mail.activate_email.title" (.DisplayName|DotEscape)}} + + + +
+ + + + + + + + + + + + +
+ logo + {{AppName}}
+ Gitea Mail Templates +
+

+ D{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

{{.locale.Tr "mail.activate_email.text" .ActiveCodeLives}}

+

+ {{$activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}} +
+ Activate Account » +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{$activate_url}}

+
+
+

Quick Info

+ + + +
From
{{AppName}}
Expires
{{.ActiveCodeLives}}
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/ink/mail/user/auth/register_notify.tmpl b/themes/ink/mail/user/auth/register_notify.tmpl new file mode 100644 index 0000000..6f50223 --- /dev/null +++ b/themes/ink/mail/user/auth/register_notify.tmpl @@ -0,0 +1,62 @@ + + + + + + + {{.locale.Tr "mail.register_notify.title" (.DisplayName|DotEscape) AppName}} + + + +
+ + + + + + + + + + + + +
+ logo + {{AppName}}
+ Gitea Mail Templates +
+

+ D{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

{{.locale.Tr "mail.register_notify.text_1" AppName}}

+

{{.locale.Tr "mail.register_notify.text_2" .Username}} +{{$set_pwd_url := printf "%suser/forgot_password" AppUrl}} +{{.locale.Tr "mail.register_notify.text_3" $set_pwd_url}}

+ +
+ Activate Account » +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{AppUrl}}user/login

+
+
+

Quick Info

+ + + +
From
{{AppName}}
Expires
{{.ActiveCodeLives}}
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/ink/mail/user/auth/reset_passwd.tmpl b/themes/ink/mail/user/auth/reset_passwd.tmpl new file mode 100644 index 0000000..d09ba38 --- /dev/null +++ b/themes/ink/mail/user/auth/reset_passwd.tmpl @@ -0,0 +1,60 @@ + + + + + + + {{.locale.Tr "mail.reset_password.title" (.DisplayName|DotEscape)}} + + + +
+ + + + + + + + + + + + +
+ logo + {{AppName}}
+ Gitea Mail Templates +
+

+ D{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

{{.locale.Tr "mail.reset_password.text" .ResetPwdCodeLives}}

+

+ {{$recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}} +
+ Activate Account » +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{$recover_url}}

+
+
+

Quick Info

+ + + +
From
{{AppName}}
Expires
{{.ActiveCodeLives}}
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/mono/mail/org/team_invite.tmpl b/themes/mono/mail/org/team_invite.tmpl new file mode 100644 index 0000000..b975c81 --- /dev/null +++ b/themes/mono/mail/org/team_invite.tmpl @@ -0,0 +1,57 @@ + + + + + + + {{AppName}} - Team Invitation + + + +
+ + + + + + + + + +
+ {{AppName}}* +
+ + + + + +
+

{{.locale.Tr "mail.hi_user_x" .Invite.Email}}

+

{{.locale.Tr "mail.team_invite.text_1" (DotEscape .Inviter.DisplayName) (DotEscape .Team.Name) (DotEscape .Organization.DisplayName)}}

+

{{.locale.Tr "mail.team_invite.text_2"}}

+
+
+ +
+ ACTIVATE +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.InviteURL}}

+
+
+

{{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/mono/mail/repo/actions/workflow_run.tmpl b/themes/mono/mail/repo/actions/workflow_run.tmpl new file mode 100644 index 0000000..fa11147 --- /dev/null +++ b/themes/mono/mail/repo/actions/workflow_run.tmpl @@ -0,0 +1,57 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + +
+ {{AppName}}* +
+ + + + + +
+

+

{{.Repo.FullName}} - {{.Run.WorkflowID}}: {{.RunStatusText}}

+

+
+
+ +
+ ACTIVATE +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Run.HTMLURL}}

+
+
+

{{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/mono/mail/repo/collaborator.tmpl b/themes/mono/mail/repo/collaborator.tmpl new file mode 100644 index 0000000..4b807bb --- /dev/null +++ b/themes/mono/mail/repo/collaborator.tmpl @@ -0,0 +1,57 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + +
+ {{AppName}}* +
+ + + + + +
+

+

{{.locale.Tr "mail.repo.collaborator.added.text"}} {{.RepoName}}.

+

+
+
+ +
+ ACTIVATE +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

{{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/mono/mail/repo/issue/assigned.tmpl b/themes/mono/mail/repo/issue/assigned.tmpl new file mode 100644 index 0000000..3c4ee30 --- /dev/null +++ b/themes/mono/mail/repo/issue/assigned.tmpl @@ -0,0 +1,57 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + +
+ {{AppName}}* +
+ + + + + +
+

+

{{$repo_url := HTMLFormat "%s" .Issue.Repo.HTMLURL .Issue.Repo.FullName}}{{$link := HTMLFormat "#%d" .Link .Issue.Index}}{{if .IsPull}}{{.locale.Tr "mail.issue_assigned.pull" .Doer.Name $link $repo_url}}{{else}}{{.locale.Tr "mail.issue_assigned.issue" .Doer.Name $link $repo_url}}{{end}}

+

+
+
+ +
+ ACTIVATE +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

{{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/mono/mail/repo/issue/default.tmpl b/themes/mono/mail/repo/issue/default.tmpl new file mode 100644 index 0000000..a9b48a5 --- /dev/null +++ b/themes/mono/mail/repo/issue/default.tmpl @@ -0,0 +1,57 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + +
+ {{AppName}}* +
+ + + + + +
+

+

{{if .IsMention}}

{{.locale.Tr "mail.issue.x_mentioned_you" .Doer.Name}}

{{end}}{{if eq .ActionName "push"}}

{{if .Comment.IsForcePush}}{{$oldCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.OldCommit}}{{$oldShortSha := ShortSha .Comment.OldCommit}}{{$oldCommitLink := HTMLFormat "%[2]s" $oldCommitUrl $oldShortSha}}{{$newCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.NewCommit}}{{$newShortSha := ShortSha .Comment.NewCommit}}{{$newCommitLink := HTMLFormat "%[2]s" $newCommitUrl $newShortSha}}{{.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}}

{{end}}

{{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}}{{- if eq .Body ""}}{{if eq .ActionName "new"}}{{.locale.Tr "mail.issue.action.new" .Doer.Name .Issue.Index}}{{end}}{{else}}{{.Body}}{{end -}}

{{- range .ReviewComments}}

{{$.locale.Tr "mail.issue.in_tree_path" .TreePath}}

{{.Patch}}
{{.RenderedContent}}
{{end -}}{{if eq .ActionName "push"}}{{end}}

+

+
+
+ +
+ ACTIVATE +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

{{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/mono/mail/repo/release.tmpl b/themes/mono/mail/repo/release.tmpl new file mode 100644 index 0000000..7b06bc8 --- /dev/null +++ b/themes/mono/mail/repo/release.tmpl @@ -0,0 +1,61 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + +
+ {{AppName}}* +
+ + + + + +
+

+

{{$release_url := HTMLFormat "%s" .Release.HTMLURL .Release.TagName}}{{$repo_url := HTMLFormat "%s" .Release.Repo.HTMLURL .Release.Repo.FullName}}{{.locale.Tr "mail.release.new.text" .Release.Publisher.Name $release_url $repo_url}} +

{{.locale.Tr "mail.release.title" .Release.Title}}

+{{if .Release.RenderedNote}}
{{.Release.RenderedNote}}
{{end}} +

{{.locale.Tr "mail.release.downloads"}}

+

+

+
+
+ +
+ ACTIVATE +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

{{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/mono/mail/repo/transfer.tmpl b/themes/mono/mail/repo/transfer.tmpl new file mode 100644 index 0000000..c8ee559 --- /dev/null +++ b/themes/mono/mail/repo/transfer.tmpl @@ -0,0 +1,57 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + +
+ {{AppName}}* +
+ + + + + +
+

+

{{$url := HTMLFormat "%[2]s" .Link .Repo}}{{.Subject}}. {{.locale.Tr "mail.repo.transfer.body" $url}}

+

+
+
+ +
+ ACTIVATE +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

{{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/mono/mail/user/auth/activate.tmpl b/themes/mono/mail/user/auth/activate.tmpl new file mode 100644 index 0000000..bdbb3c6 --- /dev/null +++ b/themes/mono/mail/user/auth/activate.tmpl @@ -0,0 +1,57 @@ + + + + + + + {{.locale.Tr "mail.activate_account.title" (.DisplayName|DotEscape)}} + + + +
+ + + + + + + + + +
+ {{AppName}}* +
+ + + + + +
+

{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}

+

{{.locale.Tr "mail.activate_account.text_1" (.DisplayName|DotEscape) AppName}}

+

{{.locale.Tr "mail.activate_account.text_2" .ActiveCodeLives}}

+
+
+ {{$activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}} +
+ ACTIVATE +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{$activate_url}}

+
+
+

{{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/mono/mail/user/auth/activate_email.tmpl b/themes/mono/mail/user/auth/activate_email.tmpl new file mode 100644 index 0000000..8b4beee --- /dev/null +++ b/themes/mono/mail/user/auth/activate_email.tmpl @@ -0,0 +1,57 @@ + + + + + + + {{.locale.Tr "mail.activate_email.title" (.DisplayName|DotEscape)}} + + + +
+ + + + + + + + + +
+ {{AppName}}* +
+ + + + + +
+

{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}

+

{{.locale.Tr "mail.activate_email.text" .ActiveCodeLives}}

+

+
+
+ {{$activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}} +
+ ACTIVATE +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{$activate_url}}

+
+
+

{{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/mono/mail/user/auth/register_notify.tmpl b/themes/mono/mail/user/auth/register_notify.tmpl new file mode 100644 index 0000000..c97661b --- /dev/null +++ b/themes/mono/mail/user/auth/register_notify.tmpl @@ -0,0 +1,59 @@ + + + + + + + {{.locale.Tr "mail.register_notify.title" (.DisplayName|DotEscape) AppName}} + + + +
+ + + + + + + + + +
+ {{AppName}}* +
+ + + + + +
+

{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}

+

{{.locale.Tr "mail.register_notify.text_1" AppName}}

+

{{.locale.Tr "mail.register_notify.text_2" .Username}} +{{$set_pwd_url := printf "%suser/forgot_password" AppUrl}} +{{.locale.Tr "mail.register_notify.text_3" $set_pwd_url}}

+
+
+ +
+ ACTIVATE +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{AppUrl}}user/login

+
+
+

{{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/mono/mail/user/auth/reset_passwd.tmpl b/themes/mono/mail/user/auth/reset_passwd.tmpl new file mode 100644 index 0000000..bd77946 --- /dev/null +++ b/themes/mono/mail/user/auth/reset_passwd.tmpl @@ -0,0 +1,57 @@ + + + + + + + {{.locale.Tr "mail.reset_password.title" (.DisplayName|DotEscape)}} + + + +
+ + + + + + + + + +
+ {{AppName}}* +
+ + + + + +
+

{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}

+

{{.locale.Tr "mail.reset_password.text" .ResetPwdCodeLives}}

+

+
+
+ {{$recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}} +
+ ACTIVATE +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{$recover_url}}

+
+
+

{{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/neon/mail/org/team_invite.tmpl b/themes/neon/mail/org/team_invite.tmpl new file mode 100644 index 0000000..1d548af --- /dev/null +++ b/themes/neon/mail/org/team_invite.tmpl @@ -0,0 +1,50 @@ + + + + + + + {{AppName}} - Team Invitation + + + +
+ + + + + + + + + +
+
+ {{AppName}} +
+
+

{{.locale.Tr "mail.hi_user_x" .Invite.Email}}

+
+

{{.locale.Tr "mail.team_invite.text_1" (DotEscape .Inviter.DisplayName) (DotEscape .Team.Name) (DotEscape .Organization.DisplayName)}}

+

{{.locale.Tr "mail.team_invite.text_2"}}

+ +
+ Accept Invitation +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.InviteURL}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/neon/mail/repo/actions/workflow_run.tmpl b/themes/neon/mail/repo/actions/workflow_run.tmpl new file mode 100644 index 0000000..dfab28e --- /dev/null +++ b/themes/neon/mail/repo/actions/workflow_run.tmpl @@ -0,0 +1,50 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + +
+
+ {{AppName}} +
+
+

+
+

{{.Repo.FullName}} - {{.Run.WorkflowID}}: {{.RunStatusText}}

+

+ +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Run.HTMLURL}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/neon/mail/repo/collaborator.tmpl b/themes/neon/mail/repo/collaborator.tmpl new file mode 100644 index 0000000..d2e423d --- /dev/null +++ b/themes/neon/mail/repo/collaborator.tmpl @@ -0,0 +1,50 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + +
+
+ {{AppName}} +
+
+

+
+

{{.locale.Tr "mail.repo.collaborator.added.text"}} {{.RepoName}}.

+

+ +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/neon/mail/repo/issue/assigned.tmpl b/themes/neon/mail/repo/issue/assigned.tmpl new file mode 100644 index 0000000..8f7e7a8 --- /dev/null +++ b/themes/neon/mail/repo/issue/assigned.tmpl @@ -0,0 +1,50 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + +
+
+ {{AppName}} +
+
+

+
+

{{$repo_url := HTMLFormat "%s" .Issue.Repo.HTMLURL .Issue.Repo.FullName}}{{$link := HTMLFormat "#%d" .Link .Issue.Index}}{{if .IsPull}}{{.locale.Tr "mail.issue_assigned.pull" .Doer.Name $link $repo_url}}{{else}}{{.locale.Tr "mail.issue_assigned.issue" .Doer.Name $link $repo_url}}{{end}}

+

+ +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/neon/mail/repo/issue/default.tmpl b/themes/neon/mail/repo/issue/default.tmpl new file mode 100644 index 0000000..e63c610 --- /dev/null +++ b/themes/neon/mail/repo/issue/default.tmpl @@ -0,0 +1,50 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + +
+
+ {{AppName}} +
+
+

+
+

{{if .IsMention}}

{{.locale.Tr "mail.issue.x_mentioned_you" .Doer.Name}}

{{end}}{{if eq .ActionName "push"}}

{{if .Comment.IsForcePush}}{{$oldCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.OldCommit}}{{$oldShortSha := ShortSha .Comment.OldCommit}}{{$oldCommitLink := HTMLFormat "%[2]s" $oldCommitUrl $oldShortSha}}{{$newCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.NewCommit}}{{$newShortSha := ShortSha .Comment.NewCommit}}{{$newCommitLink := HTMLFormat "%[2]s" $newCommitUrl $newShortSha}}{{.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}}

{{end}}

{{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}}{{- if eq .Body ""}}{{if eq .ActionName "new"}}{{.locale.Tr "mail.issue.action.new" .Doer.Name .Issue.Index}}{{end}}{{else}}{{.Body}}{{end -}}

{{- range .ReviewComments}}

{{$.locale.Tr "mail.issue.in_tree_path" .TreePath}}

{{.Patch}}
{{.RenderedContent}}
{{end -}}{{if eq .ActionName "push"}}{{end}}

+

+ +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/neon/mail/repo/release.tmpl b/themes/neon/mail/repo/release.tmpl new file mode 100644 index 0000000..d10d56b --- /dev/null +++ b/themes/neon/mail/repo/release.tmpl @@ -0,0 +1,54 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + +
+
+ {{AppName}} +
+
+

+
+

{{$release_url := HTMLFormat "%s" .Release.HTMLURL .Release.TagName}}{{$repo_url := HTMLFormat "%s" .Release.Repo.HTMLURL .Release.Repo.FullName}}{{.locale.Tr "mail.release.new.text" .Release.Publisher.Name $release_url $repo_url}} +

{{.locale.Tr "mail.release.title" .Release.Title}}

+{{if .Release.RenderedNote}}
{{.Release.RenderedNote}}
{{end}} +

{{.locale.Tr "mail.release.downloads"}}

+

+

+ +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/neon/mail/repo/transfer.tmpl b/themes/neon/mail/repo/transfer.tmpl new file mode 100644 index 0000000..d62e1ad --- /dev/null +++ b/themes/neon/mail/repo/transfer.tmpl @@ -0,0 +1,50 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + + +
+
+ {{AppName}} +
+
+

+
+

{{$url := HTMLFormat "%[2]s" .Link .Repo}}{{.Subject}}. {{.locale.Tr "mail.repo.transfer.body" $url}}

+

+ +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/neon/mail/user/auth/activate.tmpl b/themes/neon/mail/user/auth/activate.tmpl new file mode 100644 index 0000000..29e4e74 --- /dev/null +++ b/themes/neon/mail/user/auth/activate.tmpl @@ -0,0 +1,50 @@ + + + + + + + {{.locale.Tr "mail.activate_account.title" (.DisplayName|DotEscape)}} + + + +
+ + + + + + + + + +
+
+ {{AppName}} +
+
+

{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}

+
+

{{.locale.Tr "mail.activate_account.text_1" (.DisplayName|DotEscape) AppName}}

+

{{.locale.Tr "mail.activate_account.text_2" .ActiveCodeLives}}

+ {{$activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}} +
+ Activate Account +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{$activate_url}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/neon/mail/user/auth/activate_email.tmpl b/themes/neon/mail/user/auth/activate_email.tmpl new file mode 100644 index 0000000..e7f8dbf --- /dev/null +++ b/themes/neon/mail/user/auth/activate_email.tmpl @@ -0,0 +1,50 @@ + + + + + + + {{.locale.Tr "mail.activate_email.title" (.DisplayName|DotEscape)}} + + + +
+ + + + + + + + + +
+
+ {{AppName}} +
+
+

{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}

+
+

{{.locale.Tr "mail.activate_email.text" .ActiveCodeLives}}

+

+ {{$activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}} +
+ Verify Email Address +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{$activate_url}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/neon/mail/user/auth/register_notify.tmpl b/themes/neon/mail/user/auth/register_notify.tmpl new file mode 100644 index 0000000..66454f3 --- /dev/null +++ b/themes/neon/mail/user/auth/register_notify.tmpl @@ -0,0 +1,52 @@ + + + + + + + {{.locale.Tr "mail.register_notify.title" (.DisplayName|DotEscape) AppName}} + + + +
+ + + + + + + + + +
+
+ {{AppName}} +
+
+

{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}

+
+

{{.locale.Tr "mail.register_notify.text_1" AppName}}

+

{{.locale.Tr "mail.register_notify.text_2" .Username}} +{{$set_pwd_url := printf "%suser/forgot_password" AppUrl}} +{{.locale.Tr "mail.register_notify.text_3" $set_pwd_url}}

+ +
+ Go to {{AppName}} +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{AppUrl}}user/login

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/neon/mail/user/auth/reset_passwd.tmpl b/themes/neon/mail/user/auth/reset_passwd.tmpl new file mode 100644 index 0000000..d39d412 --- /dev/null +++ b/themes/neon/mail/user/auth/reset_passwd.tmpl @@ -0,0 +1,50 @@ + + + + + + + {{.locale.Tr "mail.reset_password.title" (.DisplayName|DotEscape)}} + + + +
+ + + + + + + + + +
+
+ {{AppName}} +
+
+

{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}

+
+

{{.locale.Tr "mail.reset_password.text" .ResetPwdCodeLives}}

+

+ {{$recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}} +
+ Reset Password +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{$recover_url}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/terminal/mail/org/team_invite.tmpl b/themes/terminal/mail/org/team_invite.tmpl new file mode 100644 index 0000000..7c33b5a --- /dev/null +++ b/themes/terminal/mail/org/team_invite.tmpl @@ -0,0 +1,76 @@ + + + + + + {{AppName}} > team_invite + + + + +
+
+ +
+ + + + +
+ > {{AppName}} +
+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" .Invite.Email}} +

+ +

+ {{.locale.Tr "mail.team_invite.text_1" (DotEscape .Inviter.DisplayName) (DotEscape .Team.Name) (DotEscape .Organization.DisplayName)}} +

+ +

+ {{.locale.Tr "mail.team_invite.text_2"}} +

+ + + + + +
+ $ join_team --accept +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ ┌─
+ │ {{.InviteURL}}
+ └─ +

+
+ +

+ {{.locale.Tr "mail.team_invite.text_3" .Invite.Email}} +

+
+ +
+

+ # © {{AppName}} +

+

+ # if (!$expecting) { ignore(); } +

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/terminal/mail/repo/actions/workflow_run.tmpl b/themes/terminal/mail/repo/actions/workflow_run.tmpl new file mode 100644 index 0000000..60785d2 --- /dev/null +++ b/themes/terminal/mail/repo/actions/workflow_run.tmpl @@ -0,0 +1,74 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ + + + +
+ > {{AppName}} +
+
+ +
+

+ {{.Repo.FullName}} :: {{.Run.WorkflowID}} — {{.RunStatusText}} +

+ + + + + + + +
+ $ tail -f workflow.log +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ ┌─
+ │ {{.Run.HTMLURL}}
+ └─ +

+
+
+ +
+

+ # © {{AppName}} +

+

+ # if (!$expecting) { ignore(); } +

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/terminal/mail/repo/collaborator.tmpl b/themes/terminal/mail/repo/collaborator.tmpl new file mode 100644 index 0000000..e6ce37c --- /dev/null +++ b/themes/terminal/mail/repo/collaborator.tmpl @@ -0,0 +1,65 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ + + + +
+ > {{AppName}} +
+
+ +
+

+ {{.locale.Tr "mail.repo.collaborator.added.text"}} {{.RepoName}}. +

+ + + + + +
+ $ cd repo/ && ls +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ ┌─
+ │ {{.Link}}
+ └─ +

+
+
+ +
+

+ # © {{AppName}} +

+

+ # if (!$expecting) { ignore(); } +

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/terminal/mail/repo/issue/assigned.tmpl b/themes/terminal/mail/repo/issue/assigned.tmpl new file mode 100644 index 0000000..8442080 --- /dev/null +++ b/themes/terminal/mail/repo/issue/assigned.tmpl @@ -0,0 +1,70 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ + + + +
+ > {{AppName}} +
+
+ +
+ {{$repo_url := HTMLFormat "%s" .Issue.Repo.HTMLURL .Issue.Repo.FullName}} + {{$link := HTMLFormat "#%d" .Link .Issue.Index}} +

+ {{if .IsPull}} + {{.locale.Tr "mail.issue_assigned.pull" .Doer.Name $link $repo_url}} + {{else}} + {{.locale.Tr "mail.issue_assigned.issue" .Doer.Name $link $repo_url}} + {{end}} +

+ + + + + +
+ $ view_issue +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ ┌─
+ │ {{.Link}}
+ └─ +

+
+
+ +
+

+ # © {{AppName}} +

+

+ # if (!$expecting) { ignore(); } +

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/terminal/mail/repo/issue/default.tmpl b/themes/terminal/mail/repo/issue/default.tmpl new file mode 100644 index 0000000..8bc58a6 --- /dev/null +++ b/themes/terminal/mail/repo/issue/default.tmpl @@ -0,0 +1,130 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ + + + +
+ > {{AppName}} +
+
+ +
+ {{if .IsMention}}

{{.locale.Tr "mail.issue.x_mentioned_you" .Doer.Name}}

{{end}} + {{if eq .ActionName "push"}} +

+ {{if .Comment.IsForcePush}} + {{$oldCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.OldCommit}} + {{$oldShortSha := ShortSha .Comment.OldCommit}} + {{$oldCommitLink := HTMLFormat "%[2]s" $oldCommitUrl $oldShortSha}} + + {{$newCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.NewCommit}} + {{$newShortSha := ShortSha .Comment.NewCommit}} + {{$newCommitLink := HTMLFormat "%[2]s" $newCommitUrl $newShortSha}} + + {{.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}} +

+ {{end}} +

+ {{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}} + + {{- if eq .Body ""}} + {{if eq .ActionName "new"}} + {{.locale.Tr "mail.issue.action.new" .Doer.Name .Issue.Index}} + {{end}} + {{else}} + {{.Body}} + {{end -}} +

+ + {{- range .ReviewComments}} +
+

{{$.locale.Tr "mail.issue.in_tree_path" .TreePath}}

+
+
{{.Patch}}
+
{{.RenderedContent}}
+
+ {{end -}} + + {{if eq .ActionName "push"}} + + {{end}} + + + + + +
+ $ view_on_{{AppName}} +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ ┌─
+ │ {{.Link}}
+ └─ +

+
+
+ +
+

+ # © {{AppName}} +

+

+ # if (!$expecting) { ignore(); } +

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/terminal/mail/repo/release.tmpl b/themes/terminal/mail/repo/release.tmpl new file mode 100644 index 0000000..ea590ef --- /dev/null +++ b/themes/terminal/mail/repo/release.tmpl @@ -0,0 +1,96 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ + + + +
+ > {{AppName}} +
+
+ +
+ {{$release_url := HTMLFormat "%s" .Release.HTMLURL .Release.TagName}} + {{$repo_url := HTMLFormat "%s" .Release.Repo.HTMLURL .Release.Repo.FullName}} +

+ {{.locale.Tr "mail.release.new.text" .Release.Publisher.Name $release_url $repo_url}} +

+ +

{{.locale.Tr "mail.release.title" .Release.Title}}

+ + {{if .Release.RenderedNote}} +
+ {{.Release.RenderedNote}} +
+ {{end}} + +

{{.locale.Tr "mail.release.downloads"}}

+ + + + + + +
+ $ view_release +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ ┌─
+ │ {{.Link}}
+ └─ +

+
+
+ +
+

+ # © {{AppName}} +

+

+ # if (!$expecting) { ignore(); } +

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/terminal/mail/repo/transfer.tmpl b/themes/terminal/mail/repo/transfer.tmpl new file mode 100644 index 0000000..f03c000 --- /dev/null +++ b/themes/terminal/mail/repo/transfer.tmpl @@ -0,0 +1,65 @@ + + + + + + {{.Subject}} + + + + +
+
+ +
+ + + + +
+ > {{AppName}} +
+
+ +
+ {{$url := HTMLFormat "%[2]s" .Link .Repo}} +

+ {{.Subject}}. {{.locale.Tr "mail.repo.transfer.body" $url}} +

+ + + + + +
+ $ view_transfer +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ ┌─
+ │ {{.Link}}
+ └─ +

+
+
+ +
+

+ # © {{AppName}} +

+

+ # if (!$expecting) { ignore(); } +

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/terminal/mail/user/auth/activate.tmpl b/themes/terminal/mail/user/auth/activate.tmpl new file mode 100644 index 0000000..a6bb1e0 --- /dev/null +++ b/themes/terminal/mail/user/auth/activate.tmpl @@ -0,0 +1,71 @@ + + + + + + {{.locale.Tr "mail.activate_account.title" (.DisplayName|DotEscape)}} + + + + +
+
+ +
+ + + + +
+ > {{AppName}} +
+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.activate_account.text_1" (.DisplayName|DotEscape) AppName}} +

+

+ {{.locale.Tr "mail.activate_account.text_2" .ActiveCodeLives}} +

+ + {{$activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}} + + + + +
+ $ activate_account +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ ┌─
+ │ {{$activate_url}}
+ └─ +

+
+
+ +
+

+ # © {{AppName}} +

+

+ # if (!$expecting) { ignore(); } +

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/terminal/mail/user/auth/activate_email.tmpl b/themes/terminal/mail/user/auth/activate_email.tmpl new file mode 100644 index 0000000..0057c7c --- /dev/null +++ b/themes/terminal/mail/user/auth/activate_email.tmpl @@ -0,0 +1,68 @@ + + + + + + {{.locale.Tr "mail.activate_email.title" (.DisplayName|DotEscape)}} + + + + +
+
+ +
+ + + + +
+ > {{AppName}} +
+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.activate_email.text" .ActiveCodeLives}} +

+ + {{$activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}} + + + + +
+ $ verify_email +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ ┌─
+ │ {{$activate_url}}
+ └─ +

+
+
+ +
+

+ # © {{AppName}} +

+

+ # if (!$expecting) { ignore(); } +

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/terminal/mail/user/auth/register_notify.tmpl b/themes/terminal/mail/user/auth/register_notify.tmpl new file mode 100644 index 0000000..320cbde --- /dev/null +++ b/themes/terminal/mail/user/auth/register_notify.tmpl @@ -0,0 +1,75 @@ + + + + + + {{.locale.Tr "mail.register_notify.title" (.DisplayName|DotEscape) AppName}} + + + + +
+
+ +
+ + + + +
+ > {{AppName}} +
+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.register_notify.text_1" AppName}} +

+

+ {{.locale.Tr "mail.register_notify.text_2" .Username}} +

+ + + + + +
+ $ ssh user@login +
+ + {{$set_pwd_url := printf "%suser/forgot_password" AppUrl}} +

+ {{.locale.Tr "mail.register_notify.text_3" $set_pwd_url}} +

+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ ┌─
+ │ {{AppUrl}}user/login
+ └─ +

+
+
+ +
+

+ # © {{AppName}} +

+

+ # if (!$expecting) { ignore(); } +

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/terminal/mail/user/auth/reset_passwd.tmpl b/themes/terminal/mail/user/auth/reset_passwd.tmpl new file mode 100644 index 0000000..3db29a7 --- /dev/null +++ b/themes/terminal/mail/user/auth/reset_passwd.tmpl @@ -0,0 +1,68 @@ + + + + + + {{.locale.Tr "mail.reset_password.title" (.DisplayName|DotEscape)}} + + + + +
+
+ +
+ + + + +
+ > {{AppName}} +
+
+ +
+

+ {{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}} +

+

+ {{.locale.Tr "mail.reset_password.text" .ResetPwdCodeLives}} +

+ + {{$recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}} + + + + +
+ $ reset_password +
+ +
+

+ {{.locale.Tr "mail.link_not_working_do_paste"}} +

+

+ ┌─
+ │ {{$recover_url}}
+ └─ +

+
+
+ +
+

+ # © {{AppName}} +

+

+ # if (!$expecting) { ignore(); } +

+
+ +
+
+ + + \ No newline at end of file diff --git a/themes/terra/mail/org/team_invite.tmpl b/themes/terra/mail/org/team_invite.tmpl new file mode 100644 index 0000000..f27551a --- /dev/null +++ b/themes/terra/mail/org/team_invite.tmpl @@ -0,0 +1,51 @@ + + + + + + + {{AppName}} - Team Invitation + + + +
+ + + + + + + + +
+
+ logo + {{AppName}} +
+
+
+

{{.locale.Tr "mail.hi_user_x" .Invite.Email}}

+
+

{{.locale.Tr "mail.team_invite.text_1" (DotEscape .Inviter.DisplayName) (DotEscape .Team.Name) (DotEscape .Organization.DisplayName)}}

+

{{.locale.Tr "mail.team_invite.text_2"}}

+ +
+ Activate Your Account +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.InviteURL}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/terra/mail/repo/actions/workflow_run.tmpl b/themes/terra/mail/repo/actions/workflow_run.tmpl new file mode 100644 index 0000000..b17d4c0 --- /dev/null +++ b/themes/terra/mail/repo/actions/workflow_run.tmpl @@ -0,0 +1,51 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + +
+
+ logo + {{AppName}} +
+
+
+

+
+

{{.Repo.FullName}} - {{.Run.WorkflowID}}: {{.RunStatusText}}

+

+ +
+ Activate Your Account +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Run.HTMLURL}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/terra/mail/repo/collaborator.tmpl b/themes/terra/mail/repo/collaborator.tmpl new file mode 100644 index 0000000..eecdee6 --- /dev/null +++ b/themes/terra/mail/repo/collaborator.tmpl @@ -0,0 +1,51 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + +
+
+ logo + {{AppName}} +
+
+
+

+
+

{{.locale.Tr "mail.repo.collaborator.added.text"}} {{.RepoName}}.

+

+ +
+ Activate Your Account +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/terra/mail/repo/issue/assigned.tmpl b/themes/terra/mail/repo/issue/assigned.tmpl new file mode 100644 index 0000000..1e3b8c0 --- /dev/null +++ b/themes/terra/mail/repo/issue/assigned.tmpl @@ -0,0 +1,51 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + +
+
+ logo + {{AppName}} +
+
+
+

+
+

{{$repo_url := HTMLFormat "%s" .Issue.Repo.HTMLURL .Issue.Repo.FullName}}{{$link := HTMLFormat "#%d" .Link .Issue.Index}}{{if .IsPull}}{{.locale.Tr "mail.issue_assigned.pull" .Doer.Name $link $repo_url}}{{else}}{{.locale.Tr "mail.issue_assigned.issue" .Doer.Name $link $repo_url}}{{end}}

+

+ +
+ Activate Your Account +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/terra/mail/repo/issue/default.tmpl b/themes/terra/mail/repo/issue/default.tmpl new file mode 100644 index 0000000..962b330 --- /dev/null +++ b/themes/terra/mail/repo/issue/default.tmpl @@ -0,0 +1,51 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + +
+
+ logo + {{AppName}} +
+
+
+

+
+

{{if .IsMention}}

{{.locale.Tr "mail.issue.x_mentioned_you" .Doer.Name}}

{{end}}{{if eq .ActionName "push"}}

{{if .Comment.IsForcePush}}{{$oldCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.OldCommit}}{{$oldShortSha := ShortSha .Comment.OldCommit}}{{$oldCommitLink := HTMLFormat "%[2]s" $oldCommitUrl $oldShortSha}}{{$newCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.NewCommit}}{{$newShortSha := ShortSha .Comment.NewCommit}}{{$newCommitLink := HTMLFormat "%[2]s" $newCommitUrl $newShortSha}}{{.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}}

{{end}}

{{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}}{{- if eq .Body ""}}{{if eq .ActionName "new"}}{{.locale.Tr "mail.issue.action.new" .Doer.Name .Issue.Index}}{{end}}{{else}}{{.Body}}{{end -}}

{{- range .ReviewComments}}

{{$.locale.Tr "mail.issue.in_tree_path" .TreePath}}

{{.Patch}}
{{.RenderedContent}}
{{end -}}{{if eq .ActionName "push"}}{{end}}

+

+ +
+ Activate Your Account +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/terra/mail/repo/release.tmpl b/themes/terra/mail/repo/release.tmpl new file mode 100644 index 0000000..5bb87ed --- /dev/null +++ b/themes/terra/mail/repo/release.tmpl @@ -0,0 +1,55 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + +
+
+ logo + {{AppName}} +
+
+
+

+
+

{{$release_url := HTMLFormat "%s" .Release.HTMLURL .Release.TagName}}{{$repo_url := HTMLFormat "%s" .Release.Repo.HTMLURL .Release.Repo.FullName}}{{.locale.Tr "mail.release.new.text" .Release.Publisher.Name $release_url $repo_url}} +

{{.locale.Tr "mail.release.title" .Release.Title}}

+{{if .Release.RenderedNote}}
{{.Release.RenderedNote}}
{{end}} +

{{.locale.Tr "mail.release.downloads"}}

+

+

+ +
+ {{.locale.Tr "mail.view_it_on" AppName}} +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/terra/mail/repo/transfer.tmpl b/themes/terra/mail/repo/transfer.tmpl new file mode 100644 index 0000000..2b65c38 --- /dev/null +++ b/themes/terra/mail/repo/transfer.tmpl @@ -0,0 +1,51 @@ + + + + + + + {{.Subject}} + + + +
+ + + + + + + + +
+
+ logo + {{AppName}} +
+
+
+

+
+

{{$url := HTMLFormat "%[2]s" .Link .Repo}}{{.Subject}}. {{.locale.Tr "mail.repo.transfer.body" $url}}

+

+ +
+ Activate Your Account +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{.Link}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/terra/mail/user/auth/activate.tmpl b/themes/terra/mail/user/auth/activate.tmpl new file mode 100644 index 0000000..1ae4836 --- /dev/null +++ b/themes/terra/mail/user/auth/activate.tmpl @@ -0,0 +1,51 @@ + + + + + + + {{.locale.Tr "mail.activate_account.title" (.DisplayName|DotEscape)}} + + + +
+ + + + + + + + +
+
+ logo + {{AppName}} +
+
+
+

{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}

+
+

{{.locale.Tr "mail.activate_account.text_1" (.DisplayName|DotEscape) AppName}}

+

{{.locale.Tr "mail.activate_account.text_2" .ActiveCodeLives}}

+ {{$activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}} +
+ Activate Your Account +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{$activate_url}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/terra/mail/user/auth/activate_email.tmpl b/themes/terra/mail/user/auth/activate_email.tmpl new file mode 100644 index 0000000..79d4432 --- /dev/null +++ b/themes/terra/mail/user/auth/activate_email.tmpl @@ -0,0 +1,51 @@ + + + + + + + {{.locale.Tr "mail.activate_email.title" (.DisplayName|DotEscape)}} + + + +
+ + + + + + + + +
+
+ logo + {{AppName}} +
+
+
+

{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}

+
+

{{.locale.Tr "mail.activate_email.text" .ActiveCodeLives}}

+

+ {{$activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}} +
+ Activate Your Account +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{$activate_url}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/terra/mail/user/auth/register_notify.tmpl b/themes/terra/mail/user/auth/register_notify.tmpl new file mode 100644 index 0000000..cac1c34 --- /dev/null +++ b/themes/terra/mail/user/auth/register_notify.tmpl @@ -0,0 +1,53 @@ + + + + + + + {{.locale.Tr "mail.register_notify.title" (.DisplayName|DotEscape) AppName}} + + + +
+ + + + + + + + +
+
+ logo + {{AppName}} +
+
+
+

{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}

+
+

{{.locale.Tr "mail.register_notify.text_1" AppName}}

+

{{.locale.Tr "mail.register_notify.text_2" .Username}} +{{$set_pwd_url := printf "%suser/forgot_password" AppUrl}} +{{.locale.Tr "mail.register_notify.text_3" $set_pwd_url}}

+ +
+ Activate Your Account +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{AppUrl}}user/login

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/themes/terra/mail/user/auth/reset_passwd.tmpl b/themes/terra/mail/user/auth/reset_passwd.tmpl new file mode 100644 index 0000000..ffff185 --- /dev/null +++ b/themes/terra/mail/user/auth/reset_passwd.tmpl @@ -0,0 +1,51 @@ + + + + + + + {{.locale.Tr "mail.reset_password.title" (.DisplayName|DotEscape)}} + + + +
+ + + + + + + + +
+
+ logo + {{AppName}} +
+
+
+

{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}

+
+

{{.locale.Tr "mail.reset_password.text" .ResetPwdCodeLives}}

+

+ {{$recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}} +
+ Activate Your Account +
+
+

{{.locale.Tr "mail.link_not_working_do_paste"}}

+

{{$recover_url}}

+
+
+

© {{AppName}} — Gitea Mail Templates

+
+
+ + \ No newline at end of file diff --git a/tools/build-preview.go b/tools/build-preview.go new file mode 100644 index 0000000..4a033f2 --- /dev/null +++ b/tools/build-preview.go @@ -0,0 +1,399 @@ +package main + +import ( + "encoding/json" + "fmt" + "html/template" + "log" + "net/url" + "os" + "path/filepath" + "strings" +) + +// TemplateFuncs maps Gitea's built-in template functions +var TemplateFuncs = template.FuncMap{ + "AppUrl": func() string { return "https://about.gitea.com/" }, + "AppName": func() string { return "Gitea" }, + "DotEscape": func(s string) template.HTML { return template.HTML(template.HTMLEscapeString(s)) }, + "QueryEscape": url.QueryEscape, + "ShortSha": ShortSha, + "PathEscapeSegments": PathEscapeSegments, + "FileSize": FileSize, + "HTMLFormat": HTMLFormat, + "Dict": Dict, +} + +func ShortSha(s string) string { + if len(s) > 10 { return s[:10] } + return s +} + +func PathEscapeSegments(s string) string { + parts := strings.Split(s, "/") + for i, p := range parts { parts[i] = url.PathEscape(p) } + return strings.Join(parts, "/") +} + +func FileSize(n int64) string { + const unit = 1024 + if n < unit { return fmt.Sprintf("%d B", n) } + div, exp := int64(unit), 0 + for nn := n / unit; nn >= unit && exp < 3; nn /= unit { div *= unit; exp++ } + return fmt.Sprintf("%.1f %s", float64(n)/float64(div), []string{"KB","MB","GB","TB"}[exp]) +} + +func HTMLFormat(fmtStr string, args ...any) template.HTML { + result := fmtStr + for i, arg := range args { + escaped := template.HTMLEscapeString(fmt.Sprint(arg)) + result = strings.Replace(result, fmt.Sprintf("%%[%d]s", i+1), escaped, 1) + if !strings.Contains(result, fmt.Sprintf("%%[%d]s", i+1)) { + result = strings.Replace(result, "%s", escaped, 1) + result = strings.Replace(result, "%d", fmt.Sprint(arg), 1) + } + } + return template.HTML(result) +} + +func Dict(values ...any) (map[string]any, error) { + if len(values)%2 != 0 { return nil, fmt.Errorf("odd number of Dict args") } + dict := make(map[string]any, len(values)/2) + for i := 0; i < len(values); i += 2 { + key, ok := values[i].(string) + if !ok { return nil, fmt.Errorf("Dict keys must be strings") } + dict[key] = values[i+1] + } + return dict, nil +} + +// Locale provides English fallback translations +type Locale struct{} + +func (l Locale) Tr(key string, args ...any) template.HTML { + s := LocaleEN[key] + if s == "" { s = key } + for _, arg := range args { + var val string + if h, ok := arg.(template.HTML); ok { + val = string(h) // already safe HTML — don't double-escape + } else { + val = template.HTMLEscapeString(fmt.Sprint(arg)) + } + s = strings.Replace(s, "%s", val, 1) + s = strings.Replace(s, "%d", fmt.Sprint(arg), 1) + } + return template.HTML(s) +} + +func (l Locale) TrN(count any, singular, plural string, args ...any) template.HTML { + n := 0 + switch v := count.(type) { + case int: n = v + case int64: n = int(v) + case float64: n = int(v) + default: n = 1 + } + key := plural + if n == 1 { key = singular } + return l.Tr(key, args...) +} + +var LocaleEN = map[string]string{ + "mail.activate_account.title": "Activate your %s account", + "mail.hi_user_x": "Hi %s,", + "mail.activate_account.text_1": "Welcome to %s! Please activate your account by clicking the button below.", + "mail.activate_account.text_2": "This activation link will expire in %s.", + "mail.activate_email.title": "Verify your email address for %s", + "mail.activate_email.text": "Please verify your email address. The link will expire in %s.", + "mail.register_notify.title": "Welcome to %s, %s", + "mail.register_notify.text_1": "Your account on %s has been created successfully.", + "mail.register_notify.text_2": "Your username is: %s", + "mail.register_notify.text_3": "If you need to set a password, visit %s.", + "mail.reset_password.title": "Reset your %s password", + "mail.reset_password.text": "Click the link below to reset your password. It will expire in %s.", + "mail.link_not_working_do_paste": "If the button doesn't work, copy and paste this link into your browser:", + "mail.team_invite.text_1": "%s has invited you to join the team %s in the organization %s.", + "mail.team_invite.text_2": "Click the button below to accept the invitation.", + "mail.team_invite.text_3": "This invitation was sent to %s.", + "mail.repo.collaborator.added.text": "You have been added as a collaborator on the repository", + "mail.view_it_on": "View it on %s", + "mail.repo.transfer.body": "The repository %s has been transferred to you.", + "mail.release.new.text": "%s published a new release %s in the repository %s.", + "mail.release.title": "Release: %s", + "mail.release.note": "Release Notes:", + "mail.release.downloads": "Downloads", + "mail.release.download.zip": "Source Code (ZIP)", + "mail.release.download.targz": "Source Code (TAR.GZ)", + "mail.issue_assigned.pull": "%s assigned pull request %s to you in the repository %s.", + "mail.issue_assigned.issue": "%s assigned issue %s to you in the repository %s.", + "mail.issue.x_mentioned_you": "%s mentioned you.", + "mail.issue.action.close": "%s closed issue #%d.", + "mail.issue.action.reopen": "%s reopened issue #%d.", + "mail.issue.action.merge": "%s merged pull request #%d into %s.", + "mail.issue.action.approve": "%s approved this change.", + "mail.issue.action.reject": "%s requested changes.", + "mail.issue.action.review": "%s reviewed this change.", + "mail.issue.action.review_dismissed": "%s dismissed the review from %s.", + "mail.issue.action.ready_for_review": "%s marked this as ready for review.", + "mail.issue.action.new": "%s created issue #%d.", + "mail.issue.action.force_push": "%s force-pushed the %s branch from %s to %s.", + "mail.issue.action.push_1": "%s pushed %d commit to %s.", + "mail.issue.action.push_n": "%s pushed %d commits to %s.", + "mail.issue.in_tree_path": "In %s:", + "mail.reply": "Reply to this email", +} + +// MockData for each template type +type TemplateDef struct { + Path string + Data map[string]any +} + +var templates = map[string]TemplateDef{ + "activate": { + Path: "mail/user/auth/activate.tmpl", + Data: map[string]any{ + "DisplayName": "Alex Johnson", + "Code": "activation-code-abc123", + "ActiveCodeLives": "24 hours", + }, + }, + "activate_email": { + Path: "mail/user/auth/activate_email.tmpl", + Data: map[string]any{ + "DisplayName": "Alex Johnson", + "Code": "verify-code-xyz789", + "Email": "alex@example.com", + "ActiveCodeLives": "24 hours", + }, + }, + "register_notify": { + Path: "mail/user/auth/register_notify.tmpl", + Data: map[string]any{ + "DisplayName": "Alex Johnson", + "Username": "alexj", + }, + }, + "reset_passwd": { + Path: "mail/user/auth/reset_passwd.tmpl", + Data: map[string]any{ + "DisplayName": "Alex Johnson", + "Code": "reset-token-abc123", + "ResetPwdCodeLives": "3 hours", + }, + }, + "team_invite": { + Path: "mail/org/team_invite.tmpl", + Data: map[string]any{ + "Inviter": map[string]any{"DisplayName": "Sarah Chen"}, + "Team": map[string]any{"Name": "Core Developers"}, + "Organization": map[string]any{"DisplayName": "Acme Corp"}, + "InviteURL": "https://gitea.example.com/org/team/invite?token=invite-abc", + "Invite": map[string]any{"Email": "alex@example.com"}, + }, + }, + "collaborator": { + Path: "mail/repo/collaborator.tmpl", + Data: map[string]any{ + "Subject": "Collaborator Added to repo", + "Link": "https://gitea.example.com/repo/project", + "RepoName": "acme/project", + }, + }, + "transfer": { + Path: "mail/repo/transfer.tmpl", + Data: map[string]any{ + "Subject": "Repository Transfer", + "Link": "https://gitea.example.com/repo/transferred-project", + "Repo": "acme/transferred-project", + }, + }, + "release": { + Path: "mail/repo/release.tmpl", + Data: map[string]any{ + "Subject": "New Release v2.0.0", + "Link": "https://gitea.example.com/repo/project/releases/tag/v2.0.0", + "Release": map[string]any{ + "Publisher": map[string]any{"Name": "Sarah Chen"}, + "HTMLURL": "https://gitea.example.com/repo/project/releases/tag/v2.0.0", + "TagName": "v2.0.0", + "Title": "Version 2.0 -- Major Update", + "RenderedNote": "

Major new features and performance improvements in this release.

", + "Repo": map[string]any{ + "HTMLURL": "https://gitea.example.com/repo/project", + "FullName": "acme/project", + }, + "Attachments": []any{}, + }, + "DisableDownloadSourceArchives": false, + }, + }, + "workflow_run": { + Path: "mail/repo/actions/workflow_run.tmpl", + Data: map[string]any{ + "Subject": "Workflow Run: CI", + "RunStatusText": "All jobs passed", + "Repo": map[string]any{"FullName": "acme/project"}, + "Run": map[string]any{ + "WorkflowID": "ci.yml", + "HTMLURL": "https://gitea.example.com/repo/project/actions/runs/42", + }, + "Jobs": []map[string]any{ + {"Name": "build", "Status": "success", "Attempt": 1, "HTMLURL": "https://gitea.example.com/job/1", "Duration": "2m34s"}, + {"Name": "test", "Status": "success", "Attempt": 1, "HTMLURL": "https://gitea.example.com/job/2", "Duration": "1m12s"}, + {"Name": "deploy", "Status": "success", "Attempt": 2, "HTMLURL": "https://gitea.example.com/job/3", "Duration": "45s"}, + }, + }, + }, + "assigned": { + Path: "mail/repo/issue/assigned.tmpl", + Data: map[string]any{ + "Subject": "Issue #42 Assigned", + "Link": "https://gitea.example.com/repo/project/issues/42", + "Doer": map[string]any{"Name": "Sarah Chen"}, + "IsPull": false, + "Issue": map[string]any{ + "Index": 42, + "Repo": map[string]any{ + "HTMLURL": "https://gitea.example.com/repo/project", + "FullName": "acme/project", + }, + }, + }, + }, + "default": { + Path: "mail/repo/issue/default.tmpl", + Data: map[string]any{ + "Subject": "Re: Issue #42 -- Bug fix", + "Link": "https://gitea.example.com/repo/project/issues/42", + "ActionName": "comment", + "Doer": map[string]any{"Name": "Sarah Chen"}, + "Body": "This is a comment on the issue with details about the fix.", + "CanReply": true, + "IsMention": false, + "IsPull": false, + "Issue": map[string]any{ + "Index": 42, + "PullRequest": map[string]any{ + "BaseBranch": "main", + "BaseRepo": map[string]any{ + "HTMLURL": "https://gitea.example.com/repo/project", + }, + "HeadBranch": "feature/fix", + }, + }, + "Comment": map[string]any{ + "Commits": []any{}, + "IsForcePush": false, + "Issue": map[string]any{ + "PullRequest": map[string]any{ + "BaseRepo": map[string]any{ + "HTMLURL": "https://gitea.example.com/repo/project", + }, + "HeadBranch": "feature/fix", + }, + }, + }, + "ReviewComments": []any{}, + }, + }, +} + +// discoverThemes scans the themes directory and returns all subdirectory names. +func discoverThemes(themesDir string) []string { + entries, err := os.ReadDir(themesDir) + if err != nil { + log.Fatalf("Cannot read themes directory %s: %v", themesDir, err) + } + var themes []string + for _, e := range entries { + if e.IsDir() { + themes = append(themes, e.Name()) + } + } + if len(themes) == 0 { + log.Fatalf("No theme directories found in %s", themesDir) + } + return themes +} + +func main() { + exe, _ := os.Executable() + rootDir := filepath.Dir(exe) + // When run with `go run`, use CWD's parent + if _, err := os.Stat(filepath.Join(rootDir, "themes")); os.IsNotExist(err) { + cwd, _ := os.Getwd() + // Try cwd, then cwd's parent + for _, d := range []string{cwd, filepath.Dir(cwd)} { + if _, e := os.Stat(filepath.Join(d, "themes")); e == nil { rootDir = d; break } + } + } + + themesDir := filepath.Join(rootDir, "themes") + previewDir := filepath.Join(rootDir, "preview") + + result := make(map[string]map[string]string) + + themes := discoverThemes(themesDir) + for _, theme := range themes { + themeDir := filepath.Join(themesDir, theme) + result[theme] = make(map[string]string) + + for tplID, tplDef := range templates { + tmplPath := filepath.Join(themeDir, tplDef.Path) + tmplContent, err := os.ReadFile(tmplPath) + if err != nil { + log.Printf("WARN: cannot read %s: %v", tmplPath, err) + result[theme][tplID] = fmt.Sprintf("

Failed to read template: %s

", err) + continue + } + + // Build data context + data := make(map[string]any) + for k, v := range tplDef.Data { + data[k] = v + } + data["locale"] = Locale{} + + // Parse and execute + tmpl, err := template.New(tplID).Funcs(TemplateFuncs).Parse(string(tmplContent)) + if err != nil { + log.Printf("WARN: parse error %s/%s: %v", theme, tplID, err) + result[theme][tplID] = fmt.Sprintf("

Parse error: %s

", err) + continue + } + + var buf strings.Builder + if err := tmpl.Execute(&buf, data); err != nil { + log.Printf("WARN: execute error %s/%s: %v", theme, tplID, err) + result[theme][tplID] = fmt.Sprintf("

Render error: %s

", err) + continue + } + + // Fix favicon path for preview (official Gitea icon) + rendered := strings.Replace(buf.String(), + `src="https://about.gitea.com/assets/img/favicon.png"`, + `src="https://about.gitea.com/gitea.svg"`, -1) + result[theme][tplID] = rendered + log.Printf("OK: %s/%s (%d bytes)", theme, tplID, buf.Len()) + } + } + + // Write output as JS (script-loadable, avoids file:// CORS issues) + os.MkdirAll(previewDir, 0755) + outPath := filepath.Join(previewDir, "rendered.js") + outFile, err := os.Create(outPath) + if err != nil { log.Fatalf("Cannot create output: %v", err) } + defer outFile.Close() + + jsonBytes, err := json.MarshalIndent(result, "", " ") + if err != nil { log.Fatalf("JSON marshal error: %v", err) } + + outFile.WriteString("// Auto-generated by tools/build-preview.go — do not edit\n") + outFile.WriteString("window.__RENDERED__ = ") + outFile.Write(jsonBytes) + outFile.WriteString(";\n") + + log.Printf("Wrote %d themes x %d templates to %s", len(themes), len(templates), outPath) +} diff --git a/tools/go.mod b/tools/go.mod new file mode 100644 index 0000000..a21326a --- /dev/null +++ b/tools/go.mod @@ -0,0 +1,3 @@ +module gitea-mail-templates/tools + +go 1.21