53 lines
1.5 KiB
HTML
53 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
|
<title>BinBin</title>
|
|
<link rel="icon" href="./assets/favicon.ico?v=2">
|
|
<link href="https://fonts.googleapis.com/css?family=Saira+Condensed:300,400" rel="stylesheet">
|
|
<link href="https://fonts.googleapis.com/css?family=Roboto+Slab:100,300" rel="stylesheet">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
|
<script src="https://kit.fontawesome.com/54cafaf1a9.js"></script>
|
|
<script src="./js/tools.js"></script>
|
|
<script id="version">
|
|
scripts = {
|
|
'desktop': ['alert', 'desktop'],
|
|
'mobile': ['alert', 'mobile']
|
|
};
|
|
|
|
function isMobileDevice() {
|
|
return (typeof window.orientation !== "undefined") ||
|
|
(navigator.userAgent.indexOf('IEMobile') !== -1);
|
|
};
|
|
|
|
function setPage(method, html) {
|
|
body = get('body');
|
|
get('body').innerHTML = html;
|
|
scripts[method].forEach(function(ele) {
|
|
body.appendChild(element('script', {
|
|
src: `./js/${ele}.js`
|
|
}));
|
|
});
|
|
|
|
get('head').removeChild(get('#version'));
|
|
};
|
|
|
|
var method = (isMobileDevice()) ? "mobile" : "desktop";
|
|
console.log(method)
|
|
get('head').appendChild(element('link', {
|
|
rel: 'stylesheet',
|
|
href: `./css/${method}.css`
|
|
}));
|
|
|
|
$.get(`./main/${method}`).done(function(d) {
|
|
setPage(method, d);
|
|
});
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
</body>
|
|
|
|
</html> |