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

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
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: 9 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- #region head -->
<!doctype html>
<html lang="en">
<head>
Expand All @@ -16,7 +17,14 @@
href="./styles/index.scss"

Choose a reason for hiding this comment

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

The href attribute is pointing to a .scss file. Typically, browsers cannot directly interpret Sass files. Ensure that this file is compiled to CSS and the correct path to the CSS file is provided here.

/>
</head>
<!-- #endregion -->
<body>
<h1>Stop watch</h1>
<main>
<section class="stopwatch stopwatch--speed-up">
<div class="stopwatch__minutes"></div>
<div class="stopwatch__seconds"></div>
<div class="stopwatch__center"></div>
</section>
</main>
</body>
</html>
64 changes: 64 additions & 0 deletions src/styles/blocks/stopwatch.scss
Original file line number Diff line number Diff line change
@@ -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);
}
}
7 changes: 7 additions & 0 deletions src/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
@import './blocks/stopwatch';

body {
margin: 0;
display: flex;
justify-content: center;
align-items: center;

height: 100vh;
}
Loading