From 8c7b160a563aba95851549301fde25054c76303d Mon Sep 17 00:00:00 2001 From: sansamiste <127095130+sansamiste@users.noreply.github.com> Date: Wed, 29 Jan 2025 21:58:37 +0200 Subject: [PATCH 1/2] add task solution --- .github/workflows/test.yml-template | 29 +++++++++++ package-lock.json | 9 ++-- package.json | 3 +- readme.md | 4 +- src/index.html | 34 +++++++++---- src/style.css | 75 +++++++++++++++++++++++++++++ 6 files changed, 136 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/test.yml-template diff --git a/.github/workflows/test.yml-template b/.github/workflows/test.yml-template new file mode 100644 index 0000000000..8b5743ecb4 --- /dev/null +++ b/.github/workflows/test.yml-template @@ -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 diff --git a/package-lock.json b/package-lock.json index dd9fc11d8c..97e964c879 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@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", @@ -1211,10 +1211,11 @@ "dev": true }, "node_modules/@mate-academy/scripts": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/@mate-academy/scripts/-/scripts-1.8.6.tgz", - "integrity": "sha512-b4om/whj4G9emyi84ORE3FRZzCRwRIesr8tJHXa8EvJdOaAPDpzcJ8A0sFfMsWH9NUOVmOwkBtOXDu5eZZ00Ig==", + "version": "1.9.12", + "resolved": "https://registry.npmjs.org/@mate-academy/scripts/-/scripts-1.9.12.tgz", + "integrity": "sha512-/OcmxMa34lYLFlGx7Ig926W1U1qjrnXbjFJ2TzUcDaLmED+A5se652NcWwGOidXRuMAOYLPU2jNYBEkKyXrFJA==", "dev": true, + "license": "MIT", "dependencies": { "@octokit/rest": "^17.11.2", "@types/get-port": "^4.2.0", diff --git a/package.json b/package.json index e3be26f95e..3e67df15d4 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/readme.md b/readme.md index b635aa290b..308e1e23c6 100644 --- a/readme.md +++ b/readme.md @@ -25,8 +25,8 @@ ___ ❗️ Replace `` with your Github username and copy the links to `Pull Request` description: -- [DEMO LINK](https://.github.io/layout_search-bar-airbnb/) -- [TEST REPORT LINK](https://.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. diff --git a/src/index.html b/src/index.html index abe507e10c..e6f46c82bb 100644 --- a/src/index.html +++ b/src/index.html @@ -10,23 +10,37 @@ http-equiv="X-UA-Compatible" content="ie=edge" /> + Document + - + - + diff --git a/src/style.css b/src/style.css index a63fa10d43..f05191eae9 100644 --- a/src/style.css +++ b/src/style.css @@ -1 +1,76 @@ /* add styles here */ +* { + box-sizing: border-box; +} + +:root { + --box-shadow: 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: var(--hover-shadow); +} From b021cef6d68423dc8185facca70029cf17785754 Mon Sep 17 00:00:00 2001 From: sansamiste <127095130+sansamiste@users.noreply.github.com> Date: Wed, 29 Jan 2025 22:16:35 +0200 Subject: [PATCH 2/2] fix task --- src/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/style.css b/src/style.css index f05191eae9..7c96296b4b 100644 --- a/src/style.css +++ b/src/style.css @@ -72,5 +72,5 @@ font-family: Avenir, sans-serif; font-weight: 700; outline: none; - box-shadow: var(--hover-shadow); + box-shadow: 0 4px 4px 0 var(--hover-shadow); }