BUGFIX: styles
This commit is contained in:
parent
942c591403
commit
9c7be573e0
@ -16,7 +16,10 @@ function initOverflow() {
|
||||
}
|
||||
|
||||
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');
|
||||
if (body.classList.contains('nineties')) {
|
||||
body.classList.remove('nineties');
|
||||
@ -26,6 +29,15 @@ function initNinetiesToggle() {
|
||||
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() {
|
||||
|
@ -14,12 +14,11 @@ body {
|
||||
color: $orange;
|
||||
font-family: $font;
|
||||
height: 100%;
|
||||
margin: 0 10px;
|
||||
|
||||
&.nineties {
|
||||
color: $black;
|
||||
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{
|
||||
color: $black;
|
||||
|
Loading…
Reference in New Issue
Block a user