Skip to content

Commit

Permalink
add task solution
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyNovo7 committed Jun 3, 2024
1 parent afacaf6 commit 61fd571
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 13 deletions.
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
34 changes: 23 additions & 11 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,32 @@
<title>Document</title>
<link
rel="stylesheet"
href="style.css"
href="styles/style.css"
/>
</head>
<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;
}
92 changes: 92 additions & 0 deletions src/styles/blocks/search-bar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
.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;
border-radius: 4px;
font-weight: 300;
color: #3d4e61;
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 {
font-size: 16px;
padding-left: 62px;
line-height: 22px;
}

.search-bar__input_small {
font-size: 14px;
padding-left: 33px;
line-height: 19px;
}

.search-bar__input::placeholder {
color: inherit;
font-weight: 300;
}

.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;
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';

0 comments on commit 61fd571

Please sign in to comment.