chore: refresh docs and adapt workflows for Gitea
Release / Validate Templates (push) Successful in 3m1s
Release / Package & Release (push) Skipped
Release / Update Latest Release Documentation (push) Skipped

This commit is contained in:
KenanZhu committed 2026-10-09 22:02:33 +08:00
1 parent fec3ace600
commit f4d96de79e
14 files changed
+986 -505

No files matched your search

+34 -21
View File
@@ -1,31 +1,44 @@
# Style Preview Images
# Gallery Images
> Images show the current snapshot-driven source build. Historical release archives retain their original templates and are not replaced by these screenshots.
Gallery images show the current source build. Historical release archives retain their original templates.
Place theme style screenshots of **Desktop** in PNG format here, captured from the [local preview](../../preview/index.html).
## Capture Settings
## Naming Convention
Use the same settings for every theme so images remain comparable:
```
horizon.png terminal.png ember.png bloom.png heritage.png
neon.png mono.png terra.png ink.png aurora.png
| Setting | Value |
|---|---|
| Template | **Register Notify** |
| Language | **en-US** |
| View | **Modern** |
| Viewport | **Desktop** |
| Information panel | Collapsed |
| Output | PNG, 600px wide recommended |
Save images as `<theme-name>.png` in this directory, matching the directory name under `themes/`. Each file must be at most **50 KiB**; **10–20 KiB** is preferred. Optimize larger PNGs with tools such as `pngquant` or `optipng`.
## Automated Capture
Generate preview data from the repository root:
```bash
cd tools
go run . preview all
cd qa
npm install
npx playwright install chromium
npm test -- --update-gallery
```
## Image Size Requirements
To use installed Chrome or Edge, set `BROWSER_EXECUTABLE_PATH` instead of installing Chromium. The script checks language loading, controls and mobile overflow, saves captures in `build/screenshots/`, then copies them here after enforcing the size limit. Review the resulting images before committing.
To ensure screenshots can be displayed in the README, please follow these size requirements:
Run `npm test` without `--update-gallery` to perform the checks and capture images without changing the committed gallery.
- **Maximum:** 50 KiB per image
- **Recommended:** 10–20 KiB
- **Format:** PNG, optimised — run through `pngquant` or `optipng` before committing
## Manual Capture
## How to Capture
1. Run `go run . dev` from `tools/` and open [http://127.0.0.1:3456](http://127.0.0.1:3456). Alternatively, run `go run . preview all` and open [preview/index.html](../../preview/index.html) directly.
2. Select a theme and apply the capture settings above.
3. Capture the rendered email, excluding the preview toolbar and information panel.
4. Save the PNG as `<theme-name>.png`, check its size and repeat for the remaining themes.
1. Start the dev server: `cd tools && go run . dev` and open http://127.0.0.1:3456 in your browser
2. For each style, select the **"Register Notify"** template and **"Modern"** view, **"en-US"** language and **"Desktop"** viewport; close the floating inspector
3. Take a screenshot of the rendered email (600px width recommended)
4. Save as `<style-name>.png` in this directory
> For a source clone, run `cd tools && go run . preview all`, return to the repository root, then open `preview/index.html` directly.
For automated capture, install the optional dependencies in `tools/qa` and run `node preview.cjs --update-gallery` there. Set `BROWSER_EXECUTABLE_PATH` when using an installed Chrome/Edge instead of Playwright's bundled Chromium.
When adding a theme, update its gallery entry in both the [English README](../../README.md#style-gallery) and [Simplified Chinese README](../README.zh-CN.md#风格画廊).