From 7bb4b653503411f5ca09ea46582e193dfa033923 Mon Sep 17 00:00:00 2001 From: Pavel Bezdornov Date: Tue, 22 Oct 2024 10:42:07 +0600 Subject: [PATCH 1/4] =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20?= =?UTF-8?q?=D0=B1=D0=BB=D0=BE=D0=BA=20=D0=B7=D0=B0=D0=BA=D1=80=D1=8B=D0=B2?= =?UTF-8?q?=D0=B0=D1=8E=D1=89=D0=B8=D0=B9=20=D1=8D=D0=BA=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=20"=D0=98=D1=81=D1=82=D0=BE=D1=80=D0=B8=D0=B8"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/index.html | 2 ++ source/scss/blocks/screen.scss | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/source/index.html b/source/index.html index 99ffe59..0b11552 100644 --- a/source/index.html +++ b/source/index.html @@ -181,6 +181,8 @@

История

+ +
diff --git a/source/scss/blocks/screen.scss b/source/scss/blocks/screen.scss index 24564b3..4d75a79 100644 --- a/source/scss/blocks/screen.scss +++ b/source/scss/blocks/screen.scss @@ -30,6 +30,17 @@ z-index: 1; } +.screen__blocker { + width: 100%; + height: 100%; + position: absolute; + background-color: $c-dark; + right: 0; + left: 0; + bottom: 0; + z-index: 1; +} + .screen__disclaimer { position: absolute; bottom: 0; From cebf309a8d9e76a5b8befd9c429a6d7e8d2170a5 Mon Sep 17 00:00:00 2001 From: Pavel Bezdornov Date: Tue, 22 Oct 2024 11:24:29 +0600 Subject: [PATCH 2/4] =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D1=85=D0=BE=D0=B4=20=D0=B4=D0=BB=D1=8F?= =?UTF-8?q?=20=D0=B1=D0=BB=D0=BE=D0=BA=D0=B5=D1=80=D0=B0=20=D1=8D=D0=BA?= =?UTF-8?q?=D1=80=D0=B0=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/scss/blocks/screen.scss | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/scss/blocks/screen.scss b/source/scss/blocks/screen.scss index 4d75a79..914dd79 100644 --- a/source/scss/blocks/screen.scss +++ b/source/scss/blocks/screen.scss @@ -32,13 +32,18 @@ .screen__blocker { width: 100%; - height: 100%; + height: 0; position: absolute; background-color: $c-dark; right: 0; left: 0; bottom: 0; z-index: 1; + transition: height 0.4s cubic-bezier(0.17,1,0.8,0.98); + + &.show { + height: 100%; + } } .screen__disclaimer { From e6dc07aecec6c2c8c0f33047fa6fb94376dd3b44 Mon Sep 17 00:00:00 2001 From: Pavel Bezdornov Date: Thu, 24 Oct 2024 10:13:32 +0600 Subject: [PATCH 3/4] =?UTF-8?q?=D0=A3=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20=D1=82=D1=80=D0=B8=D0=B3=D0=B3=D0=B5=D1=80=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D1=81=D0=BA=D1=80=D0=B8=D0=BD=20=D0=B1?= =?UTF-8?q?=D0=BB=D0=BE=D0=BA=D0=B5=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/index.html | 2 +- source/js/modules/animations.js | 2 ++ source/js/modules/full-page-scroll.js | 19 ++++++++++++++++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/source/index.html b/source/index.html index 0b11552..8ac29b9 100644 --- a/source/index.html +++ b/source/index.html @@ -182,7 +182,7 @@

История

-
+
diff --git a/source/js/modules/animations.js b/source/js/modules/animations.js index 9fb38ec..c3cb009 100644 --- a/source/js/modules/animations.js +++ b/source/js/modules/animations.js @@ -3,3 +3,5 @@ export default () => { document.body.classList.add(`document-ready`); }); }; + +export const SCREEN_BLOCKER_TIMEOUT = 400; diff --git a/source/js/modules/full-page-scroll.js b/source/js/modules/full-page-scroll.js index 45a2fcb..7094ddd 100644 --- a/source/js/modules/full-page-scroll.js +++ b/source/js/modules/full-page-scroll.js @@ -1,10 +1,12 @@ import throttle from 'lodash/throttle'; +import {SCREEN_BLOCKER_TIMEOUT} from "./animations"; export default class FullPageScroll { constructor() { this.THROTTLE_TIMEOUT = 1000; this.scrollFlag = true; this.timeout = null; + this.scrollBlockerTimeout = 0; this.screenElements = document.querySelectorAll(`.screen:not(.screen--result)`); this.menuElements = document.querySelectorAll(`.page-header__menu .js-menu-link`); @@ -46,7 +48,12 @@ export default class FullPageScroll { } changePageDisplay() { - this.changeVisibilityDisplay(); + const activeScreen = this.screenElements[this.activeScreen]; + this.scrollBlockerTimeout = activeScreen.classList.contains(`screen--prizes`) ? SCREEN_BLOCKER_TIMEOUT : 0; + this.showScreenBlocker(); + setTimeout(() => { + this.changeVisibilityDisplay(); + }, this.scrollBlockerTimeout); this.changeActiveMenuItem(); this.emitChangeDisplayEvent(); } @@ -62,6 +69,16 @@ export default class FullPageScroll { }, 100); } + showScreenBlocker() { + const activeScreen = this.screenElements[this.activeScreen]; + const screenBlocker = document.querySelector(`#history-screen-blocker`); + if (activeScreen.classList.contains(`screen--prizes`)) { + screenBlocker.classList.add(`show`); + } else { + screenBlocker.classList.remove(`show`); + } + } + changeActiveMenuItem() { const activeItem = Array.from(this.menuElements).find((item) => item.dataset.href === this.screenElements[this.activeScreen].id); if (activeItem) { From a7edfe6fafcd479606d2755b7be5cd0d10c9c71f Mon Sep 17 00:00:00 2001 From: Pavel Bezdornov Date: Thu, 24 Oct 2024 10:36:00 +0600 Subject: [PATCH 4/4] =?UTF-8?q?=D0=9F=D0=BE=D0=BC=D0=B5=D0=BD=D1=8F=D0=BB?= =?UTF-8?q?=20=D1=82=D1=80=D0=B8=D0=B3=D0=B3=D0=B5=D1=80=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D0=B0=D0=BD=D0=B8=D0=BC=D0=B0=D1=86=D0=B8=D0=B8=20?= =?UTF-8?q?=D0=BF=D0=BE=D1=8F=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=84?= =?UTF-8?q?=D1=83=D1=82=D0=B5=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/scss/blocks/screen.scss | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/scss/blocks/screen.scss b/source/scss/blocks/screen.scss index 914dd79..b72674d 100644 --- a/source/scss/blocks/screen.scss +++ b/source/scss/blocks/screen.scss @@ -17,6 +17,12 @@ @media (max-width: $tablet - 1) and (orientation: landscape) { height: 100vh; } + + &.active { + .screen__footer { + bottom: 0; + } + } } .screen__wrapper { @@ -371,9 +377,3 @@ .screen--rules { background-color: $c-dark; } - -.document-ready { - .screen__footer { - bottom: 0; - } -}