Conversation
更改深色模式配色为 Dracula 主题,提升视觉效果和可读性。 调整滚动条、按钮、焦点阴影及 HTTP 方法块的样式。 新增返回顶部按钮,支持平滑滚动并动态显示/隐藏。 优化主题切换按钮,改用 SVG 图标并移至顶部导航栏。 改进代码结构和注释,增强可维护性。
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the Swagger UI customization by replacing emoji icons with SVG graphics and adding a back-to-top button feature. The theme has also been updated from GitHub Dark to Dracula color scheme.
- Replaced emoji icons (🌙, ☀️) with scalable SVG icons for better cross-platform compatibility
- Added a new back-to-top button that appears when scrolling down
- Changed theme color scheme from GitHub Dark to Dracula Theme
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| theme-toggle.js | Replaced emoji icons with SVG graphics for theme toggle button; added new back-to-top button functionality with scroll detection |
| custom.css | Updated color scheme from GitHub Dark to Dracula Theme; added styling for the back-to-top button; repositioned theme toggle button |
添加了一个通用的 `throttle` 函数,用于限制函数调用频率。 将滚动事件监听器的回调提取为 `handleScroll` 函数,并通过 `throttle` 函数对其进行节流处理,减少滚动事件触发频率。 代码结构更加清晰,性能得到优化。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 描述 (Description)
更改深色模式配色为 Dracula 主题,提升视觉效果和可读性。
调整滚动条、按钮、焦点阴影及 HTTP 方法块的样式。
新增返回顶部按钮,支持平滑滚动并动态显示/隐藏。
优化主题切换按钮,改用 SVG 图标并移至顶部导航栏。
改进代码结构和注释,增强可维护性。
🔗 相关问题 (Related Issues)
🏷️ 变更类型 (Type of Change)
✅ 检查清单 (Checklist)
🧪 测试 (Testing)
📸 截图 (如果适用) (Screenshots (if applicable))
🔍 附加说明 (Additional Notes)