GITHUB_TOKEN needs explicit contents: write to create releases via
softprops/action-gh-release. Without it, the API returns 403.
Co-Authored-By: Claude <noreply@anthropic.com>
cp -r requires the target directory to exist. Changed to mkdir -p the
full archive path instead of just dist/.
Co-Authored-By: Claude <noreply@anthropic.com>
When tracker detects a new Gitea version, the shields.io badge now
updates from 'tested-blue' to '待测试-yellow' to indicate pending
verification status.
Co-Authored-By: Claude <noreply@anthropic.com>
Markers now self-document their position: 'OFFSET=N' means the target
row is N lines below the marker. Workflow extracts offset dynamically
via sed, no hardcoded values.
Format: <!-- TRACKER:<NAME> OFFSET=<N> -->
Co-Authored-By: Claude <noreply@anthropic.com>
HTML comments between table rows broke markdown rendering. Moved both
tracker markers above table headers, updated workflow to use offsets:
- QUICK-REF-MAX: data row at marker + 3
- VERSION-INSERT: insert at marker + 2
Co-Authored-By: Claude <noreply@anthropic.com>
File was accidentally moved to tools/config/data/ in an earlier commit,
breaking the preview command's default --config path (./data/...).
Co-Authored-By: Claude <noreply@anthropic.com>
The workflow read MARKER-1 (line above marker = separator line),
returning '-----------------' as the version. The data row is BELOW
the marker. Fixed both read and update steps to use MARKER+1.
Co-Authored-By: Claude <noreply@anthropic.com>
grep -oP (Perl regex) failed on Ubuntu runner, returning empty current
version. Replaced version parsing with awk -F'|' to extract from the
pipe-separated Quick Reference table by column index.
Also replaced the Quick Reference update sed with awk -i inplace for
column-based editing, avoiding fragile regex on formatted table cells.
Co-Authored-By: Claude <noreply@anthropic.com>
Bug fixes found during cross-validation:
1. VERSION-INSERT marker placed before table header → moved after separator
line so new rows insert between separator and first data row.
2. Badge sed pattern 'tested\)-[0-9a-z.]*\(blue\)' never matched because
URL has 'tested-blue' not 'tested)-...'. Fixed to match URL-encoded
format: '%20<version>%20tested-blue'.
3. Quick Reference sed depended on '| ✅' status literal. Changed to
'| [^|]*' to match any status text, always setting to ⏳ on update.
4. Gitea API returns 'v1.27.0' tag_name but docs use '1.27.0'. Added
'${NEW_VERSION#v}' to strip v prefix.
Co-Authored-By: Claude <noreply@anthropic.com>
Add TRACKER: HTML comment markers to COMPATIBILITY.md, README.md, and
all 5 translation READMEs. Rewrite gitea-tracker.yml to use grep -n
for precise line-based insertion and sed line-address editing.
Markers introduced:
- TRACKER:QUICK-REF-MAX — Quick Reference max tested version
- TRACKER:VERSION-INSERT — Version History row insertion point
- TRACKER:LATEST-VERIFIED — latest verified note version
- TRACKER:BADGE — shields.io badge version
- TRACKER:LATEST-TESTED — latest tested version in READMEs
Co-Authored-By: Claude <noreply@anthropic.com>
- Create COMPATIBILITY.md with version matrix, Gitea release tracking,
template variable reference, and compatibility verification process
- Add Gitea 1.25+ | 1.26.4 tested badge to README
- Update all 6 READMEs (EN + 5 translations) with latest tested version
and link to COMPATIBILITY.md
- Include COMPATIBILITY.md in release artifacts
Co-Authored-By: Claude <noreply@anthropic.com>
- Validate all templates on push to main and tag v*
- On tag: package themes/ as zip + tar.gz and create GitHub release
Co-Authored-By: Claude <noreply@anthropic.com>
- Delete tools/server/ (Node.js, juice, inliner.mjs, server.mjs, node_modules)
- Create tools/preview/server.go — pure Go dev server with SSE + file polling
- Rewrite tools/cli/dev.go — start Go server in-process, no Node.js required
- Simplify preview/index.html — View dropdown (Modern/Source), remove Client
Simulation panel, remove Gmail/Outlook logic, WebSocket → SSE
- Update all 14 documentation files (README, CONTRIBUTING, AGENTS + translations)
to reflect pure Go dev server and simplified preview
Co-Authored-By: Claude <noreply@anthropic.com>
- Add ANSI color coding: [I]=green, [W]=yellow, [E]=red
- Format: [Level] [Module] message with 4-char indent for data rows
- Error detail lines use |-> tree connector
- Remove extra blank lines between outputs (except list)
- Modules: CLI, Preview, Builder, Server, Watcher
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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>
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>