diff --git a/.workbuddy/memory/2026-10-22.md b/.workbuddy/memory/2026-10-22.md index 6461889..96aa84c 100644 --- a/.workbuddy/memory/2026-10-22.md +++ b/.workbuddy/memory/2026-10-22.md @@ -328,3 +328,28 @@ - `urllib` 偶发 `TimeoutError` 的根因是代理复用 stale keep-alive 连接:请求头加 `Connection: close` 后不再出现,比加重试更有效。 - 测试账号 `tbunread1022181904`(自建,密码不入库)。提问已全部删除,账号可留作后续自检。 + +## 测试账号存档(凭据不入库) + +- 用户要求「记住别再忘」→ 凭据写在 `.workbuddy/local/test-accounts.md`, + `.gitignore` 已加 `/.workbuddy/local/`(明文密码不随仓库走)。 +- 内容:`tbunread1022181904@example.com` / 域名 `tbunread1022181904` / 密码 + 登录四步 + (`/login` 取 csrf → `/api/captcha/generate` 算数学题 → POST `g-recaptcha-response=":<答案>"`)。 +- 以后要跑登录态自检**先读这个文件复用账号**,不要再注册新的;`admin6` 仍只有域名、无密码。 +# 2026-10-22 + +## shiroko 平涂极简肖像(参考用户给的图) + +用户给了一张参考图:平涂零描边、纯黑圆角矩形眼、无嘴、腮红、头占满画面被裁边, +要求做同风格的白子,位置他自己放。 + +- 产出 3 张透明 WebP:`static/images/themes/shiroko/portraits/portrait-{front,tilt,close}.webp` + (907–1024 × 921,共 197KB),未接进 `--tb-deco`,留给用户自己摆。 +- ⚠️ **ImageGen 的 `background: "transparent"` 依然不生效**:返回的是 RGB 无 alpha 通道(实测 mode=RGB)。 +- ⚠️ **不能按白底抠**:白衬衫会一起被吃掉,闭合光环内部的白色 floodfill 也进不去(留下白斑)。 + 解法:提示词里把背景写成一个**具体纯色** `#E6EEF8`,抠图时按该色值算 alpha: + `alpha = clip((maxChannelDiff - 6) / 12)`,再 `MinFilter(3)` 收 1px。实测头发 alpha 全 255, + 中间过渡只占 2.5–6%(全是边缘),不会被误抠。 +- 水印在右下角("AI生成 WORKBUDDY"),统一裁掉底部 10%,切口平直,正好可以贴页面下沿。 +- 提示词关键:no outlines / no gradients、眼睛写死 `solid black vertically elongated rounded rectangles` + (否则出白眼球+高光+睫毛)、无嘴要重复强调。3/4 侧脸那版还是画出了嘴唇,弃用。 diff --git a/docs/theme-shiroko.md b/docs/theme-shiroko.md index 735e345..5ff8e38 100644 --- a/docs/theme-shiroko.md +++ b/docs/theme-shiroko.md @@ -215,3 +215,40 @@ wide scene suitable as a website background 2. 按 16:9 取顶部 864px,整体混白 38%(`v*0.62 + 255*0.38`)—— 保证白卡片放上去仍有足够对比度; 3. 高斯模糊 1.4px,让桌椅不抢正文; 4. 导出 WebP q80(1920×1080,22KB);移动端从同一张按 9:16 中裁 620px 宽,导出 720×1003。 + +## 肖像素材(平涂极简风) + +`static/images/themes/shiroko/portraits/` 下另有一组独立肖像,风格参照用户给的参考图: +**平涂、零描边、纯黑圆角矩形眼、无嘴、腮红、头占满画面并裁边**。已抠成透明底,可直接叠在任何底色上。 + +| 文件 | 构图 | 尺寸 | 体积 | +| --- | --- | --- | --- | +| `portrait-front.webp` | 正面胸像,含深蓝外套与青色领结 | 907×921 | 66KB | +| `portrait-tilt.webp` | 头微侧、眼睛偏横向,气质更松 | 975×921 | 61KB | +| `portrait-close.webp` | 极限特写,头顶与两侧被画框切掉 | 1024×921 | 70KB | + +用法(和背景装饰同一套槽位): + +```css +--tb-deco: url("/static/images/themes/shiroko/portraits/portrait-front.webp"), none, none, none, none, none; +--tb-deco-size: auto 320px, auto, auto, auto, auto, auto; +--tb-deco-position: left 0 bottom 0, left top, left top, left top, left top, left top; +``` + +注意: + +- 底部是**平直切口**(原图右下角有水印,统一裁掉底部 10%),适合直接贴到页面下沿或卡片边缘, + 不会出现"人浮在半空"的软边; +- 透明边缘是 1px 抗锯齿羽化,深色底上会有一圈极淡的浅边,浅色底上看不出来; +- 生成用的提示词骨架: + + > Flat vector illustration, modern minimal poster style, no outlines, no gradients, + > only flat solid color shapes … 角色描述 … Eyes are solid black vertically elongated + > rounded rectangles, no highlights, no pupils, soft pink oval blush, no mouth. + > The background is one flat solid pale blue-grey color #E6EEF8. + + 关键三点:① 必须强调 **no outlines / no gradients**;② 眼睛要写死成**纯黑色块**,否则会画出 + 白眼球和高光;③ 背景指定**一个具体的纯色**(不要写 white),抠图时按这个色值算 alpha 才干净 —— + 白底会连白衬衫、光环内部一起吃掉,闭合光环里的白还填不到。 + +原始 1024 PNG 与几版备选留在 `outputs/portraits-raw/`(该目录被 gitignore,只在本机)。 diff --git a/static/images/themes/shiroko/portraits/portrait-close.webp b/static/images/themes/shiroko/portraits/portrait-close.webp new file mode 100644 index 0000000..3cb12a7 Binary files /dev/null and b/static/images/themes/shiroko/portraits/portrait-close.webp differ diff --git a/static/images/themes/shiroko/portraits/portrait-front.webp b/static/images/themes/shiroko/portraits/portrait-front.webp new file mode 100644 index 0000000..d581f36 Binary files /dev/null and b/static/images/themes/shiroko/portraits/portrait-front.webp differ diff --git a/static/images/themes/shiroko/portraits/portrait-tilt.webp b/static/images/themes/shiroko/portraits/portrait-tilt.webp new file mode 100644 index 0000000..7805172 Binary files /dev/null and b/static/images/themes/shiroko/portraits/portrait-tilt.webp differ