Skip to content

Commit bc8c5e8

Browse files
committed
refactor
1 parent e2c844c commit bc8c5e8

12 files changed

Lines changed: 78 additions & 175 deletions

File tree

.idea/workspace.xml

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

dlce/custom-post-processing/v1.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# 自定义后期处理
22

3-
?> **过时的文档**<br>Post-Processing V1 将在未来的版本移除支持,此文档现不再维护。推荐使用 [V2 版本](/dlce/custom_post_processing_v2.md)
3+
?> **过时的文档**<br>Post-Processing V1 将在未来的版本移除支持,此文档现不再维护。推荐使用 [V2 版本](/dlce/custom-post-processing/v2.md)
44

55
<!-- tabs:start -->
66
<!-- tab:新版 -->
77
### 新版 :id=New
88

99
> **兼容性**<br>DLCE v3.0.1 及以上
1010
11-
?> DLCE v3.0.1 以下版本和 DLCE 怀旧版不兼容此版本。文档请参考<a href="#/dlce/custom_post_processing_v1#旧版" target="_blank">旧版</a>。
11+
?> DLCE v3.0.1 以下版本和 DLCE 怀旧版不兼容此版本。文档请参考<a href="#/dlce/custom-post-processing/v1#legacy" target="_blank">旧版</a>。
1212

1313
## 制作配置文件
1414
- [加入QQ群](https://qm.qq.com/q/wlrTgLHAHI)在群文件中寻找自定义后处理的配置文件模板;
@@ -67,7 +67,7 @@ Custom/PostProcessing/关卡代号.txt
6767

6868
> **兼容性**<br>DLCE v3.0.0 ~ v1.2.9、DLCE 怀旧版
6969
70-
?> 该版本的自定义后期处理与<a href="#/dlce/custom_post_processing_v1#新版" target="_blank">新版</a>无实际差异,仅文件路径、文件名有区别。
70+
?> 该版本的自定义后期处理与<a href="#/dlce/custom-post-processing/v1#new" target="_blank">新版</a>无实际差异,仅文件路径、文件名有区别。
7171

7272
## 制作配置文件
7373
- [加入QQ群](https://qm.qq.com/q/wlrTgLHAHI)在群文件中寻找自定义后处理的配置文件模板;
@@ -324,7 +324,7 @@ Dancing Line/Dancing Line_Data/Custom/PostProcessing/关卡代号/postprofile.by
324324
<blockquote>
325325

326326
**相关文档**
327-
- [自定义后期处理 > V2](/dlce/custom_post_processing_v2.md)
327+
- [自定义后期处理 > V2](/dlce/custom-post-processing/v2.md)
328328
- [游戏设置 > 画质](/dlce/game-settings.md#画质)
329329
- [关卡信息](/dlce/level_information.md)
330330

dlce/custom-post-processing/v2.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ Rounded=false
329329
<blockquote>
330330

331331
**相关文档**
332-
- [自定义后期处理 > V1 > 新版](/dlce/custom_post_processing_v1.md#New)
333-
- [自定义后期处理 > V1 > 旧版](/dlce/custom_post_processing_v1.md#Legacy)
332+
- [自定义后期处理 > V1 > 新版](/dlce/custom-post-processing/v1.md#new)
333+
- [自定义后期处理 > V1 > 旧版](/dlce/custom-post-processing/v1.md#legacy)
334334
- [游戏设置 > 画质](/dlce/game-settings.md#画质)
335335
- [关卡信息](/dlce/level_information.md)
336336

en/_navbar.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
- [Home](/en/about)
2-
- [Game Docs](/en/dlce)
2+
- [Docs](/en/dlce)
3+
- [Social](/en/social)
34
- [Legal](/en/legal)
45
- [Sponsor](https://github.com/sponsors/Aaron8052)

en/about/home.md

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -25,52 +25,15 @@ You are welcomed to join the work by clicking "Edit Wiki" at the bottom of the p
2525

2626
<iframe frameborder="0" src="https://itch.io/embed/3021536?link_color=2c9cff" width="552" height="167"><a href="https://fengyandl.itch.io/dlce">Dancing Line Community Edition by fengyandl</a></iframe>
2727

28-
## Communities :id=communities
29-
30-
<div class="icon-grid">
31-
<a class="icon-grid-group" href="https://chinadlrs.com/app/?id=25" target="_blank">
32-
<div class="icon-grid-item">
33-
<img class="icon-grid-img" src="/Docs/lib/img/dlrs.png" alt="DLRS">
34-
<div class="icon-grid-label">China DLRS</div>
35-
</div>
36-
</a>
37-
38-
<a class="icon-grid-group" href="https://space.bilibili.com/187016314" target="_blank">
39-
<div class="icon-grid-item">
40-
<img class="icon-grid-img" src="/Docs/lib/img/bili.png" alt="Bilibili">
41-
<div class="icon-grid-label">Bilibili</div>
42-
</div>
43-
</a>
44-
45-
<a class="icon-grid-group" href="https://www.youtube.com/@DLCommunityEdition" target="_blank">
46-
<div class="icon-grid-item">
47-
<img class="icon-grid-img" src="/Docs/lib/img/yt_icon_red_digital.png" alt="YouTube">
48-
<div class="icon-grid-label">YouTube</div>
49-
</div>
50-
</a>
51-
52-
<a class="icon-grid-group" href="https://pd.qq.com/s/2njtk4vj2" target="_blank">
53-
<div class="icon-grid-item">
54-
<img class="icon-grid-img" src="/Docs/lib/img/qq-channel.png" alt="Tencent Channel">
55-
<div class="icon-grid-label">Tencent Channel</div>
56-
</div>
57-
</a>
58-
59-
<a class="icon-grid-group" href="https://discord.gg/8Ew5n3XadT" target="_blank">
60-
<div class="icon-grid-item">
61-
<img class="icon-grid-img" src="/Docs/lib/img/discord.png" alt="Discord">
62-
<div class="icon-grid-label">Discord</div>
63-
</div>
64-
</a>
65-
</div>
66-
6728
## Spec Requirements
6829

6930
<!-- tabs:start -->
7031

7132
<!-- tab:Windows -->
7233

73-
?> Requires a 64-bit processor and operating system
34+
?> Requires a 64-bit processor and operating system.
35+
36+
!> Windows 7 or older systems are not supported.
7437

7538
### Recommended
7639

@@ -88,7 +51,7 @@ You are welcomed to join the work by clicking "Edit Wiki" at the bottom of the p
8851

8952
> The minimum configuration cannot guarantee a complete game experience.
9053
91-
- **Operating System**: Windows 7 SP1
54+
- **Operating System**: Windows 8
9255
- **Processor**: Intel Core i5-2400 3.1GHz / AMD Radeon FX-8120 3.1GHz
9356
- **Graphics API**: Direct3D11 or OpenGLCore
9457
- **Graphics Card (GPU)**: NVIDIA GeForce GTX 750 Ti / AMD Radeon HD 6950

en/social/_sidebar.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- [Discord](https://discord.gg/8Ew5n3XadT)
2+
- [YouTube](https://www.youtube.com/@DLCommunityEdition)
3+
- [China DLRS](https://chinadlrs.com/app/?id=25)
4+
- [Bilibili](https://space.bilibili.com/187016314)
5+
- [Tencent Channel](https://pd.qq.com/s/2njtk4vj2)
6+
- [Sponsor](https://github.com/sponsors/Aaron8052)

index.html

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<link id="prism-light-theme" rel="stylesheet" href="lib/css/prism-light.css">
6666
<link id="prism-dark-theme" rel="stylesheet" href="lib/css/prism-dark.css">
6767
<link rel="stylesheet" href="lib/css/docsify-tabs.css">
68-
<link rel="stylesheet" href="lib/css/docs-app.css?v=47">
68+
<link rel="stylesheet" href="lib/css/docs-app.css?v=49">
6969

7070
<script>
7171
(function () {
@@ -126,19 +126,31 @@
126126
next('<span data-category-landing-placeholder hidden></span>');
127127
},
128128
'/(?:[^/]+/)?(?:about|dlce|social|legal)/?': function (sectionPath, matched, next) {
129+
var landingPlaceholder = '<span data-section-landing-placeholder hidden></span>';
129130
var normalizedPath = /\/$/.test(sectionPath) ? sectionPath : sectionPath + '/';
130131
var readmePath = window.$docsify.basePath.replace(/\/$/, '') + normalizedPath + 'README.md';
132+
var showGeneratedLanding = function () {
133+
next(landingPlaceholder);
134+
};
135+
136+
if (typeof window.fetch !== 'function') {
137+
showGeneratedLanding();
138+
return;
139+
}
131140

132141
fetch(readmePath).then(function (response) {
133-
if (response.ok) return response.text().then(next);
134-
if (response.status === 404) {
135-
next('<span data-section-landing-placeholder hidden></span>');
142+
if (!response.ok) {
143+
showGeneratedLanding();
136144
return;
137145
}
138-
next(false);
139-
}).catch(function () {
140-
next(false);
141-
});
146+
147+
return response.text().then(function (markdown) {
148+
var isEmpty = !markdown.trim();
149+
var isHtmlFallback = /^\s*(?:<!doctype\s+html|<html(?:\s|>))/i.test(markdown);
150+
if (isEmpty || isHtmlFallback) showGeneratedLanding();
151+
else next(markdown);
152+
}, showGeneratedLanding);
153+
}, showGeneratedLanding);
142154
}
143155
},
144156
toc: {
@@ -216,7 +228,7 @@
216228
</script>
217229

218230
<script src="lib/docsify.min.js"></script>
219-
<script src="lib/navigation.js?v=46"></script>
231+
<script src="lib/navigation.js?v=48"></script>
220232
<script src="lib/footer-hook.js"></script>
221233
<script src="lib/plugins/search.min.js"></script>
222234
<script src="lib/plugins/docsify-themeable.min.js"></script>

lib/css/docs-app.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@
129129
--search-input-border-color: #3b3e41;
130130
--search-input-color: #f3f4f5;
131131
--search-input-placeholder-color: #9da1a6;
132+
--search-input-background-image: url("data:image/svg+xml,%3Csvg height='20' width='20' viewBox='0 0 24 24' fill='none' stroke='%239da1a6' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10.5' cy='10.5' r='7.5'/%3E%3Cline x1='21' y1='21' x2='15.8' y2='15.8'/%3E%3C/svg%3E");
132133
--navbar-root-color: #e2e3e5;
133134
--navbar-root-color--hover: #ffffff;
134135
--navbar-root-color--active: #55afff;
@@ -1142,11 +1143,16 @@ body.docs-route-pending .markdown-section {
11421143
}
11431144

11441145
.category-card-copy strong {
1146+
display: -webkit-box;
11451147
overflow: hidden;
11461148
color: var(--strong-color);
11471149
font-size: 1rem;
1150+
line-height: 1.45;
1151+
overflow-wrap: anywhere;
11481152
text-overflow: ellipsis;
1149-
white-space: nowrap;
1153+
white-space: normal;
1154+
-webkit-box-orient: vertical;
1155+
-webkit-line-clamp: 2;
11501156
}
11511157

11521158
.category-card-arrow {

lib/navigation.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,13 @@
562562

563563
var query = window.location.hash.split('?')[1] || '';
564564
var legacySectionRoute = Boolean(new URLSearchParams(query).get('section'));
565-
if (!legacySectionRoute && !content.querySelector('[data-section-landing-placeholder]')) return;
565+
var hasLandingPlaceholder = Boolean(content.querySelector('[data-section-landing-placeholder]'));
566+
var hasArticleContent = Array.prototype.some.call(content.children, function (child) {
567+
return !child.matches(
568+
'footer, hr, script, [data-section-landing-placeholder], [data-category-landing-placeholder]'
569+
);
570+
});
571+
if (!legacySectionRoute && !hasLandingPlaceholder && hasArticleContent) return;
566572

567573
var navigationLink = sectionNavigationLink(section);
568574
if (!navigationLink) return;
@@ -1036,10 +1042,11 @@
10361042
return true;
10371043
}
10381044

1039-
function schedulePageOutlineRefresh() {
1045+
function schedulePageOutlineRefresh(shouldSyncTarget) {
10401046
window.clearTimeout(tabOutlineRefreshTimer);
10411047
tabOutlineRefreshTimer = window.setTimeout(function () {
10421048
tabOutlineRefreshTimer = 0;
1049+
if (shouldSyncTarget) syncTabsToCurrentHeading(true);
10431050
setupPageOutlinePanel();
10441051
}, 0);
10451052
}
@@ -1689,8 +1696,7 @@
16891696
renderSectionLandingPage();
16901697
setupResponsiveTableCells();
16911698
syncSidebarPageSelection();
1692-
syncTabsToCurrentHeading(true);
1693-
setupPageOutlinePanel();
1699+
schedulePageOutlineRefresh(true);
16941700
setupSidebarGroups();
16951701
setupBreadcrumb();
16961702
setupMobilePrimaryNav();

social/_sidebar.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
- QQ 群
22
- [官方 QQ 群](/social/qq)
33
- [QQ 群规](/social/rules)
4-
- 外部社区
5-
- [DLRS 同人群官方网站](https://chinadlrs.com/app/?id=25)
6-
- [哔哩哔哩](https://space.bilibili.com/187016314)
7-
- [爱发电赞助](https://afdian.com/a/fengyanDL)
4+
- [DLRS 同人群官方网站](https://chinadlrs.com/app/?id=25)
5+
- [哔哩哔哩](https://space.bilibili.com/187016314)
6+
- [爱发电赞助](https://afdian.com/a/fengyanDL)

0 commit comments

Comments
 (0)