2018-08-12

Die Webseite zur Esp32 Uhrzeit mit Datum.

zeitdatum32.html

<!-- For more information visit: https://fipsok.de -->
<!DOCTYPE HTML>
<html lang="de">
   <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <link rel="stylesheet" href="style32.css">
      <title>Uhrzeit Datum</title>
      <script>
         function renew() {
           fetch('/zeit').then(function (response) {
             return response.json();
           }).then(function (text) {
             var result = text.split(/\s/);
             document.querySelector('#datum').innerHTML = result[0];
             document.querySelector('#zeit').innerHTML = result[1];
           });
         }
         document.addEventListener('DOMContentLoaded', renew);
         setInterval(renew, 1000);
      </script>
      <style>
         body {
         padding: 10px;
         font-size: 3.2em;
         }
         section {
         align-items: center;
         background-color: black;
         width: 280px;
         height: 140px;
         border: .15em solid #909294;
         box-shadow: 5px 10px 5px #5a5a5b;
         border-radius: .2em;
         }
         span {
         color: #00ff05;
         position: relative;
         top: 0.3em;
         left: .1em;
         letter-spacing: .1em;
         font-weight: bold
         }
         #datum {
         font-size: 0.7em;
         margin-top: 0.5em;
         }
      </style>
   </head>
   <body>
      <section>
         <span id='zeit'></span>
         <span id='datum'></span>
      </section>
   </body>
</html>

Zurück