-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2862 from uktrade/feat/search-bar
Add search bar to the new home page
- Loading branch information
Showing
25 changed files
with
1,036 additions
and
601 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
.search-container { | ||
background-color: #1d70b8; | ||
padding: 20px 0; | ||
} | ||
|
||
.search-field { | ||
position: relative; | ||
&--secondary { | ||
display: grid; | ||
grid-template-columns: 1fr auto; | ||
} | ||
} | ||
|
||
.search-field__header { | ||
color: #ffffff; | ||
} | ||
|
||
.search-field__footer__link { | ||
color: #ffffff; | ||
} | ||
|
||
.search-field__label { | ||
font-size: 16px; | ||
line-height: 2.5; | ||
} | ||
|
||
@media (min-width: 40.0625em) { | ||
.search-field__label { | ||
font-size: 19px; | ||
line-height: 2.1052631579; | ||
} | ||
} | ||
|
||
.js-enabled .search-field__label { | ||
position: absolute; | ||
left: 15px; | ||
top: 1px; | ||
z-index: 1; | ||
color: #6f777b; | ||
} | ||
|
||
.search-field-wrapper { | ||
display: table; | ||
width: 100%; | ||
background: #ffffff; | ||
} | ||
|
||
.search-field__item { | ||
position: relative; | ||
display: table-cell; | ||
vertical-align: top; | ||
&--secondary { | ||
border: none; | ||
} | ||
} | ||
|
||
.search-field__input[type="search"]:focus, | ||
.search-field__input[type="search"].focus { | ||
z-index: 2; | ||
} | ||
|
||
.search-field__input[type="search"] { | ||
border-right-width: 0; | ||
} | ||
|
||
.search-field__input[type="search"]:focus { | ||
border-right-width: 2px; | ||
} | ||
|
||
.search-field-submit-wrapper { | ||
width: 1%; | ||
} | ||
|
||
.search-field__submit { | ||
border: 0; | ||
cursor: pointer; | ||
border-radius: 0; | ||
position: relative; | ||
padding: 0; | ||
width: 40px; | ||
height: 40px; | ||
background-image: url("/__django_static/assets/images/search-button.png"); | ||
background-repeat: no-repeat; | ||
background-position: 2px 50%; | ||
text-indent: -5000px; | ||
overflow: hidden; | ||
background-color: #1d70b8; | ||
color: #ffffff; | ||
&:hover { | ||
background-color: #207dce; | ||
} | ||
&--secondary { | ||
background-color: #1e1e1e; | ||
&:hover { | ||
background-color: #313030; | ||
} | ||
} | ||
} | ||
|
||
@media only screen and (-webkit-min-device-pixel-ratio: 2), | ||
only screen and (min-device-pixel-ratio: 2), | ||
only screen and (min-resolution: 192dpi), | ||
only screen and (min-resolution: 2dppx) { | ||
.search-field__submit { | ||
background-size: 52.5px auto; | ||
background-position: 115% 50%; | ||
} | ||
} | ||
|
||
.search-field__submit:focus { | ||
z-index: 2; | ||
outline: 3px solid $govuk-focus-colour; | ||
outline-offset: 0; | ||
box-shadow: inset 0 0 0 4px #0b0c0c; | ||
} | ||
|
||
.search-field__submit::-moz-focus-inner { | ||
border: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
91 changes: 91 additions & 0 deletions
91
dataworkspace/dataworkspace/static/js/bundles/data-cut.7045d2b3ec8c90b61142.js
Large diffs are not rendered by default.
Oops, something went wrong.
91 changes: 0 additions & 91 deletions
91
dataworkspace/dataworkspace/static/js/bundles/data-cut.715a32c67e22edeb3639.js
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
dataworkspace/dataworkspace/static/js/bundles/home-page.cd5e94fe0aa6a2519e83.js
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
dataworkspace/dataworkspace/static/js/bundles/home-page.d29648b8601a6ec9f507.js
This file was deleted.
Oops, something went wrong.
91 changes: 91 additions & 0 deletions
91
dataworkspace/dataworkspace/static/js/bundles/reference-dataset.6ef9c65e0b8fb280cfb4.js
Large diffs are not rendered by default.
Oops, something went wrong.
91 changes: 0 additions & 91 deletions
91
dataworkspace/dataworkspace/static/js/bundles/reference-dataset.b87461915b13416010f5.js
This file was deleted.
Oops, something went wrong.
91 changes: 91 additions & 0 deletions
91
dataworkspace/dataworkspace/static/js/bundles/source-dataset.5125d85d094c65901bff.js
Large diffs are not rendered by default.
Oops, something went wrong.
91 changes: 0 additions & 91 deletions
91
dataworkspace/dataworkspace/static/js/bundles/source-dataset.fb8c0a963fb7eeb873be.js
This file was deleted.
Oops, something went wrong.
91 changes: 91 additions & 0 deletions
91
dataworkspace/dataworkspace/static/js/bundles/visualisations.075f927baa6dcfd40c82.js
Large diffs are not rendered by default.
Oops, something went wrong.
91 changes: 0 additions & 91 deletions
91
dataworkspace/dataworkspace/static/js/bundles/visualisations.a4c7ce88a09c8e80f638.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 14 additions & 22 deletions
36
dataworkspace/dataworkspace/static/js/react/components/Tile/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,29 @@ | ||
import React, { ReactNode } from 'react'; | ||
|
||
import { | ||
SPACING_POINTS | ||
} from '@govuk-react/constants'; | ||
import { SPACING_POINTS } from '@govuk-react/constants'; | ||
import { H3 } from 'govuk-react'; | ||
import styled from 'styled-components'; | ||
|
||
import { | ||
MID_GREY, | ||
WHITE | ||
} from '../../constants'; | ||
import { MID_GREY, WHITE } from '../../constants'; | ||
|
||
const TileStyling = styled('div')` | ||
padding:${SPACING_POINTS['6']}px; | ||
border: 1px solid ${MID_GREY}; | ||
background-color: ${WHITE}; | ||
padding: ${SPACING_POINTS['4']}px; | ||
border: 1px solid ${MID_GREY}; | ||
background-color: ${WHITE}; | ||
`; | ||
|
||
interface TileProps { | ||
title: string; | ||
children: ReactNode; | ||
title: string; | ||
children: ReactNode; | ||
} | ||
|
||
const Tile: React.FC<TileProps> = ({ | ||
title, | ||
children | ||
}) => { | ||
return ( | ||
<TileStyling> | ||
<H3 size={27}>{title}</H3> | ||
{children} | ||
</TileStyling> | ||
); | ||
const Tile: React.FC<TileProps> = ({ title, children }) => { | ||
return ( | ||
<TileStyling> | ||
<H3 size={27}>{title}</H3> | ||
{children} | ||
</TileStyling> | ||
); | ||
}; | ||
|
||
export default Tile; |
Oops, something went wrong.