-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreview.html
55 lines (53 loc) · 1.53 KB
/
preview.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
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Extension Preview</title>
</head>
<body>
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
.row {
--bs-gutter-x:1.5rem;
--bs-gutter-y:0;
display:-ms-flexbox;
display:flex;
-ms-flex-wrap:wrap;
flex-wrap:wrap;
margin-top:calc(var(--bs-gutter-y) * -1);
margin-right:calc(var(--bs-gutter-x) * -.5);
margin-left:calc(var(--bs-gutter-x) * -.5)
}
.row>* {
-ms-flex-negative:0;
flex-shrink:0;
width:100%;
max-width:100%;
padding-right:calc(var(--bs-gutter-x) * .5);
padding-left:calc(var(--bs-gutter-x) * .5);
margin-top:var(--bs-gutter-y)
}
</style>
<iframe id="mainIframe" src="templates/main_template.html" width="100%" height="100%" frameborder="0" style="border: none;"></iframe>
</body>
<script>
const iframe = document.querySelector('#mainIframe');
iframe.onload = function() {
const iframeDoc = iframe.contentDocument || iframe.contentDocument.document;
fetch('templates/instance_box_template.html')
.then(response => response.text())
.then(data => {
iframeDoc.querySelector('.veado-instances-list').innerHTML = data;
})
.catch(error => console.error(error));
}
</script>
</html>