first commit
This commit is contained in:
1229
ESP8266_MOTORS_SOLAIRE/ESP8266_MOTORS_SOLAIRE.ino
Normal file
1229
ESP8266_MOTORS_SOLAIRE/ESP8266_MOTORS_SOLAIRE.ino
Normal file
File diff suppressed because it is too large
Load Diff
33
ESP8266_MOTORS_SOLAIRE/js.h
Normal file
33
ESP8266_MOTORS_SOLAIRE/js.h
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
|
||||
String js= R"(
|
||||
<SCRIPT>
|
||||
|
||||
var xmlHttp01=createXmlHttpObject();
|
||||
function process(){
|
||||
if(xmlHttp01.readyState==0 || xmlHttp01.readyState==4){
|
||||
xmlHttp01.open('GET','getData',true);
|
||||
xmlHttp01.onreadystatechange=handleServerResponse;
|
||||
xmlHttp01.send(null);
|
||||
}
|
||||
setTimeout('process()', 5000);
|
||||
}
|
||||
|
||||
function handleButtonClick(button) {
|
||||
// Affiche une boîte de dialogue pour saisir un chiffre
|
||||
var value = prompt("Veuillez saisir un chiffre:");
|
||||
|
||||
// Si l'utilisateur clique sur "OK" et saisit une valeur
|
||||
if (value !== null) {
|
||||
// Vérifie si la saisie est un chiffre
|
||||
if (!isNaN(value) && value.trim() !== "") {
|
||||
// Appelle une URL avec la valeur saisie en paramètre
|
||||
var url = "/gotoPosition?button=" + button + "&value=" + encodeURIComponent(value);
|
||||
window.location.href = url;
|
||||
} else {
|
||||
alert("Veuillez saisir un chiffre valide.");
|
||||
}
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
)";
|
||||
139
ESP8266_MOTORS_SOLAIRE/style.h
Normal file
139
ESP8266_MOTORS_SOLAIRE/style.h
Normal file
@@ -0,0 +1,139 @@
|
||||
|
||||
|
||||
String css = R"(
|
||||
body {
|
||||
font-family: 'Arial', sans-serif;
|
||||
text-align: center;
|
||||
background-color: #3498db;
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: inline-grid;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #349;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
form {
|
||||
margin: auto;
|
||||
max-width: 80%;
|
||||
}
|
||||
|
||||
input {
|
||||
padding: 1em;
|
||||
margin: 1em 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.button {
|
||||
display: inline-block;
|
||||
background-color: #2980b9;
|
||||
color: #fff;
|
||||
/*! padding: 15px; */
|
||||
margin: 5px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
background-color: #2471a3;
|
||||
}
|
||||
|
||||
.buttons.data {
|
||||
display: flex;
|
||||
li {
|
||||
width: 150px;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
display: block;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.notification {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
background-color: #2ecc71;
|
||||
color: #fff;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.button.low { background-color: red; }
|
||||
.button.high { background-color: green;}
|
||||
|
||||
.control-container {
|
||||
background: #C0C0C0;
|
||||
width: 128px;
|
||||
height: 64px;
|
||||
margin: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
||||
transition: background-color 0.3s ease-in-out; /* Ajout de la transition */
|
||||
}
|
||||
|
||||
h2,button {
|
||||
margin: 0;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 1.2rem;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/* Ajout des styles au survol ou au clic */
|
||||
.control-container:hover,
|
||||
.control-container:active {
|
||||
background-color: #a0a0a0;
|
||||
}
|
||||
|
||||
.arcade-button {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
background-color: #3498db;
|
||||
border: 10px solid #2c3e50;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
.arcade-button:hover {
|
||||
background-color: #2980b9;
|
||||
}
|
||||
|
||||
.button-content {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
color: #ecf0f1;
|
||||
font-size: 1.5rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
)";
|
||||
Reference in New Issue
Block a user