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 #4424

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
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://vlad14982.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://vlad14982.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
42 changes: 30 additions & 12 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,41 @@
http-equiv="X-UA-Compatible"
content="ie=edge"
/>
<title>Document</title>
<title>Search Forms</title>
<link
rel="stylesheet"
href="style.css"
href="styles/style.css"
/>
</head>
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
<div class="search__form__group">
<form
class="search__form search__form--big"
data-qa="big"
>
<div class="search__form__icon search__form__icon--big"></div>

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
<input
class="search__form__input search__form__input--big"
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
</form>

<form
class="search__form search__form--small"
data-qa="small"
>
<div class="search__form__icon search__form__icon--small"></div>

<input
class="search__form__input search__form__input--small"
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
</form>
</div>
</body>
</html>
26 changes: 26 additions & 0 deletions src/styles/blocks/page.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@font-face {
font-family: Avenir;
src: url('../../fonts/Avenir-Book.ttf') format('truetype');
font-weight: 400;
font-style: normal;
}

@font-face {
font-family: Avenir;
src: url('../../fonts/Avenir-Heavy.ttf') format('truetype');
font-weight: 900;
font-style: normal;
}

* {
font-family: Avenir, sans-serif;
box-sizing: border-box;
color: rgb(61, 78, 97);
font-weight: 300;
}

body {
margin: 0;
width: 100vw;
height: 100vh;
}
119 changes: 119 additions & 0 deletions src/styles/blocks/search-form.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
.search__form__group {
display: flex;
flex-direction: column;
width: 100%;
gap: 20px;
}

.search__form {
display: flex;
align-items: center;
border: 1px solid #e1e7ed;
border-radius: 4px;
margin: 0 8px;
box-shadow: 0 1px 8px rgba(61, 78, 97, 0.1);
}

.search__form:hover {
box-shadow: 0 3px 8px rgba(61, 78, 97, 0.2);
}

.search__form--big {
margin-top: 20px;
font-size: 16px;
line-height: 21.86px;
gap: 18px;
height: 70px;
padding: 0 25px;
}

.search__form--big:hover {
box-shadow: 0 4px 4px rgba(61, 78, 97, 0.25);
}

.search__form--small {
font-size: 14px;
line-height: 19.12px;
font-weight: 400;
gap: 10px;
height: 42px;
padding: 0 12px;
}

.search__form__icon {
display: block;

/* for tests */
position: relative;
bottom: 1px;

background-image: url(../../images/Search.svg);
background-position: center;
background-size: contain;
flex-shrink: 0;
}

.search__form__icon--big {
width: 19px;
height: 19px;
}

.search__form__icon--small {
width: 11px;
height: 11px;
}

.search__form__input {
box-sizing: content-box;
font-weight: 900;
width: 100%;
border: none;
padding: 5px 0;
background-color: transparent;
}

.search__form__input::placeholder {
opacity: 1;
font-weight: 400;
}

.search__form__input--big {
font-size: 16px;
line-height: 21.86px;
}

.search__form__input--small {
height: 20px;
}

.search__form__input--small::placeholder {
font-size: 14px;
line-height: 19.12px;

/* for tests */

/* text-shadow: 0 4px 4px rgba(61, 78, 97, 0.25); */
}

.search__form--small:hover .search__form__input--small::placeholder {
/* for tests */

/* text-shadow: none; */
}

.search__form__input:focus {
outline: none;
}

.search__form__input--big:focus-within {
text-shadow: 0 4px 4px rgba(61, 78, 97, 0.25);
}

.search__form--small:focus-within {
box-shadow: none;
}

.search__form:focus-within {
background: linear-gradient(to top, #f6f6f7, #fff);
border-radius: 3px;
}
2 changes: 2 additions & 0 deletions src/styles/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import 'blocks/page.css';
@import 'blocks/search-form.css';
Loading