Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
FGmagi
FGmagi.github.io
Repository navigation
Code
Issues
Pull requests
5
(5)
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
FGmagi.github.io
/
fmt-diff2.txt
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
45 lines (42 loc) · 2.78 KB
main
Breadcrumbs
FGmagi.github.io
/
fmt-diff2.txt
Copy path
Top
File metadata and controls
Code
Blame
45 lines (42 loc) · 2.78 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
diff --git a/src/components/MobileTOC.svelte b/src/components/MobileTOC.svelte
index ad2574c..56c3766 100644
--- a/src/components/MobileTOC.svelte
+++ b/src/components/MobileTOC.svelte
@@ -314,16 +314,16 @@ if (typeof window !== "undefined") {
}
</script>
-<!-- TOC toggle button for mobile -->
-<!--
+<!-- TOC toggle button:可见性由 toc-layout.js 写入的 html[data-toc-layout="narrow"] 驱动
+ (宽屏文章页用右侧栏目录,窄屏/宽度不足时退化到此入口;不再用固定断点隐藏) -->
<button
on:click={togglePanel}
aria-label="Table of Contents"
id="mobile-toc-switch"
- class="btn-plain scale-animation rounded-lg h-11 w-11 active:scale-90 lg:!hidden theme-switch-btn"
+ class="btn-plain scale-animation rounded-lg h-11 w-11 active:scale-90 theme-switch-btn"
>
<Icon icon="material-symbols:format-list-bulleted" class="text-[1.25rem]" />
-</button>-->
+</button>
<!-- Mobile TOC Panel -->
<div
@@ -394,8 +394,18 @@ if (typeof window !== "undefined") {
</div>
<style>
+ /* 26.09.06:入口按钮默认隐藏,仅在窄屏/宽度不足(narrow)模式显示 */
+ #mobile-toc-switch {
+ display: none;
+ }
+
+ :global(html[data-toc-layout="narrow"]) #mobile-toc-switch {
+ display: inline-flex;
+ }
+
.mobile-toc-panel {
- max-height: calc(100vh - 120px);
+ /* 与右侧栏目录共用同一高度上限(已为回顶按钮预留间距),避免面板与按钮重叠 */
+ max-height: var(--toc-max-h, calc(100vh - 120px));
overflow-y: auto;
background: var(--card-bg);
border: 1px solid var(--line-color);
You can’t perform that action at this time.