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() {
|
||||
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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue