-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
61 lines (61 loc) · 2.01 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
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<title>个人技术笔记 - I'm OWenT</title>
<style type="text/css">
body {
margin: 0;
padding: 0;
background-color: rgb(51, 51, 51);
}
#attach_head {
font-size: 64px;
text-align: center;
color: white;
padding: 0;
margin: 0;
}
#attach_loading {
font-size: 32px;
border: solid white 2px;
color: white;
padding: 0;
margin: 0;
}
#attach_foot, #attach_foot a {
background-color: rgb(24, 24, 24);
text-align: center;
color: white;
padding: 0;
margin: 0;
}
</style>
</head>
<body>
<div id="attach_head">个人技术笔记</div>
<div id="attach_loading">正在加载,请稍后...</div>
<div id="attach_foot"><a href="https://beian.miit.gov.cn/" target="_blank">沪ICP备2022003252号-3</a></div>
</body>
<script type="text/javascript">
window.onload = function() {
const height = (window.innerHeight - attach_head.offsetHeight - attach_foot.offsetHeight - attach_foot.offsetHeight) + "px";
const dom = document.createElement("iframe");
dom.setAttribute("id", "main_site");
dom.setAttribute("style", "min-height: 720px; padding: 0; margin: 0; width: 100%; height: " + height + ";");
dom.setAttribute("src", "https://owent.net");
dom.onchange = function() {
const el = document.getElementById("attach_loading");
if (el) {
el.innerText = "任在加载,尚未全部完成,请稍后...";
}
};
dom.onload = function() {
document.body.removeChild(document.getElementById("attach_loading"));
};
document.body.insertBefore(dom, document.getElementById("attach_foot"));
};
window.addEventListener("resize", function(){
main_site.style.height = (window.innerHeight - attach_head.offsetHeight - attach_foot.offsetHeight - attach_foot.offsetHeight) + "px";
});
</script>
</html>