Commit Graph
16 Commits
Author SHA1 Message Date
KenanZhu 92d2ba9889 fix: support Gitea 28.0.0 mail templates
Release / Package & Release (push) Canceled after 0s
Release / Validate Templates (push) Canceled after 0s
2026-10-02 19:44:20 +08:00
KenanZhu dfb5024dfb fix: verify Gitea 1.27.3 and repair push mail templates 2026-09-23 13:51:22 +08:00
KenanZhuandClaude d020e35f77 refactor(themes): convert all rgba() to #RRGGBBAA hex notation
453 occurrences, 37 unique rgba() values converted across 66 files.
All 110 templates (10 themes × 11 types) render successfully.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-02 11:50:25 +08:00
KenanZhuandClaude ac559eb26c style(aurora): add email-text class to release template paragraphs
Add missing .email-text CSS class to release note paragraphs
for consistent typography styling.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-02 11:48:56 +08:00
KenanZhuandClaude f33cad7a7e fix: update push commit data paths for Gitea 1.27.1 compatibility
Gitea 1.27.1 fixed the mail template for push events (#38467) —
commit data must now be accessed via .UserCommit.GitCommit instead
of directly on the commit object.

Changed across all 10 themes:
- {{.ID}}               → {{.UserCommit.GitCommit.ID}}
- {{.ID.String}}        → {{.UserCommit.GitCommit.ID.String}}
- {{.MessageTitle}}     → {{.UserCommit.GitCommit.MessageTitle}}

Verification:
- 3 mail-related files changed in Gitea v1.27.0→v1.27.1
- All 110 templates (10 themes × 11 types) render successfully
- No breaking changes — data structure unchanged, only access path

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-02 11:18:22 +08:00
KenanZhuandClaude 433b5f9259 fix(ink): prevent content overflow on mobile viewports
Five targeted fixes applied to all 11 ink templates:

1. Convert table/tr/tbody to display:block on mobile so the
   block-level stacking of <td> elements works correctly.
2. Add box-sizing:border-box to all <td> elements to prevent
   padding from pushing content beyond the viewport width.
3. Add word-break:break-word + overflow-wrap:break-word to
   table, td, th elements to force long text to wrap.
4. Add white-space:pre-wrap + word-break:break-all to <pre>
   and <code> to prevent horizontal scroll from code blocks.
5. Add max-width:100% + height:auto to all images, and
   max-width:100% to nested tables.
6. Remove invalid table-layout:fixed from <center> tag
   (was CSS property on wrong element — had no effect).

Also reduced mobile padding from 28px to 16px for more
usable content width on narrow screens.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-26 14:27:38 +08:00
KenanZhuandClaude f2a3c0f033 fix(ink): add .email-sidebar class for vertical stacking on mobile
Quick Info sidebar now stacks below main content at <=480px viewports
via CSS class instead of fragile inline styles.

- Added .email-sidebar base style (extracted from inline styles)
- Added responsive rule: width:100%, display:block, removes left border,
  adds top border separator when stacked vertically
- All 11 ink templates updated consistently

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-26 14:20:38 +08:00
KenanZhuandClaude fd527b01a5 style(ink): update ink theme templates
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-26 14:08:49 +08:00
KenanZhu 81c5d36626 fix: add !important to .email-btn color to prevent client link-color override 2026-06-12 09:30:45 +08:00
KenanZhu ba69035223 refactor(*): remove footer branding and extract ink drop-cap inline styles to CSS class 2026-06-12 09:06:05 +08:00
KenanZhuandClaude Opus 4.8 73b9bd52f5 fix(themes): restore pre-refactor visual design across all 9 non-aurora themes
Fixes introduced by the CSS class-based refactor (1712f77) that changed
visual layout, spacing, colors, and content rendering:

**Container/border displacement (neon):**
- Move background, border, box-shadow back to .email-wrap (outermost)
- Restore .email-card to padding-only; add color for content inheritance
- Fix link box padding, link label color, button margin, link URL padding

**Layout restructuring (ink, mono):**
- ink: Move button + link-box back into left column (was moved to
  separate full-width row); remove incorrectly-added divider
- mono: Remove incorrectly-added divider; restore link-box margin-top

**CSS specificity conflict (ink):**
- Exclude .email-btn from .card-body a rule to prevent button text
  being overridden to same color as background

**Content class cleanup (neon, terminal, terra):**
- Remove .aurora-content (aurora-specific) copied into other themes
- Replace with theme-appropriate .card-body scoped rules where needed

**Content color/contrast (horizon):**
- Fix .horizon-content in release.tmpl from dark-theme colors
  (#e2e8f0 on white) to light-theme colors matching issue/default.tmpl
- Fix .email-heading color to #1e293b for heading distinction

**register_notify text_3 placement:**
- Restore per-theme original design: inside .email-subtext (mono, ink)
  vs standalone <p> after button (heritage, horizon)
- Move raw text in button row into proper <p> elements

**Button CSS pattern (bloom):**
- Remove redundant inline style/bgcolor from button <td> (already in CSS)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 13:44:24 +08:00
KenanZhuandClaude Opus 4.8 6ae9c97be8 style(aurora): CSS class-based refactor, full i18n, and locale alignment
themes/aurora/ (all 11 tmpl templates):
- Extract all reusable inline styles to CSS classes in <style> blocks
- Organize CSS with /* Section */ comment headers (Base, Header, Card, etc.)
- Clean HTML structure: <tr>/<td> on separate lines, consistent 2-space indent
- Replace all hardcoded English button text with locale.Tr keys
- Add mail.team_invite.text_3 disclaimer notice to team_invite
- Go variable assignments on dedicated lines with proper indentation
- Section comments in Title Case

tools/preview/locale.go:
- Replace LocaleEN with full 60-key official Gitea mail locale
- Add positional format specifier support (%[1]s, %[2]d) in Tr()
- All keys verified against official Gitea locale_en-US.json (100% match)

.gitignore:
- Add preview/rendered.js entry

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 18:51:56 +08:00
KenanZhuandClaude Opus 4.8 a0cd5e32f4 fix(templates): add inline colors for dark-background themes, set CanReply=false
- aurora, neon, terminal: add explicit inline color styles to bare
  text elements (locale.Tr calls, h4 headings, download labels)
  that were invisible in clients stripping <style> blocks (Gmail).
  33 files across 3 dark-background themes.
- CanReply: changed from true to false in mock data — matches
  typical Gitea deployment where IncomingEmail is disabled by
  default. Template syntax kept identical to official Gitea.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 13:51:10 +08:00
KenanZhuandClaude Opus 4.8 d9e6873f49 fix(aurora): add card-body CSS to prevent dark text/links on dark background
Aurora is a dark theme (bg #0a0815, card rgba(25,20,50,0.8)) but raw HTML
elements like h2/h4/li/a inside the card had no inline color — rendering
as browser-default black text and blue links, unreadable on dark backgrounds.

Fix: add .card-body CSS rules to all 11 Aurora templates covering h1-h6,
links, and li elements. Also add .aurora-content wrapper for user-generated
HTML (Release.RenderedNote, .Body, .RenderedContent) with full color
coverage for code, pre, blockquote, hr, img.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 20:34:32 +08:00
KenanZhuandClaude Opus 4.8 86bb2538bb fix(templates): cross-validate against official Gitea mail templates
- Fix INK theme: replace .ActiveCodeLives with correct field, remove from non-auth contexts (8 files)
- Fix hardcoded button text: use locale key mail.view_it_on in ember, heritage, ink, mono, terminal, terra (30+ files)
- Add missing {{if .CanReply}}mail.reply{{end}} block to all 10 themes default.tmpl
- Add missing mail.release.note locale label to all 10 themes release.tmpl
- Add missing mail.team_invite.text_3 to ink and terra team_invite.tmpl
- Add missing blockquote CSS to aurora, ink, mono, neon, terra default.tmpl

Verified: all 110 templates compile successfully with Go build-preview.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 20:18:40 +08:00
KenanZhuandClaude Opus 4.8 a2742887e8 chore(init): scaffold Gitea mail templates — 110 templates, 10 visual styles, drop-in deployment
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 18:10:22 +08:00