2020-11-19 13:47:56 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="zh">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
<title>MobileView</title>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
<link type="image/x-icon" rel="shortcut icon" href="./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="font-awesome/css/font-awesome.css" />
|
|
|
|
<link rel="stylesheet" href="animate.css/animate.css" />
|
2020-11-30 16:53:04 +08:00
|
|
|
<!--DEPENDENCIES_INJECT_PLACEHOLDER-->
|
2020-11-19 13:47:56 +08:00
|
|
|
<link rel="stylesheet" title="default" href="../scss/themes/default.scss" />
|
|
|
|
<link
|
|
|
|
rel="stylesheet"
|
|
|
|
title="cxd"
|
|
|
|
disabled
|
|
|
|
href="../scss/themes/cxd.scss"
|
|
|
|
/>
|
|
|
|
<link
|
|
|
|
rel="stylesheet"
|
|
|
|
title="dark"
|
|
|
|
disabled
|
|
|
|
href="../scss/themes/dark.scss"
|
|
|
|
/>
|
2021-01-25 17:22:11 +08:00
|
|
|
<link
|
|
|
|
rel="stylesheet"
|
|
|
|
title="antd"
|
|
|
|
disabled
|
|
|
|
href="../scss/themes/antd.scss"
|
|
|
|
/>
|
2020-12-21 10:08:40 +08:00
|
|
|
<link rel="stylesheet" href="../scss/helper.scss" />
|
2020-11-19 13:47:56 +08:00
|
|
|
<style>
|
|
|
|
.app-wrapper {
|
|
|
|
position: relative;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div id="root" class="app-wrapper"></div>
|
|
|
|
<script src="./mod.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
const themes = [
|
|
|
|
{
|
|
|
|
label: '默认主题',
|
|
|
|
value: 'default'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '百度云舍',
|
|
|
|
value: 'cxd'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'Dark',
|
|
|
|
value: 'dark'
|
2021-01-25 17:22:11 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
label: 'antd',
|
|
|
|
value: 'antd'
|
2020-11-19 13:47:56 +08:00
|
|
|
}
|
|
|
|
];
|
|
|
|
const theme = themes[localStorage.getItem('themeIndex') || 0];
|
2020-11-19 19:22:56 +08:00
|
|
|
// mobile 下先禁掉所有外链避免影响
|
2020-11-30 16:53:04 +08:00
|
|
|
document.querySelectorAll('link[title]').forEach(item => {
|
2020-11-19 19:22:56 +08:00
|
|
|
item.disabled = true;
|
|
|
|
});
|
|
|
|
document.querySelector(`link[title=${theme.value}]`).disabled = false;
|
|
|
|
if (theme.value === 'dark') {
|
|
|
|
document.querySelector('body').classList.add('dark');
|
2020-11-19 13:47:56 +08:00
|
|
|
}
|
2020-11-19 19:22:56 +08:00
|
|
|
|
2020-11-19 13:47:56 +08:00
|
|
|
amis.require(['./mobile.tsx'], function (app) {
|
2020-11-19 19:22:56 +08:00
|
|
|
app.bootstrap(document.getElementById('root'), {});
|
2020-11-19 13:47:56 +08:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|