feat: implement scroll lock on NSFW warning modal
This commit is contained in:
parent
0c635b5630
commit
d0b191706b
2 changed files with 17 additions and 5 deletions
13
src/App.vue
13
src/App.vue
|
@ -58,6 +58,7 @@ export default {
|
||||||
showWarning() {
|
showWarning() {
|
||||||
if (!this.isConfirmedHorny) {
|
if (!this.isConfirmedHorny) {
|
||||||
this.isWarn = true;
|
this.isWarn = true;
|
||||||
|
document.body.classList.toggle("scroll-lock");
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.nsfw = false;
|
this.nsfw = false;
|
||||||
|
@ -73,18 +74,18 @@ export default {
|
||||||
@import "~normalize.css";
|
@import "~normalize.css";
|
||||||
|
|
||||||
#app {
|
#app {
|
||||||
padding: 5em 0 0 0;
|
padding: 5em 0 7em 0;
|
||||||
color: $copy-color;
|
color: $copy-color;
|
||||||
font-size: 1.125em;
|
font-size: 1.125em;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
transition: all ease-in-out 0.25s;
|
transition: all ease-in-out 0.25s;
|
||||||
|
|
||||||
@media (min-width: 50em) {
|
@include mq-desktop {
|
||||||
font-size: 1.25em;
|
font-size: 1.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 125em) {
|
@include mq-bigscreen {
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,7 +126,10 @@ header {
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
margin: 2em 0 0 0;
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
padding: 0.75em 0;
|
padding: 0.75em 0;
|
||||||
background-color: $bg-color-light;
|
background-color: $bg-color-light;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -153,6 +157,7 @@ header {
|
||||||
}
|
}
|
||||||
|
|
||||||
&__linkitem {
|
&__linkitem {
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__link {
|
&__link {
|
||||||
|
|
|
@ -14,6 +14,14 @@
|
||||||
text-size-adjust: 100%;
|
text-size-adjust: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: lighten($bg-color-dark, 25%);
|
||||||
|
|
||||||
|
&.scroll-lock {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
h1,
|
h1,
|
||||||
h2,
|
h2,
|
||||||
h3,
|
h3,
|
||||||
|
@ -48,7 +56,6 @@ a {
|
||||||
}
|
}
|
||||||
|
|
||||||
.bubbles {
|
.bubbles {
|
||||||
background-color: lighten($bg-color-dark, 25%);
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue