From 5da8f6b3a52504ee563076a0a179bdbf0a5d8dc2 Mon Sep 17 00:00:00 2001 From: Tima Savich Date: Tue, 12 Sep 2023 21:58:45 +0300 Subject: [PATCH] Add up menu --- src/index.html | 73 +++++++++++++++++++------------- src/scripts/main.js | 9 ++++ src/styles/block/cont-block.scss | 13 ++++++ src/styles/block/container.scss | 6 +++ src/styles/block/page.scss | 18 ++++++++ src/styles/block/slider.scss | 1 + 6 files changed, 90 insertions(+), 30 deletions(-) diff --git a/src/index.html b/src/index.html index 25116469ed..7dcfabbdae 100644 --- a/src/index.html +++ b/src/index.html @@ -22,8 +22,8 @@
- + Hire us
@@ -64,17 +63,13 @@

Strategic Agency

-

- We believe in the power of bold ideas that can solve business challenges. +

+ We believe in the power of bold ideas that can solve business challenges.

- @@ -83,40 +78,30 @@

- photoimg
- photoimg
- photoimg
- slidertup + slidertup
- slidertup + slidertup
@@ -132,7 +117,35 @@

- + + diff --git a/src/scripts/main.js b/src/scripts/main.js index 499860c219..1bf35b2722 100644 --- a/src/scripts/main.js +++ b/src/scripts/main.js @@ -52,4 +52,13 @@ document.addEventListener('DOMContentLoaded', () => { }); showCurrentImage(); + + setInterval(() => { + currentImageIndex += 1; + + if (currentImageIndex >= sliderImages.length) { + currentImageIndex = 0; + } + showCurrentImage(); + }, 6000); }); diff --git a/src/styles/block/cont-block.scss b/src/styles/block/cont-block.scss index 04e449020f..77a18701d5 100644 --- a/src/styles/block/cont-block.scss +++ b/src/styles/block/cont-block.scss @@ -5,4 +5,17 @@ display: block; } + + &--header { + height: 500px; + margin-top: -10px; + padding: 20px; + display: flex; + align-items: center; + background-color: $colorbackgraund; + + @include onSmalldesktop { + display: none; + } + } } diff --git a/src/styles/block/container.scss b/src/styles/block/container.scss index 36453d4738..0d2e3b9bff 100644 --- a/src/styles/block/container.scss +++ b/src/styles/block/container.scss @@ -19,6 +19,12 @@ list-style-type: none; padding: 0; margin: 0; + + &--colum { + display: flex; + flex-direction: column; + gap: 30px; + } } &__item { diff --git a/src/styles/block/page.scss b/src/styles/block/page.scss index a622876c08..cad3d4134a 100644 --- a/src/styles/block/page.scss +++ b/src/styles/block/page.scss @@ -14,4 +14,22 @@ overflow: hidden; } } + + &__menu { + @include inlainer; + position: fixed; + top: 0; + right: 0; + left: 0; + opacity: 0; + pointer-events: none; + transition: all (0.5s); + transform: translateX(-100%); + + &:target { + opacity: 1; + transform: translate(0%); + pointer-events: all; + } + } } diff --git a/src/styles/block/slider.scss b/src/styles/block/slider.scss index b8861201da..1e9a6cf0f5 100644 --- a/src/styles/block/slider.scss +++ b/src/styles/block/slider.scss @@ -4,6 +4,7 @@ width: 100%; bottom: 0; right: 0; + transition: opacity 0.7s ease-in-out; @include onSmalldesktop { width: 50%;