Skip to content

Commit 3822ebe

Browse files
committed
Added responsivity of reading content, changed language switcher icon
1 parent 9cefc62 commit 3822ebe

File tree

6 files changed

+64
-4
lines changed

6 files changed

+64
-4
lines changed

assets/api-language-selector.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/api-language-selector.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/api-language-selector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ require(['gitbook', 'jquery'], function(gitbook, $) {
8787
if (state.presentLanguages.length > 0 && state.toolbarBtnId === undefined) {
8888
// Create toolbar btn
8989
state.toolbarBtnId = gitbook.toolbar.createButton({
90-
icon: 'fa fa-globe',
90+
icon: 'fa fa-code',
9191
label: 'Change language',
9292
className: 'language-picker',
9393
dropdown: []

src/less/main.less

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,16 @@
33
@import "parts/code-method.less";
44
@import "parts/comments.less";
55
@import "parts/langswitcher.less";
6+
@import "parts/page.less";
67

78
.markdown-section {
89
padding: @markdown-section-padding @code-method-padding 0;
910
}
11+
12+
#book-search-results .search-results {
13+
padding: 20px 30px 0;
14+
}
15+
16+
.book .book-body .page-wrapper {
17+
margin-bottom: 12em;
18+
}

src/less/parts/langswitcher.less

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@
2727

2828
.language-picker-btn {
2929
display: block;
30-
height: 30px;
30+
min-height: 30px;
3131
line-height: 2;
32+
font-size: 1.6rem;
3233
text-align: center;
3334
vertical-align: middle;
3435
width: 100px;

src/less/parts/page.less

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
.book {
2+
&{
3+
.book-header {
4+
padding: 0;
5+
position: fixed;
6+
top: 0;
7+
left: 0;
8+
right: 0;
9+
background-color: #fff;
10+
border-bottom: 1px solid rgba(0,0,0,.07);
11+
transition: left 250ms ease;
12+
}
13+
14+
.page-inner {
15+
max-width: 100%;
16+
text-align: justify;
17+
padding: 0;
18+
margin-top: 50px;
19+
}
20+
21+
@media only screen and (min-width: 600px) {
22+
}
23+
24+
@media only screen and (min-width: 768px) {
25+
.page-inner { max-width: 95%; }
26+
}
27+
28+
@media only screen and (min-width: 992px) {
29+
.page-inner { max-width: 85%; }
30+
}
31+
32+
@media only screen and (min-width: 1200px) {
33+
.page-inner { max-width: 75%; }
34+
}
35+
36+
@media only screen and (min-width: 1440px) {
37+
.page-inner { max-width: 60%; }
38+
}
39+
}
40+
&.with-summary {
41+
.book-header {
42+
left: 0px;
43+
}
44+
@media only screen and (min-width: 600px) {
45+
.book-header {
46+
left: 300px;
47+
}
48+
}
49+
}
50+
}

0 commit comments

Comments
 (0)