generated from edrys-org/module-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
44 lines (35 loc) · 1.35 KB
/
index.html
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
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Live whiteboard module based on Excalidraw" />
<meta name="show-in" content="*" />
<title>Live Whiteboard</title>
<script src="https://edrys-org.github.io/edrys/module/edrys.js"></script>
<script defer src="https://edrys-org.github.io/edrys/module/vendor/alpine.min.js"></script>
</head>
<body>
<template x-if="!!edrys && !!url" x-data="{ edrys: undefined, url: undefined }"
x-init="Edrys.onUpdate((e) => {
edrys = {...e}
let room = encodeURIComponent(edrys.liveRoom.name).replace(/[\W_]+/g, '')
let key = 'x' + edrys.class_id
url = `https://excalidraw.com/#room=edrys-${room}-${edrys.class_id},${key}`
})">
<iframe :src="url" frameborder="0" style="width:100%;height:100%;"></iframe>
</template>
<style>
body, html, iframe {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
body {
overflow: hidden;
}
</style>
</body>
</html>