thèmes appliqués au modal

master
adplantade 5 years ago
parent f4998ba996
commit 93f242f410

@ -64,13 +64,13 @@
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
/*background-color: rgb(0,0,0); /* Fallback color */
/*background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}
/* Modal Content */
.modal-content {
background-color: #fefefe;
/*background-color: #fefefe;*/
margin: auto;
padding: 20px;
border: 1px solid #888;

@ -59,7 +59,7 @@
<div id="optionsModal" class="modal">
<!-- Modal content -->
<div class="modal-content">
<div class="modal-content" id="modal">
<span class="close">&times;</span>
<p>Options :</p>
<div class="slidecontainer">

@ -3,20 +3,23 @@ var light= (getCookie("light")=="" ? true : getCookie("light"));
document.getElementById("light").width=size/4;
function switchLight() {
console.log("light avant "+light);
light=(light=="true" ? "false" : "true");
console.log("light après "+light);
setCookie("light",light,30);
applyLight(light);
}
function applyLight(li) {
console.log("app li "+li);
document.getElementById("light").src="ress/"+(li=="true" ? "light" : "dark")+".png";
if(document.getElementById("logo")!=null)
{
document.getElementById("logo").src="ress/logo_"+(li=="true" ? "clair" : "dark")+".png";
}
if(document.getElementById("modal")!=null)
{
document.getElementById("modal").classList.add((li=="true" ? "day" : "night"));
document.getElementById("modal").classList.remove((li=="true" ? "night" : "day"));
}
document.getElementsByTagName("body")[0].classList.add((li=="true" ? "day" : "night"));
document.getElementsByTagName("body")[0].classList.remove((li=="true" ? "night" : "day"));

Loading…
Cancel
Save