traque/static/tracking/conscrit.html

77 lines
2.5 KiB
HTML
Raw Normal View History

2022-09-13 23:18:13 +02:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Traque | Client conscrit</title>
<!-- LEAFLET INCLUDE -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.8.0/dist/leaflet.css"
integrity="sha512-hoalWLoI8r4UszCkZ5kL8vayOGVae1oxXe/2A4AO6J9+580uKHDO3JdHb7NzwwzK5xr/Fs0W40kiNHxM9vyTtQ=="
crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.8.0/dist/leaflet.js"
integrity="sha512-BB3hKbKWOc9Ez/TAwyWxNXeoV9c1v6FIeYiBieIWkpLjauysF18NzgR1MBNBXf8/KABdlkX68nAhlwcDFLGPCQ=="
crossorigin=""></script>
<!-- SOCKET.IO INCLUDE -->
<script src="/socket.io/socket.io.js"></script>
<style type="text/css">
#map { height: 600px; }
2023-06-16 20:56:58 +02:00
#codes {
2022-09-14 18:09:13 +02:00
position: fixed;
bottom: 0px;
z-index: 10000;
background-color: white;
width: 100%;
}
2022-09-13 23:18:13 +02:00
</style>
2022-09-14 10:52:29 +02:00
2023-06-05 21:26:13 +02:00
<script type="text/javascript" src="/utils.js"></script>
2022-09-13 23:18:13 +02:00
</head>
<body>
<div id="map"></div><br/>
2023-06-16 20:56:58 +02:00
<div id="codes"></div>
2023-09-11 21:14:52 +02:00
<div id="thanks">
2023-09-13 12:04:56 +02:00
<a href="https://dgnum.eu"><img src="/dgnum-logo.png" height=50px /></a><br/>
2023-09-11 21:14:52 +02:00
<span style="font-size: 0.8em">Merci à la <a href="https://dgnum.eu">Délégation Générale NUMérique de l'ENS</a>, qui héberge ce site.</span>
</div>
2022-09-13 23:18:13 +02:00
<script type="text/javascript">
//////////////////////////////////////////////////////////////////////////////
2022-09-14 10:52:29 +02:00
// SETUP MAP
2022-09-13 23:18:13 +02:00
2022-09-14 10:52:29 +02:00
setup_map();
2022-09-13 23:18:13 +02:00
//////////////////////////////////////////////////////////////////////////////
2023-06-05 21:26:13 +02:00
// SOCKET
2022-09-13 23:18:13 +02:00
2023-06-05 21:26:13 +02:00
id = "%ID"; // %ID will be replaced by the real id.
2023-06-10 09:46:04 +02:00
socket = io({rejectUnauthorized: false, auth: {id: id, type:"conscrit"}});
2023-09-06 18:13:40 +02:00
setup_socket_common();
2022-09-13 23:18:13 +02:00
//////////////////////////////////////////////////////////////////////////////
2023-06-05 21:26:13 +02:00
// SETTINGS -- CODE
2022-09-13 23:18:13 +02:00
2023-06-16 20:56:58 +02:00
socket.on('setCodes', function(codes){
var code_buttons = "";
if(codes.invisibility > 0)
code_buttons += `<button onclick="socket.emit('useCode', 'invisibility')">
Invisibilité
</button>`;
if(codes.blurred > 0)
code_buttons += `<button onclick="socket.emit('useCode', 'blurred')">
Brouillage
</button>`;
document.getElementById(`codes`).innerHTML = code_buttons;
});
2022-09-13 23:18:13 +02:00
//////////////////////////////////////////////////////////////////////////////
// GEOLOCALISATION
if(%GPSLOG) setup_geoLoc();
2022-09-13 23:18:13 +02:00
</script>
</body>
</html>