Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

优化spoiler-text.css,平滑过渡符合现代审美 #3108

Merged
merged 1 commit into from
Jan 5, 2025

Conversation

Hyphen-H
Copy link
Contributor

@Hyphen-H Hyphen-H commented Jan 2, 2025

修改内容

更新./public/css/spoiler-text.css,使spoiler-text样式更加符合现代化审美(悬浮显示剧透文本)
动图被github压缩了,实际上动画效果仅需0.35秒完成平滑过渡,比图中显示的快

未来可以优化的方向

  • 现有方案多个[sp]段落连续排版,spoiler样式会失效(如上图gif中的二、三自然段,原版即存在此问题,不是因为我的css改动),我随后去提个issue吧- -
  • 希望可以把spoiler改为前缀和后缀在blog.config.js设置,如
SPOILER_TEXT_PREFIX = process.env.NEXT_PUBLIC_SPOILER_TEXT_PREFIX || "[sp]",
SPOILER_TEXT_SUFFIX = process.env.NEXT_PUBLIC_SPOILER_TEXT_SUFFIX || "[/sp]"
  • 希望可以加入telegram样式的毛玻璃剧透样式,通过点击(而非hover)揭露剧透文本,在blog.config.js中切换
SPOILER_TEXT_TRIGGER = process.env.NEXT_PUBLIC_SPOILER_TEXT_TRIGGER || "" // hover或者click, hover对应悬浮显示,click对应telegram样式,单击显示

测试确认

  • 本地开发环境测试通过
  • 生产环境构建测试通过
  • 版本号正确显示
  • 环境变量配置正常工作

Copy link

vercel bot commented Jan 2, 2025

@Hyphen-H is attempting to deploy a commit to the tangly1024's projects Team on Vercel.

A member of the Team first needs to authorize it.

@qixing-jk
Copy link
Contributor

qixing-jk commented Jan 3, 2025

这么快就有人计划到这一步了?我本来就是为了实现简单那么写的,虽然这些问题我都注意到了,但感觉没啥人用,没必要实现的那么完美(狠狠地偷懒了,也算是在等可以用React原生实现的契机,这样就不用费心费力的处理和造轮子了

发现名字有点熟悉,之后去看了issue,原来就是你提的啊

@tangly1024 tangly1024 merged commit f3b0127 into tangly1024:main Jan 5, 2025
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants