Skip to content

Commit

Permalink
Mobile friendliness
Browse files Browse the repository at this point in the history
  • Loading branch information
Munter committed Dec 22, 2017
1 parent b5967ba commit 1ef2318
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
1 change: 1 addition & 0 deletions docs/_includes/head.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>{{ page.title }}</title>
<link rel="stylesheet" href="css/normalize.css"/>
<link rel="stylesheet" href="css/style.css"/>
Expand Down
54 changes: 26 additions & 28 deletions docs/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,23 @@ body {
}
}

header, #content {
max-width: 920px;
margin: 0 auto;
padding-left: 30px;
padding-right: 30px;
}

header {
padding: 140px 110px 0 110px;
padding-top: 20px;
}

#content {
padding-bottom: 60px;
}

#_header h1 {
margin-top: 0;
margin-left: -19px;
opacity: 0;
animation: fadein 1s forwards;
Expand All @@ -49,10 +61,6 @@ header {
animation: fadein 1s forwards, slideright 1s forwards;
}

#content {
padding: 0 110px 60px 110px;
}

#tag em {
font-style: normal
}
Expand Down Expand Up @@ -123,26 +131,17 @@ a:hover {
ul {
margin-top: 20px;
padding: 0 15px;
width: 100%;
column-gap: 30px;
column-count: 2;
box-sizing: content-box;
}

ul li {
margin-top: 5px;
margin-right: 60px;
list-style: none;
border-bottom: 1px solid #eee;
padding: 5px 0;
column-break-inside: avoid;
}

ul::after {
content: '.';
height: 0;
display: block;
visibility: hidden;
clear: both;
break-inside: avoid;
}

code {
Expand All @@ -151,7 +150,7 @@ code {
}

pre {
margin: 20px;
margin: 20px 0;
padding: 20px;
border: 1px solid #ddd;
border-bottom-color: #ccc;
Expand All @@ -162,16 +161,15 @@ pre {
}

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

footer {
background-color: #eee;
width: 100%;
padding: 50px 0;
text-align: right;
border-top: 1px solid #ddd;
Expand All @@ -184,22 +182,22 @@ footer span {
font-size: 0.8em;
}

@media all and (max-width: 850px) {
ul li {
width: 100%;
}
}

@media all and (max-width: 600px) {
#tag {
margin-top: 0;
margin-left: 0;
margin-bottom: 0;
}

.onload #tag {
margin-left: 0;
ul {
column-count: 1;
}

pre {
padding: 10px;
margin: 20px -11px;
}

}

blockquote {
Expand Down
1 change: 1 addition & 0 deletions docs/js/avatars.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

for (var i = 0; i < images.length; i += 1) {
images[i].onload = onloadHandler;
images[i].onerror = onloadHandler;
}
});

Expand Down

0 comments on commit 1ef2318

Please sign in to comment.