From d0b191706b6cf0b5c9da74eb349e8d4e3ad5dca2 Mon Sep 17 00:00:00 2001 From: Sebin Nyshkim Date: Tue, 11 Jan 2022 21:55:33 +0100 Subject: [PATCH] feat: implement scroll lock on NSFW warning modal --- src/App.vue | 13 +++++++++---- src/scss/base.scss | 9 ++++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/App.vue b/src/App.vue index ec1e055..b6e339d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -58,6 +58,7 @@ export default { showWarning() { if (!this.isConfirmedHorny) { this.isWarn = true; + document.body.classList.toggle("scroll-lock"); setTimeout(() => { this.nsfw = false; @@ -73,18 +74,18 @@ export default { @import "~normalize.css"; #app { - padding: 5em 0 0 0; + padding: 5em 0 7em 0; color: $copy-color; font-size: 1.125em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; transition: all ease-in-out 0.25s; - @media (min-width: 50em) { + @include mq-desktop { font-size: 1.25em; } - @media (min-width: 125em) { + @include mq-bigscreen { font-size: 1.5em; } } @@ -125,7 +126,10 @@ header { } .footer { - margin: 2em 0 0 0; + position: fixed; + bottom: 0; + left: 0; + right: 0; padding: 0.75em 0; background-color: $bg-color-light; text-align: center; @@ -153,6 +157,7 @@ header { } &__linkitem { + font-weight: bold; } &__link { diff --git a/src/scss/base.scss b/src/scss/base.scss index a85f6b2..e5543c0 100644 --- a/src/scss/base.scss +++ b/src/scss/base.scss @@ -14,6 +14,14 @@ text-size-adjust: 100%; } +body { + background-color: lighten($bg-color-dark, 25%); + + &.scroll-lock { + overflow: hidden; + } +} + h1, h2, h3, @@ -48,7 +56,6 @@ a { } .bubbles { - background-color: lighten($bg-color-dark, 25%); position: fixed; top: 0; right: 0;