forked from OpenEnergyTools/scl-template-update
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
77 lines (70 loc) · 1.9 KB
/
index.html
File metadata and controls
77 lines (70 loc) · 1.9 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<html>
<head>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300&family=Roboto:wght@300;400;500&display=swap"
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Material+Icons&display=block"
/>
<link
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined"
rel="stylesheet"
/>
</head>
<body>
<oscd-shell></oscd-shell>
<script type="module">
import '@omicronenergy/oscd-shell/oscd-shell.js';
const editor = document.querySelector('oscd-shell');
editor.plugins = {
editor: [
{
name: 'Template Update',
icon: 'copy_all',
active: true,
src: '/dist/scl-template-update.js',
},
],
menu: [
{
name: 'Open File',
translations: { de: 'Datei öffnen' },
icon: 'folder_open',
active: true,
src: 'https://openscd.github.io/oscd-open/oscd-open.js',
},
{
name: 'Save File',
translations: { de: 'Datei speichern' },
icon: 'save',
active: true,
src: 'https://openscd.github.io/oscd-save/oscd-save.js',
},
],
};
const params = new URL(document.location).searchParams;
for (const [name, value] of params) {
editor.setAttribute(name, value);
}
</script>
<script>
const _customElementsDefine = window.customElements.define;
window.customElements.define = (name, cl, conf) => {
if (!customElements.get(name)) {
_customElementsDefine.call(window.customElements, name, cl, conf);
}
};
</script>
<style>
* {
margin: 0px;
padding: 0px;
}
body {
background: white;
}
</style>
</body>
</html>