aboutsummaryrefslogtreecommitdiff
path: root/bh20simplewebuploader/templates/demo.html
blob: b9df5dc6fd76ae434c4f25c3cf6270fe85e15583 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html>
  {% include 'header.html' %}
    <link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css"
          integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
          crossorigin=""/>
  <body>
    {% include 'banner.html' %}
    {% include 'menu.html' %}
    {% include 'search.html' %}
    {% include 'demo-run.html' %}
    {% include 'footer.html' %}

    <script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js"
              integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew=="
              crossorigin=""></script>
    <script type="text/javascript">
      let scriptRoot = {{ request.script_root|tojson|safe }}; // examples

      document.addEventListener("DOMContentLoaded", function(){
          var count = fetch("/api/getCount")
              .then((resp) => resp.json())
              .then(function (data) {
                  count = data["sequences"];
                  console.log(count);
                  span = document.getElementById("Counter");
                  txt = document.createTextNode(count);
                  span.appendChild(txt);
              });
      });

      var mymap = L.map('mapid').setView([51.505, -0.09], 13);
    </script>
  </body>

</html>