edit: panneau contact + bug fix
This commit is contained in:
1 parent
2d06277613
commit
7430ea161f
7 files changed
+74
-49
No files matched your search
+3
-3
@@ -5,9 +5,9 @@ import { themeSwitcher } from './theme.js';
|
||||
|
||||
const mainWindow = document.querySelector('main > #seeYouLater');
|
||||
|
||||
//const playerWindow = document.querySelector('main > #musicPlayer');
|
||||
const contactWindow = document.querySelector('main > #contactSection');
|
||||
|
||||
makeItFloat(mainWindow);
|
||||
//makeItFloat(playerWindow);
|
||||
makeItFloat(contactWindow);
|
||||
|
||||
themeSwitcher();
|
||||
themeSwitcher();
|
||||
+6
-3
@@ -1,17 +1,20 @@
|
||||
const container = document.querySelector('#colorBtnContainer');
|
||||
const themeToggler = container.querySelector('.switch input');
|
||||
const background = document.querySelector('aside > #gradient');
|
||||
const btn = document.querySelector('#webRing > a:first-child > img');
|
||||
|
||||
export function themeSwitcher(){
|
||||
container.style.visibility = 'visible'
|
||||
console.log('selected switch', themeToggler);
|
||||
container.style.visibility = 'visible';
|
||||
console.log('selected btn:', btn);
|
||||
themeToggler.addEventListener('change', (event) => {
|
||||
if (event.target.checked){
|
||||
document.documentElement.setAttribute('data-theme', 'light');
|
||||
background.style.filter = 'invert(1) saturate(333%) brightness(93%) hue-rotate(90deg)';
|
||||
btn.style.filter = 'invert(1) saturate(93%) brightness(233%) hue-rotate(90deg)';
|
||||
}else{
|
||||
document.documentElement.setAttribute('data-theme', 'dark');
|
||||
background.style.filter = 'unset';
|
||||
btn.style.filter = 'unset';
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user