From d2ff2676ae54d0b30a0b03916ec55e144b7b61cb Mon Sep 17 00:00:00 2001 From: marcosvinalves Date: Wed, 20 Nov 2024 19:37:27 -0300 Subject: [PATCH 1/2] add task solution --- src/index.html | 10 ++++- src/styles/blocks/stopwatch.scss | 64 ++++++++++++++++++++++++++++++++ src/styles/index.scss | 7 ++++ 3 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 src/styles/blocks/stopwatch.scss diff --git a/src/index.html b/src/index.html index 272a19648..a03cc429b 100644 --- a/src/index.html +++ b/src/index.html @@ -1,3 +1,4 @@ + @@ -16,7 +17,14 @@ href="./styles/index.scss" /> + -

Stop watch

+
+
+
+
+
+
+
diff --git a/src/styles/blocks/stopwatch.scss b/src/styles/blocks/stopwatch.scss new file mode 100644 index 000000000..ced340340 --- /dev/null +++ b/src/styles/blocks/stopwatch.scss @@ -0,0 +1,64 @@ +.stopwatch { + height: 80vmin; + width: 80vmin; + border: 1vmin dotted #000; + border-radius: 50%; + + display: flex; + align-items: center; + justify-content: center; + position: relative; + + &__minutes { + position: absolute; + bottom: 50%; + height: 20vmin; + width: 3vmin; + + transform: rotate(0deg); + transform-origin: bottom center; + animation: rotate 3600s steps(60) infinite; + background-color: #0700ff; + } + + &__seconds { + position: absolute; + bottom: 50%; + height: 38vmin; + width: 1.5vmin; + + transform: rotate(0deg); + transform-origin: bottom center; + animation: rotate 60s linear infinite; + background-color: #2c8000; + } + + &__center { + z-index: 1; + height: 5vmin; + width: 5vmin; + border-radius: 50%; + + background-color: #f6a603; + } + + &--speed-up { + .stopwatch__minutes { + animation-duration: 600s; + } + + .stopwatch__seconds { + animation-duration: 10s; + } + } +} + +@keyframes rotate { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} diff --git a/src/styles/index.scss b/src/styles/index.scss index 293d3b1f1..d20abeee0 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,3 +1,10 @@ +@import './blocks/stopwatch'; + body { margin: 0; + display: flex; + justify-content: center; + align-items: center; + + height: 100vh; } From 07452389b14410bf44acfe80be393abe45e66fc2 Mon Sep 17 00:00:00 2001 From: marcosvinalves Date: Wed, 20 Nov 2024 19:41:33 -0300 Subject: [PATCH 2/2] add task solution --- .github/workflows/test.yml-template | 29 +++++++++++++++++++++++++++++ package-lock.json | 9 +++++---- package.json | 2 +- 3 files changed, 35 insertions(+), 5 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 000000000..8b5743ecb --- /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 211b7ce4a..6d8d464c6 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", "@parcel/transformer-sass": "^2.12.0", "backstopjs": "6.3.23", @@ -1230,10 +1230,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 5b13ea006..cc8982744 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,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", "@parcel/transformer-sass": "^2.12.0", "backstopjs": "6.3.23",