Skip to content

Commit aada28f

Browse files
authored
Merge pull request #77 from railsdoc/mobile-friendy-0
Fix main padding and hide search form for mobile
2 parents 63a678e + 6d1c115 commit aada28f

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/_layouts/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<body>
2424
<header class="navbar navbar-dark navbar-expand bg-dark flex-md-nowrap p-0 shadow sticky-header">
2525
<a class="navbar-brand col-sm-3 col-md-2 mr-0" href="/">{{ site.title }}</a>
26-
<form class="w-100" action="/search" method="get">
26+
<form class="w-100 d-none d-md-flex" action="/search" method="get">
2727
<input class="form-control form-control-dark" type="text" placeholder="Search" aria-label="Search" name="q">
2828
</form>
2929

src/_sass/railsdoc.scss

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,13 @@ code {
124124
}
125125
}
126126

127-
// Content
128127
[role="main"] {
129-
padding-top: 133px; /* Space for fixed navbar */
128+
padding-top: 10px; /* Space for fixed navbar */
129+
overflow-wrap: break-word;
130130
order: 1;
131-
}
132131

133-
@media (min-width: 768px) {
134-
[role="main"] {
135-
padding-top: 48px; /* Space for fixed navbar */
132+
@media (min-width: 768px) {
133+
padding-top: 133px;
136134
}
137135
}
138136

0 commit comments

Comments
 (0)