Skip to content
Snippets Groups Projects
Select Git revision
  • 8c33c1017ddc4fabdfe91b31778a0db8a66000e9
  • main default protected
2 results

index.html

Blame
  • David Beniamine's avatar
    David Beniamine authored
    8c33c101
    History
    index.html 2.39 KiB
    <!DOCTYPE html>
    <html>
      <head>
        <meta charset="UTF-8">
        <title>Down for maintenance...</title>
        <style>
          body { 
            background-color: #5A8264;
            text-align: center; 
            padding: 150px; }
          h1 { 
            font-size: 50px; }
          body { 
            font: 20px Helvetica, sans-serif; color: #fff; 
          }
          #img360 {
            border-radius: 100px;
            margin-left: 0px;
            -webkit-animation:spin 4s linear infinite;
            -moz-animation:spin 4s linear infinite;
            animation:spin 4s linear infinite;
          }
          @-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } }
          @-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } }
          @keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
        </style>
        <script type="text/javascript">
            function refresh(count, limit) {
                if (count === limit) {
                    location.reload();
                }
                document.querySelector('#countdown').innerText= limit-count
                setTimeout(
                    function() {
                        refresh(count+1, limit);
                    },
                    1000
                );
            }
            function translate () {
                let title = "Down for maintenance ..."
                let h1 = "Sorry we're down for maintenance.";
                let h2  = "We'll be back shortly.";
                let p  = "This page will refresh in <span id='countdown'></span> seconds.</p>";
                if (navigator.language.split('-')[0] === 'fr') {
                    title = "Maintenance en cours ..."
                    h1 = "Désolé ce service est innacessible pour cause de maintenance";
                    h2 = "Nous serons de retour au plus vite";
                    p = "Ce texte se rafraichira dans <span id='countdown'></span> secondes";
                }
                document.querySelector('title').innerText= title;
                document.querySelector('h1').innerText= h1;
                document.querySelector('h2').innerText= h2;
                document.querySelector('p').innerHTML= p;
            }
            document.addEventListener(
                "DOMContentLoaded",
                function(event) {
                    translate();
                    refresh(0, 60);
                });
        </script>
      </head>
      <body>
        <img id="logo" src="logo.png">
        <h1></h1>
        <h2></h2>
        <img id="img360" width="200px" src="wheel.png">
        <p></p>
      </body>
    </html>