BUGFIX: styles
This commit is contained in:
parent
942c591403
commit
9c7be573e0
@ -16,7 +16,10 @@ function initOverflow() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function initNinetiesToggle() {
|
function initNinetiesToggle() {
|
||||||
document.querySelector('.nineties-toggle').addEventListener('click', function() {
|
|
||||||
|
let nineties = document.querySelector('.nineties-toggle');
|
||||||
|
let container = document.querySelector('.container');
|
||||||
|
nineties.addEventListener('click', function() {
|
||||||
let body = document.querySelector('body');
|
let body = document.querySelector('body');
|
||||||
if (body.classList.contains('nineties')) {
|
if (body.classList.contains('nineties')) {
|
||||||
body.classList.remove('nineties');
|
body.classList.remove('nineties');
|
||||||
@ -26,6 +29,15 @@ function initNinetiesToggle() {
|
|||||||
Cookies.set('nineties', true, { sameSite: 'strict' });
|
Cookies.set('nineties', true, { sameSite: 'strict' });
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
if(
|
||||||
|
nineties.getBoundingClientRect().left < container.getBoundingClientRect().right &&
|
||||||
|
nineties.getBoundingClientRect().bottom > container.getBoundingClientRect().top
|
||||||
|
) {
|
||||||
|
nineties.style.position = 'initial';
|
||||||
|
nineties.style.textAlign = 'right';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function initExternalLinks() {
|
function initExternalLinks() {
|
||||||
|
@ -14,12 +14,11 @@ body {
|
|||||||
color: $orange;
|
color: $orange;
|
||||||
font-family: $font;
|
font-family: $font;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0 10px;
|
|
||||||
|
|
||||||
&.nineties {
|
&.nineties {
|
||||||
color: $black;
|
color: $black;
|
||||||
background-image: url("../images/background-1990.gif");
|
background-image: url("../images/background-1990.gif");
|
||||||
font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', sans-serif;
|
font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', cursive;
|
||||||
|
|
||||||
a{
|
a{
|
||||||
color: $black;
|
color: $black;
|
||||||
|
Loading…
Reference in New Issue
Block a user