Skip to content

Commit 1ef2318

Browse files
committed
Mobile friendliness
1 parent b5967ba commit 1ef2318

File tree

3 files changed

+28
-28
lines changed

3 files changed

+28
-28
lines changed

docs/_includes/head.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<head>
22
<meta charset="utf-8">
3+
<meta name="viewport" content="width=device-width,initial-scale=1">
34
<title>{{ page.title }}</title>
45
<link rel="stylesheet" href="css/normalize.css"/>
56
<link rel="stylesheet" href="css/style.css"/>

docs/css/style.css

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,23 @@ body {
2727
}
2828
}
2929

30+
header, #content {
31+
max-width: 920px;
32+
margin: 0 auto;
33+
padding-left: 30px;
34+
padding-right: 30px;
35+
}
36+
3037
header {
31-
padding: 140px 110px 0 110px;
38+
padding-top: 20px;
39+
}
40+
41+
#content {
42+
padding-bottom: 60px;
3243
}
3344

3445
#_header h1 {
46+
margin-top: 0;
3547
margin-left: -19px;
3648
opacity: 0;
3749
animation: fadein 1s forwards;
@@ -49,10 +61,6 @@ header {
4961
animation: fadein 1s forwards, slideright 1s forwards;
5062
}
5163

52-
#content {
53-
padding: 0 110px 60px 110px;
54-
}
55-
5664
#tag em {
5765
font-style: normal
5866
}
@@ -123,26 +131,17 @@ a:hover {
123131
ul {
124132
margin-top: 20px;
125133
padding: 0 15px;
126-
width: 100%;
134+
column-gap: 30px;
127135
column-count: 2;
128136
box-sizing: content-box;
129137
}
130138

131139
ul li {
132140
margin-top: 5px;
133-
margin-right: 60px;
134141
list-style: none;
135142
border-bottom: 1px solid #eee;
136143
padding: 5px 0;
137-
column-break-inside: avoid;
138-
}
139-
140-
ul::after {
141-
content: '.';
142-
height: 0;
143-
display: block;
144-
visibility: hidden;
145-
clear: both;
144+
break-inside: avoid;
146145
}
147146

148147
code {
@@ -151,7 +150,7 @@ code {
151150
}
152151

153152
pre {
154-
margin: 20px;
153+
margin: 20px 0;
155154
padding: 20px;
156155
border: 1px solid #ddd;
157156
border-bottom-color: #ccc;
@@ -162,16 +161,15 @@ pre {
162161
}
163162

164163
main img:not([src*=avatar]):not([src*=badges]):not([src*=".svg"]) {
165-
margin: 30px;
166-
padding: 1px;
164+
display: block;
165+
margin: 30px auto;
167166
border-radius: 3px;
168167
box-shadow: 0 3px 10px #dedede, 0 1px 5px #888;
169168
max-width: 100%;
170169
}
171170

172171
footer {
173172
background-color: #eee;
174-
width: 100%;
175173
padding: 50px 0;
176174
text-align: right;
177175
border-top: 1px solid #ddd;
@@ -184,22 +182,22 @@ footer span {
184182
font-size: 0.8em;
185183
}
186184

187-
@media all and (max-width: 850px) {
188-
ul li {
189-
width: 100%;
190-
}
191-
}
192-
193185
@media all and (max-width: 600px) {
194186
#tag {
195187
margin-top: 0;
196188
margin-left: 0;
197189
margin-bottom: 0;
198190
}
199191

200-
.onload #tag {
201-
margin-left: 0;
192+
ul {
193+
column-count: 1;
194+
}
195+
196+
pre {
197+
padding: 10px;
198+
margin: 20px -11px;
202199
}
200+
203201
}
204202

205203
blockquote {

docs/js/avatars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
for (var i = 0; i < images.length; i += 1) {
1919
images[i].onload = onloadHandler;
20+
images[i].onerror = onloadHandler;
2021
}
2122
});
2223

0 commit comments

Comments
 (0)