Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] add a fixed container so the searchbar are always on reach #1121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion directory/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ body {

.App {
width: 100%;
padding-top: 120px;
}

.Navbar-Container {
position: fixed;
top: 0;
width: 100%;
z-index: 5;
}

.Header-Container {
Expand Down Expand Up @@ -81,7 +89,7 @@ body {

.Result-Title {
position: sticky;
top: 0;
top: 119px;
z-index: 1;
margin: 0;
padding: 1em 20px;
Expand Down
6 changes: 4 additions & 2 deletions directory/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,10 @@ class App extends PureComponent {
render() {
return (
<div className="App">
<HeaderBar />
<SearchBar onSubmit={this.handleSubmit} />
<div className="Navbar-Container">
<HeaderBar />
<SearchBar onSubmit={this.handleSubmit} />
</div>
<div className="Container">
{this.state.matches.map(this.renderMatch)}
{this.state.matches.length === 0 && this.renderNotFound()}
Expand Down