diff --git a/readme.md b/readme.md index b55608052..4cadea0bc 100644 --- a/readme.md +++ b/readme.md @@ -32,7 +32,7 @@ This is possible because [we use the Parcel library](https://en.parceljs.org/scs ## Checklist ❗️ Replace `` with your GitHub username and copy the links to the `Pull Request` description: -- [DEMO LINK](https://.github.io/layout_stop-watch/) +- [DEMO LINK](https://eugenia-andropova.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. diff --git a/src/index.html b/src/index.html index 272a19648..925048861 100644 --- a/src/index.html +++ b/src/index.html @@ -17,6 +17,10 @@ /> -

Stop watch

+
+
+
+
+
diff --git a/src/styles/index.scss b/src/styles/index.scss index 293d3b1f1..e7e5c8c4b 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,3 +1,68 @@ -body { +body, +html { margin: 0; + padding: 0; + height: 100%; + display: flex; + align-items: center; + justify-content: center; +} + +@keyframes rotate { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +.stopwatch { + width: 80vmin; + height: 80vmin; + border: 1vmin dotted #000; + border-radius: 50%; + position: relative; + + &__minutes-hand { + height: 20vmin; + width: 3vmin; + background-color: #0700ff; + position: absolute; + top: 20vmin; + left: calc(50% - 1.5vmin); + transform-origin: 50% 100%; + animation: rotate 600s steps(60) infinite; + } + + &__second-hand { + height: 38vmin; + width: 1.5vmin; + background-color: #2c8000; + position: absolute; + top: 2vmin; + left: calc(50% - (1.5vmin / 2)); + transform-origin: 50% 100%; + animation: rotate 10s linear infinite; + } + + &__center { + height: 5vmin; + width: 5vmin; + background-color: #f6a603; + border-radius: 50%; + position: absolute; + top: calc(50% - 2.5vmin); + left: calc(50% - 2.5vmin); + } + + &--speed-up { + &__minutes-hand { + animation-duration: 600s / 6; + } + + &__second-hand { + animation-duration: 10s / 6; + } + } }