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

Open
wants to merge 1 commit 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
22,713 changes: 16,137 additions & 6,576 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
"@mate-academy/backstop-config": "latest",
"@mate-academy/bemlint": "latest",
"@mate-academy/linthtml-config": "latest",
"@mate-academy/scripts": "^1.8.6",
"@mate-academy/scripts": "^1.2.8",
"@mate-academy/stylelint-config": "latest",
"@parcel/transformer-sass": "^2.12.0",
"backstopjs": "6.3.23",
"jest": "^29.7.0",
"parcel": "^2.12.0",
"parcel": "^1.12.3",
"prettier": "^3.3.2",
"stylelint": "^16.7.0",
"stylelint-scss": "^6.4.1"
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ 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://vkysh.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.

Expand Down
9 changes: 7 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@
<title>Stop watch</title>
<link
rel="stylesheet"
href="./styles/index.scss"
href="./styles/main.scss"
/>
</head>
<body>
<h1>Stop watch</h1>
<div class="stopwatch stopwatch--speed-up">
<div class="stopwatch__face"></div>
<div class="stopwatch__hand stopwatch__hand--seconds"></div>
<div class="stopwatch__hand stopwatch__hand--minutes"></div>
<div class="stopwatch__center"></div>
</div>
</body>
</html>
92 changes: 92 additions & 0 deletions src/styles/blocks/stopwatch.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
$stopwatch-size: 80vmin;
$minute-height: 20vmin;
$minute-width: 3vmin;
$second-height: 38vmin;
$second-width: 1.5vmin;
$center-size: 5vmin;

.stopwatch {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;

&__face {
width: $stopwatch-size;
height: $stopwatch-size;
border: 1vmin dotted $border-color;

Choose a reason for hiding this comment

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

The variable $border-color is used here but is not defined in this file. Make sure to define it or import it from another file where it is defined.

border-radius: 50%;

position: relative;
}

&__center {
width: $center-size;
height: $center-size;
background-color: $center-color;

Choose a reason for hiding this comment

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

The variable $center-color is used here but is not defined in this file. Ensure it is defined or imported from another file.

border-radius: 50%;

position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
z-index: 2;
}

&__hand {
position: absolute;
bottom: 50%;
left: 50%;
transform-origin: bottom center;

&--minutes {
width: $minute-width;
height: $minute-height;
background-color: $minute-color;

Choose a reason for hiding this comment

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

The variable $minute-color is used here but is not defined in this file. Define it or import it from another file to avoid errors.


transform: translateX(-50%);
z-index: 0;

animation: rotate-minutes 3600s steps(60) infinite;
}

&--seconds {
width: $second-width;
height: $second-height;
background-color: $second-color;

Choose a reason for hiding this comment

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

The variable $second-color is used here but is not defined in this file. Make sure it is defined or imported from another file.


transform: translateX(-50%);
z-index: 1;

animation: rotate-seconds 60s linear infinite;
}
}

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

.stopwatch__hand--minutes {
animation-duration: 600s;
}
}
}

@keyframes rotate-seconds {
from {
transform: translateX(-50%) rotate(0deg);
}
to {
transform: translateX(-50%) rotate(360deg);
}
}

@keyframes rotate-minutes {
from {
transform: translateX(-50%) rotate(0deg);
}
to {
transform: translateX(-50%) rotate(360deg);
}
}
3 changes: 3 additions & 0 deletions src/styles/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import './utils/variables';
@import './blocks/stopwatch';
@import './index';
4 changes: 4 additions & 0 deletions src/styles/utils/variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$minute-color: #0700ff;
$second-color: #2c8000;
$center-color: #f6a603;
$border-color: #000;