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

Add task solution #4319

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ ___

❗️ Replace `<your_account>` with your Github username and copy the links to `Pull Request` description:

- [DEMO LINK](https://<your_account>.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://<your_account>.github.io/layout_search-bar-airbnb/report/html_report/)
- [DEMO LINK](https://DmitriyNovo7.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://DmitriyNovo7.github.io/layout_search-bar-airbnb/report/html_report/)

❗️ Copy this `Checklist` to the `Pull Request` description after links, and put `- [x]` before each point after you checked it.

Expand Down
36 changes: 25 additions & 11 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- #region head -->
<!doctype html>
<html lang="en">
<head>
Expand All @@ -13,20 +14,33 @@
<title>Document</title>
<link
rel="stylesheet"
href="style.css"
href="styles/style.css"
/>
</head>
<!-- #endregion -->
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
<form
class="search-bar search-bar_big"
data-qa="big"
>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
class="search-bar__input search-bar__input_big"
/>
</form>

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
<form
class="search-bar search-bar_small"
data-qa="small"
>
<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
class="search-bar__input search-bar__input_small"
/>
</form>
</body>
</html>
3 changes: 3 additions & 0 deletions src/styles/blocks/body.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
font-weight: 300;
}
20 changes: 20 additions & 0 deletions src/styles/blocks/html.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
html {
padding: 0;
box-sizing: border-box;
font-family: Avenir, sans-serif;
font-size: 16px;
}

@font-face {
font-family: Avenir;
src: url(../../fonts/Avenir-Book.ttf);
font-weight: 300;
font-style: normal;
}

@font-face {
font-family: Avenir;
src: url('../../fonts/Avenir-Heavy.ttf');
font-weight: 600;
font-style: normal;
}
87 changes: 87 additions & 0 deletions src/styles/blocks/search-bar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
.search-bar {
display: flex;
margin: 20px auto 0;
position: relative;
width: 100%;
justify-content: center;
}

.search-bar_big {
height: 70px;
width: 100%;
}

.search-bar_small {
height: 42px;
width: 100%;
}

.search-bar::after {
content: '';
position: absolute;
display: block;
}

.search-bar_big::after {
background-image: url('../../images/Search.svg');
background-repeat: no-repeat;
background-size: contain;
width: 19px;
height: 19px;
top: 25px;
left: 26px;
}

.search-bar_small::after {
background-image: url('../../images/Search.svg');
background-repeat: no-repeat;
background-size: contain;
width: 11px;
height: 11px;
top: 15px;
left: 13px;
}

.search-bar__input {
width: 100%;
height: 100%;
border: 1px solid #e1e7ed;
color: #3d4e6133;
font-weight: 300;
font-size: inherit;
outline: none;
box-shadow: 0 1px 8px 0 #3d4e611a;
}

.search-bar__input:hover {
box-shadow: 0 4px 4px 0 #00000040;
}

.search-bar__input_big {
padding-left: 62px;
}

.search-bar__input_small {
padding-left: 33px;
}

.search-bar__input::placeholder {
color: inherit;
}

.search-bar__input_big::placeholder {
font-size: 16px;
line-height: 22px;
}

.search-bar__input_small::placeholder {
font-size: 14px;
line-height: 22px;
}

.search-bar__input:focus {
background: linear-gradient(180deg, #fff 0%, #f6f6f7 100%);
font-weight: 600;
color: rgba(61, 78, 97, 1);
border-radius: 3px;
}
3 changes: 3 additions & 0 deletions src/styles/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import 'blocks/html.css';
@import 'blocks/body.css';
@import 'blocks/search-bar.css';
Loading