new website

This commit is contained in:
Flavien Haas 2018-06-12 15:58:42 +02:00
parent 96a56c19ac
commit c4f4043007
3 changed files with 83 additions and 10 deletions

64
WebServer/gg.html Normal file
View File

@ -0,0 +1,64 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>fadeIn demo</title>
<style>
p {
text-align:center;
}
div {
margin:auto;
font-size: 36px;
text-align: center;
color: yellow;
background: red;
display: none;
}
span {
display: none;
}
</style>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
<div>
<span><div style='text-align:left;display:inline-block;min-width:340px;'>
<div style='text-align:center;'>
<h1>Passerelle LoRa</h1>
</div>
<div>
<h2>[Température actuelle]</h2>
</div>
<div>
<p>
Nombre d'échantillons envoyés = %, Echec d'envoi : %
</p>
</div>
<div id='l1' name='l1'></div>
<!--<table style='width:100%'>
<tr>
<button onclick='la('?o=1');'>Informations</button>
</tr>
<tr>
<button onclick='alea()'>rafraichir</button>
</tr>
<tr>
<button onclick='la('?o=1');'>Redémarrer</button>
</tr>
</table>-->
</div></span>
</div>
<script>
$(document).ready(function() {
$( "div" ).fadeIn( 3000, function() {
$( "span" ).fadeIn( 100 );
});
return false;
});
</script>
</body>
</html>

View File

@ -3,7 +3,7 @@
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1,user-scalable=no'/>
<meta http-equiv='refresh' content='1' />
<!--<meta http-equiv='refresh' content='1' />-->
<title>Passerelle LoRa</title>
<style>
div,fieldset,input,select
@ -76,13 +76,17 @@
text-align:right;
}
</style>
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
</head>
<body onload='alea()'>
<script>
<body onload=mafonction()>
<!--<script>
function alea() {
var x = document.getElementById('demo')x.innerHTML = Math.floor((Math.random() * 10) + 1);
}
</script>
</script>-->
<div style='text-align:left;display:inline-block;min-width:340px;'>
<div style='text-align:center;'>
<h1>Passerelle LoRa</h1>
@ -96,7 +100,7 @@
</p>
</div>
<div id='l1' name='l1'></div>
<table style='width:100%'>
<!--<table style='width:100%'>
<tr>
<button onclick='la('?o=1');'>Informations</button>
</tr>
@ -106,7 +110,12 @@
<tr>
<button onclick='la('?o=1');'>Redémarrer</button>
</tr>
</table>
</table>-->
</div>
<script type="text/javascript">
function mafonction(){
$(document.body).fadeIn(6000);
}
</script>
</body>
</html>

View File

@ -27,7 +27,6 @@ int numCase; // used to associat
void setup(){
SerialUSB.begin(9600);
while (!SerialUSB); // wait for serial to initialize
SerialUSB.println("LoRa Gateway"); // display on serial the name of the device
thisLoRa.begin(); // initialise LoRa
@ -104,7 +103,7 @@ void loop() {
// WebServer
EthernetClient serverGateway = server.available(); // try to get client
if (serverGateway) { // got client?
while (serverGateway) { // got client?
boolean currentLineIsBlank = true;
if (serverGateway.connected()) {
if (serverGateway.available()) { // client data available to read
@ -125,7 +124,7 @@ void loop() {
}
webFile.close();
}
//break;
break;
}
// every line of text received from the client ends with \r\n
if (c == '\n') {
@ -140,7 +139,8 @@ void loop() {
} // end if (client.available())
} // end while (client.connected())
delay(1); // give the web browser time to receive the data
serverGateway.stop(); // close the connection
serverGateway.stop(); // close the connection
break;
}//end if (serverGateway)
}//end void loop