From 4fb83b0168b50614f10f3a3d8074e24d03899545 Mon Sep 17 00:00:00 2001 From: ihnatd Date: Wed, 18 Dec 2024 12:48:31 +0100 Subject: [PATCH 1/2] add task solution --- .github/workflows/test.yml-template | 29 +++++++++++ .hintrc | 9 ++++ src/index.html | 18 ++++++- src/style.css | 80 +++++++++++++++++++++++++++++ 4 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml-template create mode 100644 .hintrc 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/.hintrc b/.hintrc new file mode 100644 index 0000000000..3dd4ef76ec --- /dev/null +++ b/.hintrc @@ -0,0 +1,9 @@ +{ + "extends": [ + "development" + ], + "hints": { + "meta-viewport": "off", + "highest-available-document-mode": "off" + } +} \ No newline at end of file diff --git a/src/index.html b/src/index.html index b39fe97123..a51a1d0c3e 100644 --- a/src/index.html +++ b/src/index.html @@ -17,6 +17,22 @@ /> -

Moyo header

+
+ + +
diff --git a/src/style.css b/src/style.css index 293d3b1f13..6d373767c8 100644 --- a/src/style.css +++ b/src/style.css @@ -1,3 +1,83 @@ +/* stylelint-disable font-family-name-quotes */ +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + body { + font-family: 'Roboto', sans-serif; +} + +/* header */ +header { + background-color: #fff; + display: flex; + align-items: center; + padding: 0 20px; + border-bottom: 1px solid #e0e0e0; +} + +.logo { + margin-right: 50px; +} + +.logo img { + max-height: 40px; +} + +/* style */ +nav ul { + display: flex; + list-style: none; margin: 0; + padding: 0; +} + +nav ul li:not(:first-child) { + margin-left: 20px; +} + +nav a { + text-decoration: none; + color: #333; + display: inline-block; + line-height: 60px; + text-align: center; + text-transform: uppercase; + font-weight: 700; + position: relative; +} + +nav a.is-active { + position: relative; + color: #007bff; +} + +nav a.is-active::after { + content: ''; + position: absolute; + left: 0; + bottom: -2px; + width: 100%; + height: 2px; + background-color: #007bff; +} + +nav a.hover { + position: relative; + color: #007bff; +} + +nav { + flex-grow: 1; +} + +/* stylelint-disable-next-line no-duplicate-selectors */ +nav ul li:first-child { + margin-left: 0; +} + +nav ul li:last-child { + margin-right: 0; } From 2ce4bf70be1d01f965d9019081b484ab9a42e20a Mon Sep 17 00:00:00 2001 From: ihnatd Date: Wed, 18 Dec 2024 12:53:41 +0100 Subject: [PATCH 2/2] add task solution --- src/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.html b/src/index.html index a51a1d0c3e..b2e940dd45 100644 --- a/src/index.html +++ b/src/index.html @@ -23,10 +23,10 @@