Skip to content

Commit e3c74cf

Browse files
authored
Sync multilingual versions (#1875)
* Sync multilingual docs and comments * Refactor zensical extra.css * Refine zensical styles * Tune zensical landing buttons * Refine landing section themes
1 parent 323eb92 commit e3c74cf

15 files changed

Lines changed: 354 additions & 430 deletions

File tree

docs/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z">
8585
</path>
8686
</svg>
87-
<span>代码仓库</span>
87+
<span>GitHub</span>
8888
</a>
8989
</div>
9090
<!-- arrow -->
@@ -97,7 +97,7 @@
9797
</section>
9898

9999
<!-- Section: reading -->
100-
<section data-md-color-scheme="default" data-md-color-primary="white" class="home-div">
100+
<section data-md-color-scheme="slate" data-md-color-primary="grey" class="home-div">
101101
<div class="section-content">
102102
<div class="reading-media">
103103
<!-- devices -->
@@ -147,7 +147,7 @@
147147
</section>
148148

149149
<!-- Section: endorsements -->
150-
<section data-md-color-scheme="slate" data-md-color-primary="grey" class="home-div">
150+
<section data-md-color-scheme="slate" data-md-color-primary="grey" class="home-div home-div--black">
151151
<div class="section-content">
152152
<h3 style="text-align: center; margin: 1em auto;">推荐语</h3>
153153
<div class="intro-container" style="margin: 0 auto;">
@@ -164,7 +164,7 @@ <h3 style="text-align: center; margin: 1em auto;">推荐语</h3>
164164
</section>
165165

166166
<!-- Section: features -->
167-
<section data-md-color-scheme="default" data-md-color-primary="white" class="home-div">
167+
<section data-md-color-scheme="slate" data-md-color-primary="grey" class="home-div">
168168
<div class="section-content">
169169
<div class="intro-container">
170170
<div class="intro-text">
@@ -218,7 +218,7 @@ <h3 style="margin-left: 0.5em;">互助学习</h3>
218218
</section>
219219

220220
<!-- Section: special thanks -->
221-
<section class="home-div" data-md-color-primary="grey" data-md-color-scheme="slate">
221+
<section class="home-div home-div--black" data-md-color-primary="grey" data-md-color-scheme="slate">
222222
<div class="section-content">
223223
<h3 style="text-align: center; margin: 0 0 2em 0;">
224224
鸣谢
@@ -234,7 +234,7 @@ <h3 style="text-align: center; margin: 0 0 2em 0;">
234234
</section>
235235

236236
<!-- Section: contributors -->
237-
<section data-md-color-scheme="default" data-md-color-primary="white" class="home-div">
237+
<section data-md-color-scheme="slate" data-md-color-primary="grey" class="home-div">
238238
<div class="section-content" style="max-width: 90vw;">
239239
<!-- author -->
240240
<div style="margin: 2em auto;">

en/codes/c/chapter_stack_and_queue/array_queue.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
typedef struct {
1111
int *nums; // Array for storing queue elements
1212
int front; // Front pointer, points to the front of the queue element
13-
int queSize; // Rear pointer, points to rear + 1
13+
int queSize; // Current number of elements in the queue
1414
int queCapacity; // Queue capacity
1515
} ArrayQueue;
1616

@@ -131,4 +131,4 @@ int main() {
131131
delArrayQueue(queue);
132132

133133
return 0;
134-
}
134+
}

en/docs/chapter_preface/suggestions.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,8 @@
137137

138138
// Content comment, used to explain code in detail
139139

140-
/**
141-
* Multi-line
142-
* comment
143-
*/
140+
// Multi-line
141+
// comment
144142
```
145143

146144
=== "C"

en/docs/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
</section>
9898

9999
<!-- Section: reading -->
100-
<section data-md-color-scheme="default" data-md-color-primary="white" class="home-div">
100+
<section data-md-color-scheme="slate" data-md-color-primary="grey" class="home-div">
101101
<div class="section-content">
102102
<div class="reading-media">
103103
<!-- devices -->
@@ -147,7 +147,7 @@
147147
</section>
148148

149149
<!-- Section: endorsements -->
150-
<section data-md-color-scheme="slate" data-md-color-primary="grey" class="home-div">
150+
<section data-md-color-scheme="slate" data-md-color-primary="grey" class="home-div home-div--black">
151151
<div class="section-content">
152152
<h3 style="text-align: center; margin: 1em auto;">Endorsements</h3>
153153
<div class="intro-container" style="margin: 0 auto;">
@@ -164,7 +164,7 @@ <h3 style="text-align: center; margin: 1em auto;">Endorsements</h3>
164164
</section>
165165

166166
<!-- Section: features -->
167-
<section data-md-color-scheme="default" data-md-color-primary="white" class="home-div">
167+
<section data-md-color-scheme="slate" data-md-color-primary="grey" class="home-div">
168168
<div class="section-content">
169169
<div class="intro-container">
170170
<div class="intro-text">
@@ -218,7 +218,7 @@ <h3 style="margin-left: 0.5em;">Learning together</h3>
218218
</section>
219219

220220
<!-- Section: special thanks -->
221-
<section class="home-div" data-md-color-primary="grey" data-md-color-scheme="slate">
221+
<section class="home-div home-div--black" data-md-color-primary="grey" data-md-color-scheme="slate">
222222
<div class="section-content">
223223
<h3 style="text-align: center; margin: 0 0 2em 0;">
224224
Special thanks
@@ -234,7 +234,7 @@ <h3 style="text-align: center; margin: 0 0 2em 0;">
234234
</section>
235235

236236
<!-- Section: contributors -->
237-
<section data-md-color-scheme="default" data-md-color-primary="white" class="home-div">
237+
<section data-md-color-scheme="slate" data-md-color-primary="grey" class="home-div">
238238
<div class="section-content" style="max-width: 90vw;">
239239
<!-- author -->
240240
<div style="margin: 2em auto;">

ja/codes/c/chapter_stack_and_queue/array_queue.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
typedef struct {
1111
int *nums; // キュー要素を格納する配列
1212
int front; // 先頭ポインタ。先頭要素を指す
13-
int queSize; // 末尾ポインタ。キューの末尾 + 1 を指す
13+
int queSize; // 現在のキュー内の要素数
1414
int queCapacity; // キューの容量
1515
} ArrayQueue;
1616

@@ -131,4 +131,4 @@ int main() {
131131
delArrayQueue(queue);
132132

133133
return 0;
134-
}
134+
}

ja/docs/chapter_preface/suggestions.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,8 @@
137137

138138
// 内容コメント。コードを詳しく説明するために使います
139139

140-
/**
141-
* 複数行
142-
* コメント
143-
*/
140+
// 複数行
141+
// コメント
144142
```
145143

146144
=== "C"

ja/docs/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z">
8585
</path>
8686
</svg>
87-
<span>コードリポジトリ</span>
87+
<span>GitHub</span>
8888
</a>
8989
</div>
9090
<!-- arrow -->
@@ -97,7 +97,7 @@
9797
</section>
9898

9999
<!-- Section: reading -->
100-
<section data-md-color-scheme="default" data-md-color-primary="white" class="home-div">
100+
<section data-md-color-scheme="slate" data-md-color-primary="grey" class="home-div">
101101
<div class="section-content">
102102
<div class="reading-media">
103103
<!-- devices -->
@@ -147,7 +147,7 @@
147147
</section>
148148

149149
<!-- Section: endorsements -->
150-
<section data-md-color-scheme="slate" data-md-color-primary="grey" class="home-div">
150+
<section data-md-color-scheme="slate" data-md-color-primary="grey" class="home-div home-div--black">
151151
<div class="section-content">
152152
<h3 style="text-align: center; margin: 1em auto;">推薦文</h3>
153153
<div class="intro-container" style="margin: 0 auto;">
@@ -164,7 +164,7 @@ <h3 style="text-align: center; margin: 1em auto;">推薦文</h3>
164164
</section>
165165

166166
<!-- Section: features -->
167-
<section data-md-color-scheme="default" data-md-color-primary="white" class="home-div">
167+
<section data-md-color-scheme="slate" data-md-color-primary="grey" class="home-div">
168168
<div class="section-content">
169169
<div class="intro-container">
170170
<div class="intro-text">
@@ -218,7 +218,7 @@ <h3 style="margin-left: 0.5em;">相互学習</h3>
218218
</section>
219219

220220
<!-- Section: special thanks -->
221-
<section class="home-div" data-md-color-primary="grey" data-md-color-scheme="slate">
221+
<section class="home-div home-div--black" data-md-color-primary="grey" data-md-color-scheme="slate">
222222
<div class="section-content">
223223
<h3 style="text-align: center; margin: 0 0 2em 0;">
224224
謝辞
@@ -234,7 +234,7 @@ <h3 style="text-align: center; margin: 0 0 2em 0;">
234234
</section>
235235

236236
<!-- Section: contributors -->
237-
<section data-md-color-scheme="default" data-md-color-primary="white" class="home-div">
237+
<section data-md-color-scheme="slate" data-md-color-primary="grey" class="home-div">
238238
<div class="section-content" style="max-width: 90vw;">
239239
<!-- author -->
240240
<div style="margin: 2em auto;">

overrides/partials/comments.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ <h5 align="center" id="__comments">{{ comm }}</h5>
4646
/* Set palette on initial load */
4747
var palette = __md_get("__palette")
4848
if (palette && typeof palette.color === "object") {
49-
var theme = palette.color.scheme === "slate" ? "dark_dimmed" : "light"
49+
var theme = palette.color.scheme === "slate" ? "noborder_dark" : "light"
5050
giscus.setAttribute("data-theme", theme)
5151
}
5252

@@ -56,7 +56,7 @@ <h5 align="center" id="__comments">{{ comm }}</h5>
5656
ref.addEventListener("change", function() {
5757
var palette = __md_get("__palette")
5858
if (palette && typeof palette.color === "object") {
59-
var theme = palette.color.scheme === "slate" ? "dark_dimmed" : "light"
59+
var theme = palette.color.scheme === "slate" ? "noborder_dark" : "light"
6060

6161
/* Instruct Giscus to change theme */
6262
var frame = document.querySelector(".giscus-frame")

0 commit comments

Comments
 (0)