Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git-scm.com.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2021-12-01 20:13:33 +0300
committerGitHub <noreply@github.com>2021-12-01 20:13:33 +0300
commitfcf5b8bcb7fad9a7e277739473925b4b26de9ec5 (patch)
treeafbbac0d357ad8d3e5a250f6552e40733b1099f6
parent0ea0142f2cc83f01eab80356fa12c7d79971f474 (diff)
parent8c15bb98e8a3726812d42860d9df8a6f2998fa1e (diff)
Merge pull request #1651 from adsingh14/error_pages_n_css
Error page responsiveness, responsive sidebar updated
-rw-r--r--app/assets/stylesheets/book.scss8
-rw-r--r--app/assets/stylesheets/errors.scss57
-rw-r--r--app/assets/stylesheets/sidebar.scss8
-rw-r--r--public/404.html3
-rw-r--r--public/422.html3
-rw-r--r--public/500.html3
6 files changed, 57 insertions, 25 deletions
diff --git a/app/assets/stylesheets/book.scss b/app/assets/stylesheets/book.scss
index f3153b1d..3bef0945 100644
--- a/app/assets/stylesheets/book.scss
+++ b/app/assets/stylesheets/book.scss
@@ -152,7 +152,7 @@ ol.book-toc {
}
.book-wrapper {
- float:right;
+ float: right;
margin: -20px 40px 0 40px;
}
@@ -165,3 +165,9 @@ ol.book-toc {
top: 2rem;
}
}
+
+@media (max-width: $mobile-xs) {
+ .book-wrapper {
+ margin-right: 0;
+ }
+} \ No newline at end of file
diff --git a/app/assets/stylesheets/errors.scss b/app/assets/stylesheets/errors.scss
index 6aef06f9..874490d0 100644
--- a/app/assets/stylesheets/errors.scss
+++ b/app/assets/stylesheets/errors.scss
@@ -16,34 +16,55 @@ body {
}
.inner {
- width: 500px;
+ max-width: 500px;
margin: 70px auto;
+ text-align: center;
}
p {
font-size: 18px;
color: lighten(#4e443c, 10%);
margin-bottom: 30px;
+ img {
+ max-width: 100%;
+ height: auto;
+ }
}
nav ul {
- list-style: none;
- font-size: 16px;
- font-weight: bold;
- margin-left: 0;
- margin-bottom: 1.4em;
- li {
- display: inline;
- float: left;
- a {
- display: block;
- color: $orange;
- &:hover {
- color: darken($orange, 5%);
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: center;
+ list-style: none;
+ font-size: 16px;
+ font-weight: bold;
+ margin-left: 0;
+ margin-bottom: 1.4em;
+ li {
+ a {
+ display: block;
+ color: $orange;
+ &:hover {
+ color: darken($orange, 5%);
+ }
}
}
- }
- li + li {
- margin-left: 15px;
- }
+ li + li {
+ margin-left: 15px;
+ }
}
+
+// Mobile
+@media (max-width: $mobile-m) {
+ nav ul {
+ li {
+ margin-left: 0;
+ a {
+ padding: 1em;
+ }
+ }
+ li + li {
+ margin-left: 0;
+ }
+ }
+} \ No newline at end of file
diff --git a/app/assets/stylesheets/sidebar.scss b/app/assets/stylesheets/sidebar.scss
index 4bbf1a88..ce221aba 100644
--- a/app/assets/stylesheets/sidebar.scss
+++ b/app/assets/stylesheets/sidebar.scss
@@ -58,12 +58,14 @@ aside.sidebar.active {
}
aside{
&.sidebar {
- position: absolute;
+ position: fixed;
+ top: 1em;
transform: translateX(-105.5%);
transition: transform 0.3s, background-color 0.3s;
padding: 20px;
- height: 100%;
- z-index: 10;
+ height: 90vh;
+ overflow-y: scroll;
+ z-index: 1001 !important;
}
}
}
diff --git a/public/404.html b/public/404.html
index bff28a75..6c25bec7 100644
--- a/public/404.html
+++ b/public/404.html
@@ -4,7 +4,8 @@
<title>Git</title>
<meta charset='utf-8'>
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
- <link href="/assets/errors.css?body=1" media="screen" rel="stylesheet" type="text/css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link href="/assets/errors.css" rel="stylesheet"/>
<!--[if (gte IE 6)&(lte IE 8)]>
<script src="/assets/selectivizr-min.js?body=1" type="text/javascript"></script>
<![endif]-->
diff --git a/public/422.html b/public/422.html
index 83660ab1..03cfbc96 100644
--- a/public/422.html
+++ b/public/422.html
@@ -2,10 +2,11 @@
<html>
<head>
<title>The change you wanted was rejected (422)</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
div.dialog {
- width: 25em;
+ max-width: 25em;
padding: 0 4em;
margin: 4em auto 0 auto;
border: 1px solid #ccc;
diff --git a/public/500.html b/public/500.html
index d2e09c6f..cf36ebd5 100644
--- a/public/500.html
+++ b/public/500.html
@@ -4,7 +4,8 @@
<title>Git</title>
<meta charset='utf-8'>
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
- <link href="/assets/errors.css?body=1" media="screen" rel="stylesheet" type="text/css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link href="/assets/errors.css" rel="stylesheet"/>
<!--[if (gte IE 6)&(lte IE 8)]>
<script src="/assets/selectivizr-min.js?body=1" type="text/javascript"></script>
<![endif]-->