Skip to content

Commit

Permalink
Merge pull request #77 from railsdoc/mobile-friendy-0
Browse files Browse the repository at this point in the history
Fix main padding and hide search form for mobile
  • Loading branch information
toshimaru authored May 8, 2021
2 parents 63a678e + 6d1c115 commit aada28f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<body>
<header class="navbar navbar-dark navbar-expand bg-dark flex-md-nowrap p-0 shadow sticky-header">
<a class="navbar-brand col-sm-3 col-md-2 mr-0" href="/">{{ site.title }}</a>
<form class="w-100" action="/search" method="get">
<form class="w-100 d-none d-md-flex" action="/search" method="get">
<input class="form-control form-control-dark" type="text" placeholder="Search" aria-label="Search" name="q">
</form>

Expand Down
10 changes: 4 additions & 6 deletions src/_sass/railsdoc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,13 @@ code {
}
}

// Content
[role="main"] {
padding-top: 133px; /* Space for fixed navbar */
padding-top: 10px; /* Space for fixed navbar */
overflow-wrap: break-word;
order: 1;
}

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

Expand Down

0 comments on commit aada28f

Please sign in to comment.