Skip to content
Open

add #4185

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": "^2.1.3",
"@mate-academy/stylelint-config": "latest",
"@parcel/transformer-sass": "^2.12.0",
"backstopjs": "6.3.23",
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://miabellaa.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
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 stopwatch--speed-up">
<div class="stopwatch__hand stopwatch__hand--seconds"></div>
<div class="stopwatch__hand stopwatch__hand--minutes"></div>
<div class="stopwatch__center"></div>
</div>
</body>
</html>
62 changes: 62 additions & 0 deletions src/styles/_stopwatch.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
.stopwatch {
height: 80vmin;
width: 80vmin;
border: 1vmin dotted #000;
border-radius: 50%;
position: relative;

&__hand {
position: absolute;
bottom: 50%;
transform-origin: bottom center;
will-change: transform;
transform: rotate(0deg);

&--seconds {
height: 38vmin;
width: 1.5vmin;
left: calc(50% - 0.75vmin);
background-color: #2c8000;
animation: tick-tock 60s linear infinite;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You define the &--speed-up modifier but never apply it in HTML. This violates the requirement: "Add the modifier to the stopwatch for tests" and the description that mentors will remove it via DevTools to check basic functionality. Add stopwatch--speed-up to this element’s class list.


&--minutes {
height: 20vmin;
width: 3vmin;
left: calc(50% - 1.5vmin);
background-color: #0700ff;
animation: tick-tock 3600s steps(60) infinite;
}
}

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

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

&__center {
height: 5vmin;
width: 5vmin;
background-color: #f6a603;
border-radius: 50%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 10;
}
}

@keyframes tick-tock {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
11 changes: 11 additions & 0 deletions src/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
@import 'stopwatch';

html,
body {
height: 100%;
margin: 0;
}

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