forked from baidu/amis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
107 lines (100 loc) · 3.28 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
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<title>amis - 低代码前端框架</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link
type="image/x-icon"
rel="shortcut icon"
href="/examples/static/favicon.png"
/>
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1"
/>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<link rel="stylesheet" href="/examples/static/iconfont.css" />
<link rel="stylesheet" href="/examples/static/officefont.css" />
<link
rel="stylesheet"
href="/node_modules/@fortawesome/fontawesome-free/css/all.css"
/>
<link
rel="stylesheet"
href="/node_modules/@fortawesome/fontawesome-free/css/v4-shims.css"
/>
<link rel="stylesheet" href="/node_modules/katex/dist/katex.min.css" />
<link rel="stylesheet" href="/node_modules/prismjs/themes/prism.css" />
<link
rel="stylesheet"
href="/node_modules/github-markdown-css/github-markdown-light.css"
/>
<link rel="stylesheet" href="/examples/doc.css" />
<link rel="stylesheet" href="/examples/style.scss" />
<style>
.app-wrapper,
.schema-wrapper {
position: relative;
width: 100%;
height: 100%;
}
</style>
<script type="module">
let theme = localStorage.getItem('amis-theme') || 'cxd';
if (theme === 'default') {
theme = 'cxd';
}
['ang', 'cxd', 'antd', 'dark'].forEach(key => {
const link = document.createElement('link');
link.setAttribute('rel', 'stylesheet');
link.setAttribute('title', key);
if (theme !== key) {
link.setAttribute('disabled', 'disabled');
}
link.setAttribute(
'href',
new URL(`./packages/amis-ui/scss/themes/${key}.scss`, import.meta.url)
.href
);
document.head.appendChild(link);
});
// helper 放在末尾提高优先级
const helper = document.createElement('link');
helper.setAttribute('rel', 'stylesheet');
helper.setAttribute(
'href',
new URL(`./packages/amis-ui/scss/helper.scss`, import.meta.url).href
);
document.head.appendChild(helper);
</script>
<!-- <link rel="stylesheet" href="./packages/amis-ui/scss/helper.scss" /> -->
</head>
<body>
<div id="root" class="app-wrapper"></div>
<script type="text/javascript">
if (location.hostname !== 'localhost') {
var _hmt = _hmt || [];
// 百度统计
(function () {
var hm = document.createElement('script');
hm.src =
'https://hm.baidu.com/hm.js?286766a21abb57abefedbd5257a26dc8';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s);
})();
}
</script>
<script type="module">
import {bootstrap} from './examples/index.jsx';
window.enableAMISDebug = true;
const initialState = {};
bootstrap(document.getElementById('root'), initialState);
</script>
<script defer src="/node_modules/katex/dist/katex.min.js"></script>
<script
defer
src="/node_modules/katex/dist/contrib/auto-render.min.js"
></script>
</body>
</html>