preview/index.html: - Fix scrollbar CSS: scoped webkit pseudo-elements + standards-track fallback, removed deprecated overflow:overlay - Keyboard navigation: arrows cycle focus between Theme/Template/Client selects, up/down select within focused dropdown, d/m toggle viewport - Dev/static mode detection: delayed static warning only when WebSocket absent, WebSocket errors only on disconnect (not on initial fail) - iframe sandbox: removed static sandbox attr, applied dynamically only in dev mode (file: protocol rejects sandboxed srcdoc) - Loading fix: removed double-toggle between init and render(); added 5s safety timeout - Transform clean: returns HTML as-is; CSS stripping moved to server-side - Dev disclaimer: blue info banner shown on WebSocket connect tools/server/inliner.mjs: - Added stripGmail() / stripOutlook() — server-side CSS property stripping for email client simulation tools/server/server.mjs: - Fixed WebSocket upgrade: use app.listen() instead of createServer(app).listen() - Juice post-processing now generates three rendered.js variants (modern/gmail/outlook) - Initial startup runs juice-only pass (avoids duplicate Go compilation) docs/ (all 6 languages — en, zh-CN, zh-TW, ja, ko, ru): - Image size limits: max 50KiB, recommended 10-20KiB - Dev disclaimer: simulation cannot 100% reproduce every client - Changed 'accurate' to 'relatively accurate' across all static-mode warnings - Converted all plain blockquotes to GitHub admonitions ([!WARNING] / [!NOTE])
2.8 KiB
2.8 KiB
Gitea 郵件模板
為自託管 Gitea 實例精心設計、面向不同受眾的郵件模板集合。
110 個模板檔案 — 10 種視覺風格,每種 11 種郵件類型
設計理念
大多數自託管 Gitea 實例使用預設的純文字郵件模板。本專案提供了開箱即用、視覺精美的替代方案——每種方案都針對特定社群或受眾設計,您可以選擇最適合您使用者的風格。
每個模板都是直接替換。所有 Go 模板變數、翻譯鍵和 Gitea 資料上下文完全相容。無需修補程式、無需外掛、無需 fork。
風格展示
圖片為 600px 寬截圖,來自線上預覽。截圖方法參見 images/README.md。
安裝
選擇一種風格,將 mail/ 目錄複製到 Gitea 自訂模板路徑:
cp -r themes/horizon/mail/* /var/lib/gitea/custom/templates/mail/
systemctl restart gitea
切換風格只需覆蓋檔案,無需更改設定。
預覽
靜態模式:
cd tools && go run . preview all
然後開啟 preview/index.html。
開發伺服器(即時重載 + Juice CSS 內聯 + 客戶端模擬):
cd tools && go run . dev # 需要 Node.js
# → http://localhost:3456
Note
Dev 模擬無法 100% 還原各個郵件用戶端的渲染差異,僅供參考,請以實際效果為準。
相容性
- Gitea 1.21+,100% 變數相容,僅使用內建函式和官方翻譯鍵
授權
MIT — 詳見 LICENSE。









