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

Open
wants to merge 2 commits 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
29 changes: 29 additions & 0 deletions .github/workflows/test.yml-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test

on:
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
- name: Upload HTML report(backstop data)
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: report
path: backstop_data
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
"keywords": [],
"author": "Mate Academy",
"license": "GPL-3.0",
"dependencies": {},
"devDependencies": {
"@linthtml/linthtml": "^0.9.6",
"@mate-academy/backstop-config": "latest",
"@mate-academy/bemlint": "latest",
"@mate-academy/linthtml-config": "latest",
"@mate-academy/scripts": "^1.8.6",
"@mate-academy/scripts": "^1.9.12",
"@mate-academy/stylelint-config": "latest",
"backstopjs": "6.3.23",
"jest": "^29.7.0",
Expand Down
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://sansamiste.github.io/layout_search-bar-airbnb/)
- [TEST REPORT LINK](https://sansamiste.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: 24 additions & 10 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,37 @@
http-equiv="X-UA-Compatible"
content="ie=edge"
/>

<title>Document</title>

<link
rel="stylesheet"
href="style.css"
/>
</head>
<body>
<input
type="text"
data-qa="keypress"
placeholder="Try “Los Angeles“"
/>
<form

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The <form> tag is incorrectly self-closing. In HTML, form elements should not be self-closing. Ensure to open and close the <form> tag properly.

class="search search__big"
data-qa="big"
>
Comment on lines +22 to +25

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The <form> tag should not be self-closing. It needs an opening <form> tag and a closing </form> tag to properly encapsulate the form elements.

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

<input
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
<form
class="search search__small"
data-qa="small"
>
Comment on lines +34 to +37

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the previous form, this <form> tag should not be self-closing. Ensure it has a proper opening and closing tag.

<input
class="search__input search__input-small"
type="text"
data-qa="hover"
placeholder="Try “Los Angeles“"
/>
</form>
</body>
</html>
75 changes: 75 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -1 +1,76 @@
/* add styles here */
* {
box-sizing: border-box;
}

:root {
--box-shadow: rgba(61, 78, 97, 0.1);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --box-shadow variable is defined with only a color value. The box-shadow property typically requires at least the horizontal and vertical offsets, and optionally the blur radius, spread radius, and color. Consider defining --box-shadow with a complete value, such as 0 1px 8px 0 rgba(61, 78, 97, 0.1).

--hover-shadow: rgba(61, 78, 97, 0.2);
--border: #e1e7ed;
--placeholder: #3d4e61;
}

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

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

.search {
margin-top: 20px;
}

.search:hover {
box-shadow: 0 4px 4px 0 var(--hover-shadow);
}

.search__big {
height: 70px;
}

.search__small {
height: 42px;
}

.search__input {
width: 100%;
height: 100%;
font-family: Avenir, sans-serif;
font-weight: 300;
border: 1px solid var(--border);
border-radius: 4px;
background-image: url(images/Search.svg);
background-repeat: no-repeat;
box-shadow: 0 1px 8px 0 var(--box-shadow);
}

.search__input-big {
background-size: 19px 19px;
background-position: 26px center;
padding-left: 62px;
font-size: 16px;
}

.search__input-small {
background-size: 11px 11px;
background-position: 13px center;
padding-left: 33px;
font-size: 14px;
}

.search__input::placeholder {
color: var(--placeholder);
}

.search__input:focus {
font-family: Avenir, sans-serif;
font-weight: 700;
outline: none;
box-shadow: 0 4px 4px 0 var(--hover-shadow);
}