-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
154 lines (142 loc) · 5.18 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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<!DOCTYPE html>
<head>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
</head>
<title>OpenSCD Transpower Distribution</title>
<open-scd></open-scd>
<link href="themes.css" rel="stylesheet" />
<script>
const _customElementsDefine = window.customElements.define;
window.customElements.define = (name, cl, conf) => {
if (!customElements.get(name)) {
try {
_customElementsDefine.call(window.customElements, name, cl, conf);
} catch (e) {
console.warn(e);
}
}
};
</script>
<script type="module">
import "./open-scd-core/open-scd.js";
fetch("./plugins.json")
.then((res) => res.text())
.then((plugins) => {
const openScd = document.querySelector("open-scd");
openScd.setAttribute("plugins", plugins);
const params = new URL(document.location).searchParams;
for (const [name, value] of params) {
openScd.setAttribute(name, value);
}
});
const editor = document.querySelector("open-scd");
const params = new URL(document.location).searchParams;
for (const [name, value] of params) {
editor.setAttribute(name, value);
}
</script>
<style>
body {
height: 100%;
width: 100%;
}
html {
height: 100%;
width: 100%;
}
/* fallback */
@font-face {
font-family: "Material Symbols Outlined";
font-style: normal;
font-weight: 400;
src: url(fonts/material-symbols-outlined.woff2) format("woff2");
}
.material-symbols-outlined {
font-family: "Material Symbols Outlined";
font-weight: normal;
font-style: normal;
font-size: 24px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
font-feature-settings: "liga";
-webkit-font-feature-settings: "liga";
-webkit-font-smoothing: antialiased;
}
/* roboto-300 - vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic */
@font-face {
font-family: "Roboto";
font-style: normal;
font-weight: 300;
src: local(""),
url("fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-300.woff2")
format("woff2"),
/* Chrome 26+, Opera 23+, Firefox 39+ */
url("fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-300.woff")
format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* roboto-300italic - vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic */
@font-face {
font-family: "Roboto";
font-style: italic;
font-weight: 300;
src: local(""),
url("fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-300italic.woff2")
format("woff2"),
/* Chrome 26+, Opera 23+, Firefox 39+ */
url("fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-300italic.woff")
format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* roboto-regular - vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic */
@font-face {
font-family: "Roboto";
font-style: normal;
font-weight: 400;
src: local(""),
url("fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff2")
format("woff2"),
/* Chrome 26+, Opera 23+, Firefox 39+ */
url("fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff")
format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* roboto-italic - vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic */
@font-face {
font-family: "Roboto";
font-style: italic;
font-weight: 400;
src: local(""),
url("fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-italic.woff2")
format("woff2"),
/* Chrome 26+, Opera 23+, Firefox 39+ */
url("fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-italic.woff")
format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* roboto-500italic - vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic */
@font-face {
font-family: "Roboto";
font-style: italic;
font-weight: 500;
src: local(""),
url("fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500italic.woff2")
format("woff2"),
/* Chrome 26+, Opera 23+, Firefox 39+ */
url("fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500italic.woff")
format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
/* roboto-500 - vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic */
@font-face {
font-family: "Roboto";
font-style: normal;
font-weight: 500;
src: local(""),
url("fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500.woff2")
format("woff2"),
/* Chrome 26+, Opera 23+, Firefox 39+ */
url("fonts/roboto-v30-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500.woff")
format("woff"); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
</style>