Skip to content

Commit fcf5b8b

Browse files
authored
Merge pull request #1651 from adsingh14/error_pages_n_css
Error page responsiveness, responsive sidebar updated
2 parents 0ea0142 + 8c15bb9 commit fcf5b8b

File tree

6 files changed

+57
-25
lines changed

6 files changed

+57
-25
lines changed

app/assets/stylesheets/book.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ ol.book-toc {
152152
}
153153

154154
.book-wrapper {
155-
float:right;
155+
float: right;
156156
margin: -20px 40px 0 40px;
157157
}
158158

@@ -165,3 +165,9 @@ ol.book-toc {
165165
top: 2rem;
166166
}
167167
}
168+
169+
@media (max-width: $mobile-xs) {
170+
.book-wrapper {
171+
margin-right: 0;
172+
}
173+
}

app/assets/stylesheets/errors.scss

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,55 @@ body {
1616
}
1717

1818
.inner {
19-
width: 500px;
19+
max-width: 500px;
2020
margin: 70px auto;
21+
text-align: center;
2122
}
2223

2324
p {
2425
font-size: 18px;
2526
color: lighten(#4e443c, 10%);
2627
margin-bottom: 30px;
28+
img {
29+
max-width: 100%;
30+
height: auto;
31+
}
2732
}
2833

2934
nav ul {
30-
list-style: none;
31-
font-size: 16px;
32-
font-weight: bold;
33-
margin-left: 0;
34-
margin-bottom: 1.4em;
35-
li {
36-
display: inline;
37-
float: left;
38-
a {
39-
display: block;
40-
color: $orange;
41-
&:hover {
42-
color: darken($orange, 5%);
35+
display: flex;
36+
flex-wrap: wrap;
37+
justify-content: center;
38+
list-style: none;
39+
font-size: 16px;
40+
font-weight: bold;
41+
margin-left: 0;
42+
margin-bottom: 1.4em;
43+
li {
44+
a {
45+
display: block;
46+
color: $orange;
47+
&:hover {
48+
color: darken($orange, 5%);
49+
}
4350
}
4451
}
45-
}
46-
li + li {
47-
margin-left: 15px;
48-
}
52+
li + li {
53+
margin-left: 15px;
54+
}
4955
}
56+
57+
// Mobile
58+
@media (max-width: $mobile-m) {
59+
nav ul {
60+
li {
61+
margin-left: 0;
62+
a {
63+
padding: 1em;
64+
}
65+
}
66+
li + li {
67+
margin-left: 0;
68+
}
69+
}
70+
}

app/assets/stylesheets/sidebar.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,14 @@ aside.sidebar.active {
5858
}
5959
aside{
6060
&.sidebar {
61-
position: absolute;
61+
position: fixed;
62+
top: 1em;
6263
transform: translateX(-105.5%);
6364
transition: transform 0.3s, background-color 0.3s;
6465
padding: 20px;
65-
height: 100%;
66-
z-index: 10;
66+
height: 90vh;
67+
overflow-y: scroll;
68+
z-index: 1001 !important;
6769
}
6870
}
6971
}

public/404.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<title>Git</title>
55
<meta charset='utf-8'>
66
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
7-
<link href="/assets/errors.css?body=1" media="screen" rel="stylesheet" type="text/css" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1">
8+
<link href="/assets/errors.css" rel="stylesheet"/>
89
<!--[if (gte IE 6)&(lte IE 8)]>
910
<script src="/assets/selectivizr-min.js?body=1" type="text/javascript"></script>
1011
<![endif]-->

public/422.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
<html>
33
<head>
44
<title>The change you wanted was rejected (422)</title>
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
56
<style type="text/css">
67
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
78
div.dialog {
8-
width: 25em;
9+
max-width: 25em;
910
padding: 0 4em;
1011
margin: 4em auto 0 auto;
1112
border: 1px solid #ccc;

public/500.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<title>Git</title>
55
<meta charset='utf-8'>
66
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
7-
<link href="/assets/errors.css?body=1" media="screen" rel="stylesheet" type="text/css" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1">
8+
<link href="/assets/errors.css" rel="stylesheet"/>
89
<!--[if (gte IE 6)&(lte IE 8)]>
910
<script src="/assets/selectivizr-min.js?body=1" type="text/javascript"></script>
1011
<![endif]-->

0 commit comments

Comments
 (0)