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>
Replaced neutral-gray scrollbar with muted-steel-blue
rgba(107,125,153,...) — the page's --muted colour at varying
opacities. Thumb blends with the navy-blue background palette
(#0b1120 / #151d2e / #1e2d45) rather than standing out as
an unrelated grey element.
Page-level + iframe-injected scrollbar: unified palette.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Page-level scrollbar:
- WebKit: ::-webkit-scrollbar with 3px width, transparent track,
6% white thumb → 18% on hover
- Firefox: scrollbar-width:thin + scrollbar-color on #preview-area, #panel
- Legacy Edge/IE: -ms-overflow-style: -ms-autohiding-scrollbar
- Chrome 108+: overflow:overlay via @supports (scrollbar floats,
no layout shift)
Iframe content (email preview):
- Same cross-browser treatment injected into every rendered template
- Dark email themes get dark scrollbar (rgba(0,0,0,.08))
- Light email themes also covered (6% black is subtle on any bg)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
When rendered is null, render() was setting loading.style.display='flex'
before returning — overriding the hide already done in the init error
branch. Now render() silently returns, leaving init to handle the error.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Global scrollbar: 3px wide, transparent track, 6% white thumb
that brightens to 15% on hover. Firefox thin scrollbar via
scrollbar-width:thin. Practically invisible unless needed.
- Iframe content: inject matching scrollbar CSS into every
rendered email template so the email preview itself has
the same subtle scrollbar treatment.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The _patch.cjs script accidentally stripped </script></body></html>
when replacing the WebSocket section, causing the inline JavaScript
to never terminate — the browser parsed everything as script content
and all functions were undefined.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Remove preview/rendered.js from .gitignore so the project works
out-of-the-box after clone (no Go required for static preview).
- Hide loading spinner when rendered.js is not found; previously
the spinner stayed visible forever because render() returned
early when 'rendered' was null.
- Regenerate rendered.js with all current template fixes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- transform(): only Raw mode does HTML escaping. Modern, Gmail, Outlook
all show the same rendered HTML — in dev mode Juice handles CSS
inlining server-side; in static mode the notice bar warns.
- static-notice: change display from '' to 'block' to properly
override CSS rule #static-notice{display:none}. The empty string
did not override the stylesheet rule in static file:// mode.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- README.md: restructure Preview section into Static + Dev modes
with feature comparison table; mention juice inlining and live reload
- CONTRIBUTING.md: update Development Setup with Go/Node.js
requirements, static vs dev preview workflows, Juice reference
- AGENTS.md: add dev command to subcommand list, document
tools/server/ directory, update Build Tool section
- docs/CONTRIBUTING.*.md (5 languages): add dev server section,
Node.js requirement, live reload description
- docs/README.*.md (5 languages): add dev mode to Preview section
- docs/images/README.md: update capture instructions for dev server
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Add static-notice banner: 'Gmail/Outlook simulation is approximate.
Use dev mode for accurate rendering.' Hidden in dev mode via
WebSocket try/catch, auto-shown in file:// mode on WS failure.
- Simplify transform(): Gmail/Outlook modes now return same HTML as
Modern — the dev server with Juice provides actual client sim.
- Add markSafeHTML(): converts RenderedNote/Body/RenderedContent
from plain string to template.HTML so markdown-rendered HTML
content is not escaped by Go's html/template engine.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- 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>
- tools/server/: Node.js dev server (Express + WebSocket + fs.watch)
Watches themes/ for .tmpl changes, rebuilds via Go preview command,
applies Juice CSS inlining for email client compatibility, pushes
live reload to browser via WebSocket.
- tools/cli/dev.go: 'go run . dev' subcommand — starts Node.js server
with automatic npm install, initial preview generation, and
Ctrl+C graceful shutdown.
- tools/tools.go: register dev command in CLI app.
- .gitignore: add node_modules exclusion.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Split monolithic build-preview.go into modular packages:
tools.go (entry), cli/ (list/create/delete/preview commands),
config/ (JSON loading), preview/ (rendering engine, funcs, locale)
- Extract all template metadata into data/templates_config.json
as single source of truth — no hardcoded template data in Go
- Replace hand-rolled CLI parsing with github.com/urfave/cli/v2
- Add sensible defaults for --folder (../themes) and --config
(./data/templates_config.json) — most commands now run bare
- Add type-coercing gt/lt/ge/le template funcs for JSON float64
- Fix AppUrl to gitea.com matching official template convention
- rendered.js now exports __REGISTRY__ and __PARAMS__ alongside
__RENDERED__ — preview/index.html reads all from single source
- Cross-validate all 11 template data contexts against official
Gitea source (services/mailer/*.go + templates/mail/*.tmpl)
- Update all docs (README, AGENTS, CONTRIBUTING, 5 languages)
to reflect new CLI workflow with create scaffolding command
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The build-preview.go now uses discoverThemes() to find all theme directories
under themes/ automatically. The manual step of adding themes to a slice is
no longer needed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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>
- 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>