Skip to content

Commit a0c589b

Browse files
committed
bug fix
1 parent 10140cf commit a0c589b

8 files changed

Lines changed: 221 additions & 68 deletions

File tree

.idea/workspace.xml

Lines changed: 21 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DESIGN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Controls and nested panels use gently rounded 6–10px corners. Breadcrumb state
163163

164164
### Navigation
165165

166-
- **Top tabs:** Natural-width labels with a 3px active underline. Each tab links to its language-aware section directory (for example, `/social/` or `/en/social/`), where the generated section landing page replaces the aliased fallback document rather than selecting the first document. Cross-origin links and entries that own a submenu leave the primary tab group and appear in the right utility cluster before language, repository, and theme controls. Their triggers share the language control's compact styling; desktop submenus always open downward. In the mobile drawer, direct auxiliary links rejoin the two-column primary navigation grid. Languages and the repository control remain in the compact utility row below it, followed by every submenu expanded as its own full-width row. Submenu links keep readable intrinsic widths in one line and become independently horizontally scrollable when they exceed the drawer, without widening the page. The drawer owns vertical overflow, so additional links and menus remain reachable without compressed labels or clipped popovers. Additional language and auxiliary entries flow from their Markdown or dictionary sources without layout rewrites. Language changes preserve the current section or page when its Markdown exists, otherwise they resolve to the configured home page for the target language instead of opening a 404.
166+
- **Top tabs:** Natural-width labels with a 3px active underline. Each tab links to its language-aware section directory (for example, `/social/` or `/en/social/`), where the generated section landing page replaces the aliased fallback document rather than selecting the first document. Cross-origin links and entries that own a submenu leave the primary tab group and appear in the right utility cluster before language, repository, and theme controls. A submenu whose parent has a URL keeps that parent as a normal utility link with a compact adjacent disclosure button; a parent without a URL uses the full label button as the disclosure control. Desktop submenus always open downward. In the mobile drawer, the primary links, centered direct auxiliary links, language/repository row, and expanded submenus share one intrinsic-height navigation shell so no flex spacer can separate them. Linked submenu parents join their children as equal horizontal items instead of becoming a detached heading; unlinked submenu parents remain the desktop disclosure label but are omitted from the mobile link row. Item dividers match the language row, and each row scrolls horizontally when needed without widening the drawer. The drawer owns vertical overflow, so additional links and menus remain reachable without compressed labels or clipped popovers. Additional language and auxiliary entries flow from their Markdown or dictionary sources without layout rewrites. Language changes preserve the current section or page when its Markdown exists, otherwise they resolve to the configured home page for the target language instead of opening a 404; after selecting a language, the target hash is applied and the page refreshes once so Docsify, generated headings, breadcrumbs, and navigation all rebuild from the same dictionary.
167167
- **Document tree:** Parent Markdown pages may also own collapsible child pages. Sibling groups behave as an accordion: opening one closes the other open group at the same depth with a measured 220ms height, spacing, and opacity transition. Selecting a sibling parent page completes that same transition before the route changes; initial load and browser history restoration remain immediate. Every link uses a shared 2.75rem Flex row so text and arrow controls remain vertically centered. Links use regular-weight text and rounded neutral-gray hover panels rather than underlines. The panel is an opacity layer with a perceptible 180ms fade and the text color transitions independently; neither position, scale, nor weight changes. Reduced-motion mode retains a 120ms opacity/color fade. Selected links retain the gray panel and use the blue accent for text. A parent link and its arrow button share one hover state. Docsify section queries such as `?id=...` do not alter the selected Markdown page; selection and `aria-current` are synchronized from the query-free document route after every render.
168168
- **Page outline:** H2/H3 links never remain inside the document tree; they occupy the right rail or isolated sidebar footer.
169169
- **Breadcrumb:** Hidden on the Wiki home page and on a single-document tab's root document. Every page beneath a tab that owns a generated overview starts with a home icon linked to the language-aware Wiki home, followed by the tab overview and the complete sidebar ancestry (for example, Home > Game Docs > Custom Post-processing > V2). Nested routes inside a single-document tab retain Home plus their document ancestry. The Custom Post-processing parent document alone uses a short render gate before Docsify replaces its article; the completed-render task releases it after inserting the breadcrumb above H1, preventing that page's heading-only first frame without delaying other documents. Intermediate links use regular-weight body color and the same neutral pill hover as Home; only the current page keeps the blue active pill.

_navbar.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,3 @@
33
- [官方社区](/social/)
44
- [法律信息](/legal/)
55
- [赞助](https://afdian.com/a/fengyanDL)
6-
- [测试菜单](https://afdian.com/a/fengyanDL)
7-
- [测试菜单](https://afdian.com/a/fengyanDL)
8-
- [测试菜单](https://afdian.com/a/fengyanDL)

en/i18n.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
main_navigation: 'Main navigation',
2727
auxiliary_navigation: 'External links and more options',
2828
sidebar_utilities: 'Languages and external links',
29+
section_about: 'Home',
30+
section_dlce: 'Game Docs',
31+
section_social: 'Official Community',
32+
section_legal: 'Legal',
2933
toc_title: 'On this page',
3034
breadcrumb_label: 'Breadcrumb',
3135
category_intro: 'Choose a document in this section.',

i18n.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
main_navigation: '主导航',
2727
auxiliary_navigation: '外部链接与更多选项',
2828
sidebar_utilities: '语言与外部链接',
29+
section_about: '首页',
30+
section_dlce: '游戏文档',
31+
section_social: '官方社区',
32+
section_legal: '法律信息',
2933
toc_title: '本页目录',
3034
breadcrumb_label: '路径导航',
3135
category_intro: '选择本栏目中的文档。',

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<link id="prism-light-theme" rel="stylesheet" href="lib/css/prism-light.css">
4949
<link id="prism-dark-theme" rel="stylesheet" href="lib/css/prism-dark.css">
5050
<link rel="stylesheet" href="lib/css/docsify-tabs.css">
51-
<link rel="stylesheet" href="lib/css/docs-app.css?v=40">
51+
<link rel="stylesheet" href="lib/css/docs-app.css?v=43">
5252

5353
<script>
5454
(function () {
@@ -187,7 +187,7 @@
187187
</script>
188188

189189
<script src="lib/docsify.min.js"></script>
190-
<script src="lib/navigation.js?v=32"></script>
190+
<script src="lib/navigation.js?v=36"></script>
191191
<script src="lib/footer-hook.js"></script>
192192
<script src="lib/plugins/search.min.js"></script>
193193
<script src="lib/plugins/docsify-themeable.min.js"></script>

lib/css/docs-app.css

Lines changed: 68 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,8 @@ body.sticky.close .docs-header > .sidebar-toggle {
345345
.header-icon-link,
346346
.theme-toggle,
347347
.language-switcher-trigger,
348-
.header-aux-trigger {
348+
.header-aux-trigger,
349+
.header-aux-menu-toggle {
349350
display: inline-flex;
350351
align-items: center;
351352
justify-content: center;
@@ -357,14 +358,18 @@ body.sticky.close .docs-header > .sidebar-toggle {
357358
background: transparent;
358359
color: var(--navbar-root-color);
359360
cursor: pointer;
361+
transition: background-color var(--duration-medium) var(--ease-out),
362+
color var(--duration-medium) var(--ease-out);
360363
}
361364

362365
.header-icon-link:hover,
363366
.theme-toggle:hover,
364367
.language-switcher-trigger:hover,
365368
.language-switcher-trigger[aria-expanded='true'],
366369
.header-aux-trigger:hover,
367-
.header-aux-trigger[aria-expanded='true'] {
370+
.header-aux-trigger[aria-expanded='true'],
371+
.header-aux-menu-toggle:hover,
372+
.header-aux-menu-toggle[aria-expanded='true'] {
368373
background: var(--docs-hover);
369374
color: var(--navbar-root-color--hover);
370375
text-decoration: none;
@@ -422,6 +427,29 @@ body.sticky.close .docs-header > .sidebar-toggle {
422427
white-space: nowrap;
423428
}
424429

430+
.header-aux-item.has-parent-link {
431+
display: flex;
432+
align-items: center;
433+
}
434+
435+
.header-aux-parent-link {
436+
border-radius: var(--docs-radius) 0 0 var(--docs-radius);
437+
padding-right: 0.45rem;
438+
}
439+
440+
.header-aux-menu-toggle {
441+
flex: 0 0 34px;
442+
width: 34px;
443+
min-width: 34px;
444+
padding: 0;
445+
border-radius: 0 var(--docs-radius) var(--docs-radius) 0;
446+
}
447+
448+
.header-aux-item.has-parent-link:has(> .header-aux-menu-toggle[aria-expanded='true']) > .header-aux-parent-link {
449+
background: var(--docs-hover);
450+
color: var(--navbar-root-color--hover);
451+
}
452+
425453
.header-aux-trigger-label {
426454
min-width: 0;
427455
overflow: hidden;
@@ -498,13 +526,18 @@ body.sticky.close .docs-header > .sidebar-toggle {
498526
text-decoration: none;
499527
}
500528

529+
.header-aux-nav .header-aux-menu a[data-auxiliary-parent-link='true'] {
530+
display: none;
531+
}
532+
501533
.language-menu a:hover,
502534
.header-aux-menu a:hover {
503535
background: var(--docs-hover);
504536
text-decoration: none;
505537
}
506538

507539
.header-aux-trigger:focus-visible,
540+
.header-aux-menu-toggle:focus-visible,
508541
.header-aux-menu a:focus-visible {
509542
background: var(--docs-hover);
510543
outline: 2px solid var(--docs-accent);
@@ -823,6 +856,7 @@ nav.app-nav {
823856
display: none;
824857
}
825858

859+
.mobile-sidebar-menu,
826860
.mobile-primary-nav,
827861
.mobile-aux-nav {
828862
display: none;
@@ -1379,9 +1413,19 @@ body.docs-route-pending .markdown-section {
13791413
padding-top: 0.75rem;
13801414
}
13811415

1382-
.sidebar .mobile-primary-nav {
1416+
.sidebar .mobile-sidebar-menu {
1417+
box-sizing: border-box;
13831418
flex: 0 0 auto;
13841419
order: 1;
1420+
display: block;
1421+
align-self: stretch;
1422+
min-width: 0;
1423+
margin: 0;
1424+
padding: 0;
1425+
}
1426+
1427+
.sidebar .mobile-primary-nav {
1428+
flex: 0 0 auto;
13851429
display: grid;
13861430
grid-template-columns: 1fr 1fr;
13871431
grid-auto-rows: minmax(var(--sidebar-nav-row-height), auto);
@@ -1436,11 +1480,12 @@ body.docs-route-pending .markdown-section {
14361480
.mobile-sidebar-tools {
14371481
box-sizing: border-box;
14381482
flex: 0 0 auto;
1439-
order: 2;
14401483
display: grid;
14411484
grid-template-columns: minmax(0, 1fr) var(--sidebar-nav-row-height);
14421485
align-items: start;
14431486
gap: 0.35rem 0.45rem;
1487+
min-width: 0;
1488+
margin: 0;
14441489
padding: 0.2rem 0.75rem 0.7rem;
14451490
border-bottom: 1px solid var(--sidebar-border-color);
14461491
}
@@ -1545,7 +1590,6 @@ body.docs-route-pending .markdown-section {
15451590
.mobile-aux-nav {
15461591
box-sizing: border-box;
15471592
flex: 0 0 auto;
1548-
order: 1;
15491593
display: block;
15501594
min-width: 0;
15511595
margin: 0;
@@ -1571,13 +1615,13 @@ body.docs-route-pending .markdown-section {
15711615
max-width: none;
15721616
min-height: var(--sidebar-nav-row-height);
15731617
height: auto;
1574-
justify-content: flex-start;
1618+
justify-content: center;
15751619
padding: 0.45rem 0.65rem;
15761620
border-radius: 6px;
15771621
color: var(--sidebar-nav-link-color);
15781622
font-size: 0.86rem;
15791623
font-weight: 400;
1580-
text-align: left;
1624+
text-align: center;
15811625
touch-action: manipulation;
15821626
transition: background-color var(--duration-medium) ease,
15831627
color var(--duration-medium) ease;
@@ -1606,21 +1650,14 @@ body.docs-route-pending .markdown-section {
16061650
.mobile-expanded-menu {
16071651
grid-column: 1 / -1;
16081652
min-width: 0;
1609-
padding-top: 0.2rem;
1610-
}
1611-
1612-
.mobile-expanded-menu-title {
1613-
margin: 0 0.35rem 0.25rem;
1614-
color: var(--sidebar-nav-link-color);
1615-
font-size: 0.8rem;
1616-
font-weight: 650;
1617-
line-height: 1.35;
1653+
padding-top: 0.45rem;
1654+
border-top: 1px solid var(--sidebar-border-color);
16181655
}
16191656

16201657
.mobile-expanded-menu-list {
16211658
display: flex;
1622-
align-items: stretch;
1623-
gap: 0.25rem;
1659+
align-items: center;
1660+
gap: 0;
16241661
margin: 0;
16251662
padding: 0;
16261663
overflow-x: auto;
@@ -1635,12 +1672,22 @@ body.docs-route-pending .markdown-section {
16351672
padding: 0;
16361673
}
16371674

1675+
.mobile-expanded-menu-list .mobile-expanded-menu-divider {
1676+
display: flex;
1677+
align-items: center;
1678+
align-self: stretch;
1679+
padding: 0 0.1rem;
1680+
color: var(--sidebar-border-color);
1681+
font-size: 0.85rem;
1682+
line-height: 1;
1683+
user-select: none;
1684+
}
1685+
16381686
.mobile-expanded-menu-list a {
16391687
box-sizing: border-box;
16401688
display: flex;
16411689
align-items: center;
16421690
width: max-content;
1643-
min-width: 7rem;
16441691
min-height: var(--sidebar-nav-row-height);
16451692
padding: 0.45rem 0.65rem;
16461693
border-radius: 6px;
@@ -1664,12 +1711,12 @@ body.docs-route-pending .markdown-section {
16641711

16651712
.sidebar-nav {
16661713
flex: 1 1 0;
1667-
order: 3;
1714+
order: 2;
16681715
min-height: 0;
16691716
}
16701717

16711718
.page-toc-rail {
1672-
order: 4;
1719+
order: 3;
16731720
}
16741721

16751722
.content {

0 commit comments

Comments
 (0)