Skip to content

Commit e551e1b

Browse files
authored
Merge pull request graphql#1007 from saswatamcode/fix-search-bar
Fix search bar issues
2 parents 01397b3 + 7bf0579 commit e551e1b

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

src/Containers/Sections/Hero/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Link } from 'gatsby';
22
import React from 'react';
33
import HeaderLinks from '../../../components/HeaderLinks';
4+
import Search from '../../../components/Search';
45
import Prism from '../../../components/Prism';
56

67

@@ -11,6 +12,7 @@ const Hero = () => {
1112
<header aria-hidden>
1213
<section>
1314
<HeaderLinks />
15+
<Search searchID="hero-search-input" />
1416
</section>
1517
</header>
1618
<section className="intro">

src/assets/css/_css/algolia.less

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,21 @@
2323
margin-top: 10px;
2424
outline: none;
2525
padding: 0 10px 0 35px;
26-
width: 180px;
26+
width: 160px;
2727
transition: width 0.2s ease-out;
2828

29-
&:focus {
30-
width: 250px;
29+
@media screen and (min-width: 1076px) {
30+
&:focus {
31+
width: 190px;
32+
}
33+
}
34+
@media screen and (min-width: 1065px) and (max-width: 1075px) {
35+
&:focus {
36+
width: 180px;
37+
}
38+
}
39+
@media screen and (min-width: 1021px) and (max-width: 1064px) {
40+
width: 135px;
3141
}
3242
}
3343

src/assets/css/_css/index.less

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ div.index {
1818
}
1919
}
2020

21-
.fixedSearch {
22-
position: fixed;
23-
right: 0;
24-
left: 0;
25-
z-index: 12;
26-
pointer-events: none;
27-
}
28-
2921
.hero {
3022
background: @dark-color;
3123
@media screen and (min-width: 1020px) {

src/pages/index.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import React from "react"
22
import Layout from "../components/Layout"
33

4-
import Search from "../components/Search"
5-
64
import Hero from "../Containers/Sections/Hero"
75
import SingleRequest from "../Containers/Sections/SingleRequest"
86
import TypeSystem from "../Containers/Sections/TypeSystem"
@@ -15,9 +13,6 @@ import WhosUsing from "../Containers/Sections/WhosUsing"
1513
export default ({ pageContext }) => {
1614
return (
1715
<Layout className={"index"} title="GraphQL | A query language for your API" pageContext={pageContext}>
18-
<section className="fixedSearch">
19-
<Search searchID="hero-search-input" />
20-
</section>
2116
<Hero />
2217
<section className="lead">
2318
<h1>A query language for your API</h1>

0 commit comments

Comments
 (0)