Skip to content

Commit

Permalink
task done
Browse files Browse the repository at this point in the history
  • Loading branch information
Yevhenia-S committed Dec 20, 2024
1 parent 7d23622 commit b0fa631
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 3 deletions.
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://Yevhenia-S.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__circle"></div>
<div class="stopwatch__minute-hand"></div>
<div class="stopwatch__second-hand"></div>
</div>
</body>
</html>
72 changes: 71 additions & 1 deletion src/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,73 @@
body {
$stopwatch-size: 80vmin;
$circle-size: 5vmin;
$minute-hand-length: 20vmin;
$minute-hand-width: 3vmin;
$second-hand-length: 38vmin;
$second-hand-width: 1.5vmin;

html {
margin: 0;
padding: 0;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}

.stopwatch {
position: relative;
width: $stopwatch-size;
height: $stopwatch-size;
border-radius: 50%;
border: 1vmin dotted #000;
display: flex;
justify-content: center;
align-items: center;

&__circle {
position: absolute;
z-index: 1;
width: $circle-size;
height: $circle-size;
background-color: #f6a603;
border-radius: 50%;
}

&__minute-hand {
position: absolute;
width: $minute-hand-width;
height: $minute-hand-length;
background-color: #0700ff;
bottom: 50%;
transform-origin: center bottom;
animation: rotate 3600s steps(60) infinite;
}

&__second-hand {
position: absolute;
width: $second-hand-width;
height: $second-hand-length;
background-color: #2c8000;
bottom: 50%;
transform-origin: center bottom;
animation: rotate 60s linear infinite;
}

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

.stopwatch--speed-up {
.stopwatch__seconds-hand {
animation-duration: 10s;
}
.stopwatch__min-hand {
animation-duration: 600s;
}
}

0 comments on commit b0fa631

Please sign in to comment.