small fixes
This commit is contained in:
parent
13f6399fc0
commit
dbf2efc957
@ -116,14 +116,13 @@ header .names {
|
|||||||
|
|
||||||
header h1, header p {
|
header h1, header p {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-size: 35px;
|
|
||||||
color: var(--color-primary);
|
color: var(--color-primary);
|
||||||
font-family: pilowlava, monospace;
|
font-family: pilowlava, monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
header p {
|
header p {
|
||||||
font-family: space-mono, monospace;
|
font-family: space-mono, monospace;
|
||||||
font-size: 25px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header img {
|
header img {
|
||||||
@ -134,7 +133,7 @@ header img {
|
|||||||
|
|
||||||
/* Description */
|
/* Description */
|
||||||
header, .description, .linkGroup, .timer, footer {
|
header, .description, .linkGroup, .timer, footer {
|
||||||
background-color: rgba(15, 0, 10, 0.9);
|
background-color: rgba(15, 0, 10, 0.8);
|
||||||
/*border: 1px var(--color-primary) solid;*/
|
/*border: 1px var(--color-primary) solid;*/
|
||||||
border: 1px var(--color-accent-c) solid;
|
border: 1px var(--color-accent-c) solid;
|
||||||
}
|
}
|
||||||
|
@ -86,10 +86,29 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
const color = Math.random() > 0.5 ? '_red' : '';
|
const color = Math.random() > 0.5 ? '_red' : '';
|
||||||
createBlob(blobContainer, 'line', `blob-freeform-${x}${color}.svg`, zIndexCounter - 1, position);
|
createBlob(blobContainer, 'line', `blob-freeform-${x}${color}.svg`, zIndexCounter - 1, position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isMobileView()) {
|
||||||
|
toggleMouseEffects(false);
|
||||||
|
} else {
|
||||||
|
toggleMouseEffects(true);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
document.addEventListener('mousemove', (event) => {
|
|
||||||
|
function isMobileView() {
|
||||||
|
return window.innerWidth <= 480;
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleMouseEffects(enable) {
|
||||||
|
if (enable) {
|
||||||
|
document.addEventListener('mousemove', handleMouseMovement);
|
||||||
|
} else {
|
||||||
|
document.removeEventListener('mousemove', handleMouseMovement);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleMouseMovement(event) {
|
||||||
const elements = [...document.querySelectorAll('.solid, .line')];
|
const elements = [...document.querySelectorAll('.solid, .line')];
|
||||||
const { clientX: mouseX, clientY: mouseY } = event;
|
const { clientX: mouseX, clientY: mouseY } = event;
|
||||||
const { innerWidth: width, innerHeight: height } = window;
|
const { innerWidth: width, innerHeight: height } = window;
|
||||||
@ -102,4 +121,12 @@ document.addEventListener('mousemove', (event) => {
|
|||||||
const rotation = element.dataset.rotation || 0;
|
const rotation = element.dataset.rotation || 0;
|
||||||
element.style.transform = `translate(-50%, -50%) translate(${xOffset / strength}px, ${yOffset / strength}px) rotate(${rotation}deg)`;
|
element.style.transform = `translate(-50%, -50%) translate(${xOffset / strength}px, ${yOffset / strength}px) rotate(${rotation}deg)`;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener('resize', () => {
|
||||||
|
if (isMobileView()) {
|
||||||
|
toggleMouseEffects(false);
|
||||||
|
} else {
|
||||||
|
toggleMouseEffects(true);
|
||||||
|
}
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user