thèmes appliqués au modal

master
adplantade 5 years ago
parent f4998ba996
commit 93f242f410

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

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

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

Loading…
Cancel
Save