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

implement tasks #3622

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
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://Karabesk.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
21 changes: 17 additions & 4 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<!doctype html>
<html lang="en">
<html

Choose a reason for hiding this comment

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

The <html> tag should not be self-closing. It should be written as <html> without the trailing slash.

lang="en"
class="html"
>
<!-- #region head -->
<head>
<meta charset="UTF-8" />
<meta
Expand All @@ -13,10 +17,19 @@
<title>Stop watch</title>
<link
rel="stylesheet"
href="./styles/index.scss"
href="./styles/main.scss"
/>
</head>
<body>
<h1>Stop watch</h1>
<!-- #endregion -->
<body class="body">
<div class="stopwatch stopwatch--speed-up">

Choose a reason for hiding this comment

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

Ensure that the basic functionality of the stopwatch works without the BEM modifier speed-up, as per the task requirements. If this is already handled in your styles or scripts, then no changes are needed here.

<div class="stopwatch__minutes-wrap">
<div class="stopwatch__minutes-hand"></div>
</div>
<div class="stopwatch__center-dot"></div>
<div class="stopwatch__seconds-wrap">
<div class="stopwatch__seconds-hand"></div>
</div>
</div>
</body>
</html>
7 changes: 7 additions & 0 deletions src/styles/body.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.body {
display: flex;
width: 100vw;
height: 100vh;
justify-content: center;
align-items: center;
}
3 changes: 0 additions & 3 deletions src/styles/index.scss

This file was deleted.

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 '/src/utils/keyframes';
@import '/src/styles/watch';
@import '/src/styles/body';
56 changes: 56 additions & 0 deletions src/styles/watch.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
.stopwatch {
width: 80vmin;
height: 80vmin;
border: 1vmin dotted #000;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;

&__minutes-wrap {
transform: translate(140%, -50%);
}

&__minutes-hand {
height: 20vmin;
width: 3vmin;
background-color: #0700ff;

transform-origin: 50% 100%;

animation: round 3600s steps(60) infinite;
}

&__seconds-wrap {
transform: translate(-211%, -50%);
}

&__seconds-hand {
width: 1.5vmin;
height: 38vmin;
background-color: #2c8000;

transform-origin: 50% 100%;

animation: round 60s infinite linear;
}

&__center-dot {
width: 5vmin;
height: 5vmin;
border-radius: 50%;
background-color: #f6a603;

z-index: 1;
}
}

.stopwatch--speed-up .stopwatch__seconds-hand {
animation: round 10s infinite linear;
transform-origin: 50% 100%;
}

.stopwatch--speed-up .stopwatch__minutes-hand {
animation: round 600s infinite linear;
transform-origin: 50% 100%;
}
8 changes: 8 additions & 0 deletions src/utils/keyframes.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@keyframes round {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
Loading