mirror of
https://github.com/Fluffy-Bean/Fluffys-website.git
synced 2025-05-25 21:03:14 +00:00
Add darkmode
Prettier titles
This commit is contained in:
parent
b6077f88ed
commit
0ddc2a20b2
15 changed files with 187 additions and 76 deletions
|
@ -1,12 +1,12 @@
|
|||
const nav = document.querySelector('nav');
|
||||
const button = document.querySelector('.nav-toggle');
|
||||
|
||||
let navRotate = 0;
|
||||
let increment = 45;
|
||||
|
||||
function toggleNav() {
|
||||
let nav = document.querySelector('nav');
|
||||
let button = document.querySelector('.nav-toggle');
|
||||
|
||||
navRotate += increment;
|
||||
button.style.transform = `rotate(${navRotate}deg)`;
|
||||
button.querySelector('svg').style.transform = `rotate(${navRotate}deg)`;
|
||||
|
||||
if (nav.classList.contains('open')) {
|
||||
document.querySelector('body').style.overflow = 'auto';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue