Commit 7da489e3 authored by Sander Høyland's avatar Sander Høyland
Browse files

PY-2019.3.3 <guffb@DESKTOP-F1O6115 Merge branch 'master'

parents c086f13d aebe02f3
.poststyle{
border-radius: 20px;
margin-top: 20px;
max-width: 60%;
margin-left: auto;
margin-right: auto;
background-color: white;
max-height: fit-content;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
.body-light {
background-color: lightblue
}
.body-dark {
background-color: #343a40;
}
.nav-link-dark {
color: hotpink !important;
}
\ No newline at end of file
......@@ -7,8 +7,6 @@
].join('');
var div = document.createElement('div');
div.innerHTML = html;
document.getElementById('footer').appendChild(div);
......
changeTheme()
function changeTheme(){
let theme = localStorage.getItem('theme')
theme = theme ? theme : 'light';
let elements = document.body.querySelectorAll("*")
console.log(theme)
elements.forEach(elem => {
let classes = elem.className
classes = classes.replace(/dark/g, theme)
classes = classes.replace(/light/g, theme)
elem.className = classes
document.body.className = 'body-'+theme;
})
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment