Skip to content

Commit 00185f1

Browse files
committed
polish: polish doc and sidebar style
1 parent d7ca1b6 commit 00185f1

File tree

2 files changed

+21
-24
lines changed

2 files changed

+21
-24
lines changed

Diff for: src/less/doc.less

+20-23
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
@animation_fadein_300: fadeIn 0.3s;
2222

2323
/** documentation list **/
24-
.blog,
2524
.doc,
25+
.blog,
2626
.meetup,
2727
.recruit,
2828
.weekly {
@@ -43,8 +43,10 @@
4343
.sidebar,
4444
.sidebar-page {
4545
min-height: calc(~'100vh - @{footer_height_pc}');
46+
}
4647

47-
&.sidebar {
48+
&.doc {
49+
.sidebar {
4850
flex: 0 0 @sidebar_width;
4951
}
5052
}
@@ -75,8 +77,8 @@
7577
flex: 1;
7678
padding: 20px;
7779
min-height: 500px;
80+
max-width: calc(~'100% - 24.5rem');
7881
padding: calc(~'@{header_height} + 20px') 1.2rem 1.5rem 1rem;
79-
overflow-x: auto;
8082

8183
h1,
8284
h2,
@@ -106,6 +108,7 @@
106108

107109
.archive {
108110
.content {
111+
overflow-x: auto;
109112
ol,
110113
p,
111114
table,
@@ -247,16 +250,20 @@
247250
.meetup,
248251
.recruit,
249252
.weekly {
250-
.nav-tags {
253+
.sidebar {
251254
flex: 0 0 15rem;
252255
max-width: 15rem;
256+
}
257+
258+
.nav-tags {
253259
padding: 20px 0;
254260
position: relative;
255261
top: @header_height;
256262
}
257263

258264
.archive,
259265
.list {
266+
max-width: calc(~'100% - 15rem');
260267
padding-left: 3rem;
261268
}
262269
}
@@ -277,26 +284,26 @@
277284

278285
.archive,
279286
.list {
280-
flex-basis: 100%;
287+
max-width: 100%;
281288
margin: 30px 0;
282-
padding-left: 5px;
283-
padding-right: 5px;
289+
padding: 30px 5px;
284290
}
285291

286292
.sidebar {
287-
flex: 100%;
288293
padding-top: 100px;
294+
max-height: 100vh;
295+
max-width: 100%;
289296
overflow: auto;
290297
}
291298

292299
.sidebar .tag-list {
293300
margin-left: -5px;
294301
}
295302

296-
&.doc {
297-
.sidebar-page {
298-
min-height: calc(~'100vh - 280px');
299-
overflow: auto;
303+
&.blog,
304+
&.recruit {
305+
.sidebar {
306+
min-height: 50vh;
300307
}
301308
}
302309
}
@@ -305,17 +312,7 @@
305312
.recruit,
306313
.meetup {
307314
.nav-tags {
308-
padding-top: 50px;
315+
padding-top: 45px;
309316
}
310317
}
311318
}
312-
313-
@media (max-width: 480px) {
314-
.blog .sidebar,
315-
.doc .sidebar,
316-
.meetup .sidebar,
317-
.recruit .sidebar,
318-
.weekly .sidebar {
319-
min-height: 100%;
320-
}
321-
}

Diff for: src/less/sidebar.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
.tag-list {
7070
display: flex;
7171
flex-flow: row wrap;
72-
margin: 12px 0 0 -8px;
72+
margin: 12px 0 0 -6px;
7373
padding: 0;
7474

7575
a.tag {

0 commit comments

Comments
 (0)