annot-server/webapp/templates/index.html
changeset 43 e27c3c1c57f1
parent 22 986ee928a866
--- a/annot-server/webapp/templates/index.html	Sun Oct 19 12:52:38 2014 +0200
+++ b/annot-server/webapp/templates/index.html	Mon Oct 20 01:31:33 2014 +0200
@@ -1,56 +1,23 @@
-<!DOCTYPE html>
+<!doctype html>
 <html>
-   <head>
-      <link rel="icon" href="data:;base64,=">
-      <script type="text/javascript">
-         var sock = null;
-         var ellog = null;
-
-         window.onload = function() {
-
-            ellog = document.getElementById('log');
-
-            var wsuri;
-            if (window.location.protocol === "file:") {
-               wsuri = "ws://127.0.0.1:8090/broadcast";
-            } else {
-               wsuri = "ws://" + window.location.hostname + ":8090/broadcast";
-            }
-            if ("WebSocket" in window) {
-               sock = new WebSocket(wsuri);
-            } else if ("MozWebSocket" in window) {
-               sock = new MozWebSocket(wsuri);
-            } else {
-               log("Browser does not support WebSocket!");
-               window.location = "http://autobahn.ws/unsupportedbrowser";
-            }
-
-            if (sock) {
-               sock.onopen = function() {
-                  log("Connected to " + wsuri);
-               }
-
-               sock.onclose = function(e) {
-                  log("Connection closed (wasClean = " + e.wasClean + ", code = " + e.code + ", reason = '" + e.reason + "')");
-                  sock = null;
-               }
-
-               sock.onmessage = function(e) {
-                  log("Got message: " + e.data);
-               }
-            }
-         };
-
-         function log(m) {
-            ellog.innerHTML += m + '\n';
-            ellog.scrollTop = ellog.scrollHeight;
-         };
-      </script>
-      <link rel="stylesheet" type="text/css" href="/static/css/base.css">
-   </head>
-   <body>
-      <h1>OSC websocket Test</h1>
-      <noscript>You must enable JavaScript</noscript>
-      <pre id="log"></pre>
-   </body>
-</html>
+<head>
+  <meta charset="utf-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1">
+  <title>Mons by IRI</title>
+  <link rel="stylesheet" href="{{ config['STATIC_URL'] }}/css/lib.css">
+  <link rel="stylesheet" href="{{ config['STATIC_URL'] }}/css/base.css">
+</head>
+<body>
+  <div class="container" id="index-container">
+      <h1 class="row">Évènements actifs&nbsp;:</h1>
+      {% for event in events %}
+      <div class="row">
+          <div class="event-label"><a href="{{ url_for('page_annotationclient_event_code', event_code=event.code) }}">{{ event.label }}</a></div>
+          <dl>
+              <dt>Code&nbsp;: {{ event.code }}</dt>
+              <dd>Description&nbsp;: {{ event.description }}</dd>
+          </dl>
+      </div>
+      {% endfor %}
+  </div>
+ </body>