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 stopwatch #3572

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
14 changes: 0 additions & 14 deletions backstop_data/engine_scripts/cookies.json

This file was deleted.

39 changes: 0 additions & 39 deletions backstop_data/engine_scripts/puppet/clickAndHoverHelper.js

This file was deleted.

32 changes: 0 additions & 32 deletions backstop_data/engine_scripts/puppet/loadCookies.js

This file was deleted.

3 changes: 0 additions & 3 deletions backstop_data/engine_scripts/puppet/onBefore.js

This file was deleted.

24 changes: 0 additions & 24 deletions backstop_data/engine_scripts/puppet/onReady.js

This file was deleted.

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.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ This is possible because [we use the Parcel library](https://en.parceljs.org/scs
## Checklist

❗️ Replace `<your_account>` with your GitHub username and copy the links to the `Pull Request` description:
- [DEMO LINK](https://<your_account>.github.io/layout_stop-watch/)
- [DEMO LINK](https://<BTakhaiev>.github.io/layout_stop-watch/)

❗️ Copy this `Checklist` to the `Pull Request` description after links, and put `- [x]` before each point after you checked it.

- [ ] Keyframes implemented using from/to + transform with rotate property
- [ ] Stopwatch is centered and has the correct arrows size
- [ ] All `Typical Mistakes` from the `BEM` lesson theory are checked.
- [ ] Code follows all the [Code Style Rules ❗️](https://mate-academy.github.io/layout_task-guideline/html-css-code-style-rules)
- [x] Keyframes implemented using from/to + transform with rotate property
- [x] Stopwatch is centered and has the correct arrows size
- [x] All `Typical Mistakes` from the `BEM` lesson theory are checked.
- [x] Code follows all the [Code Style Rules ❗️](https://mate-academy.github.io/layout_task-guideline/html-css-code-style-rules)
6 changes: 5 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
/>
</head>
<body>
<h1>Stop watch</h1>
<div class="stopwatch">
<div class="stopwatch__minutes stopwatch__minutes--speed-up"></div>
<div class="stopwatch__second stopwatch__second--speed-up"></div>
<div class="stopwatch__circle"></div>
</div>
</body>
</html>
62 changes: 62 additions & 0 deletions src/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,65 @@
body {
margin: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}

.stopwatch {
height: 80vmin;
width: 80vmin;
border-radius: 50%;
border: 1vmin dotted #000;

display: flex;
justify-content: center;
align-items: center;

&__circle {
border-radius: 50%;
height: 5vmin;
width: 5vmin;
background-color: #f6a603;
position: relative;
}

&__minutes {
height: 20vmin;
width: 3vmin;
background-color: #0700ff;
position: absolute;
bottom: 50%;

animation: minut 3600s steps(60, end) infinite;
transform-origin: bottom center;

&--speed-up {
animation-duration: 600s;
}
}

&__second {
height: 38vmin;
width: 1.5vmin;
background-color: #2c8000;
position: absolute;
bottom: 50%;

animation: minut 60s linear infinite;
transform-origin: bottom center;

&--speed-up {
animation-duration: 10s;
}
}
}

@keyframes minut {

Choose a reason for hiding this comment

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

Suggested change
@keyframes minut {
@keyframes rotate {

from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
Loading