Skip to content

Enhance ThreeLinePoemActivity comment UI styling - #29

Open
XRYua wants to merge 6 commits into
masterfrom
codex/enhance-comment-system-design-for-love-letter-page
Open

Enhance ThreeLinePoemActivity comment UI styling#29
XRYua wants to merge 6 commits into
masterfrom
codex/enhance-comment-system-design-for-love-letter-page

Conversation

@XRYua

@XRYua XRYua commented Mar 21, 2026

Copy link
Copy Markdown
Owner

Motivation

  • 给“三行情书写”活动页面的评论区提供更高级、定制化的视觉风格,让单页的留言体验更沉浸和统一。
  • 只对该活动页面的 Twikoo 主机区域做局部样式与结构增强,不改变全站通用评论逻辑与服务配置。

Description

  • 重构 src/components/ThreeLinePoemActivity.astro 页面结构,新增浮光圆球、活动信息卡格和更清晰的标题/徽章区以提升页面层次感。
  • 将 Twikoo 宿主包裹进自定义 board-shell(带高光层)并新增 board-headboard-badge 以突出活动识别与样式化容器。
  • 使用局部 CSS(包含 :global() 选择器)重绘 Twikoo 的输入、文本域、提交区、按钮、评论卡片与回复样式,采用玻璃拟态、分层渐变与交互态高亮以达到更高端的视觉效果。
  • 保留现有的 Twikoo 初始化脚本与行为(延迟重试、Swup 页面切换重初始化等),仅改变宿主 DOM 结构与样式,不修改 Twikoo 后端配置。

Testing

  • 运行 pnpm prettier --write src/components/ThreeLinePoemActivity.astro(失败,因为当前环境下 Prettier 未识别 .astro 解析器)。
  • 运行 pnpm check(失败,检查中断并报告仓库中与本次改动无关的现有错误:Duplicate identifier 'ThreeLinePoemEntry'src/pages/[...page].astro)。

Codex Task

@vercel

vercel Bot commented Mar 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mizuki Ready Ready Preview, Comment Mar 21, 2026 5:25pm

@gemini-code-assist

Copy link
Copy Markdown

Important

Installation incomplete: to start using Gemini Code Assist, please ask the organization owner(s) to visit the Gemini Code Assist Admin Console and sign the Terms of Services.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5b5d13df03

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

border: 1px solid color-mix(in oklab, var(--primary) 35%, transparent);
background: linear-gradient(135deg, color-mix(in oklab, var(--primary) 10%, var(--card-bg)) 0%, var(--card-bg) 60%);
position: relative;
overflow: hidden;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep overflow visible around the Twikoo guestbook

src/styles/twikoo.css:154-159 already documents that .card-base must keep overflow: visible so Twikoo's emoji UI can expand correctly. This change overrides that with overflow: hidden on the activity card, and ThreeLinePoemActivity still renders Twikoo's OwO/emoji trigger, so the absolutely positioned emoji panel will now be clipped to the card bounds on this page, making larger emoji packs partially unusable.

Useful? React with 👍 / 👎.

Comment on lines +321 to +325
.twikoo-host :global(.tk-preview-container),
.twikoo-host :global(.tk-comment) {
border: 1px solid color-mix(in oklab, var(--primary) 14%, transparent);
border-radius: 1rem;
background: color-mix(in oklab, white 92%, var(--card-bg) 8%);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add dark-mode colors for the lightened comment cards

In dark mode, src/styles/twikoo.css:1-13 switches Twikoo text to the light --tk-text color, and .tk-comments applies that color to comment content. These new local rules force comment/preview cards to an almost-white background with no dark-mode override, so on html.dark the activity page ends up rendering light gray text on very light cards, which is difficult to read for anyone using the site's dark theme.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant