-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
89 lines (86 loc) · 2.55 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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>联系我</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 100vh;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
transition: background-image 0.5s ease-in-out;
}
.container {
background-color: rgba(255, 255, 255, 0.8);
padding: 20px;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
text-align: center;
width: 90%;
max-width: 400px;
}
h1 {
margin-bottom: 20px;
}
a {
color: #007bff;
text-decoration: none;
font-weight: bold;
}
a:hover {
text-decoration: underline;
}
.message-form {
margin-top: 20px;
}
@media (max-width: 600px) {
.container {
width: 100%;
padding: 15px;
}
h1 {
font-size: 1.5rem;
}
}
</style>
</head>
<body>
<div class="container">
<h1>联系我</h1>
<p>点击以下邮箱给我发邮件:</p>
<p><a href="mailto:[email protected]">[email protected]</a></p>
<div class="message-form">
<h2>给我留言</h2>
<div class="commentbox"></div>
</div>
</div>
<!-- 引入 CommentBox 的脚本 -->
<script src="https://unpkg.com/commentbox.io/dist/commentBox.min.js"></script>
<script>
commentBox('5652367978528768-proj');
</script>
<!-- 必应每日壁纸 API 自动更换背景 -->
<script>
async function setBingBackground() {
try {
const response = await fetch('https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1');
const data = await response.json();
const wallpaperUrl = `https://www.bing.com${data.images[0].url}`;
document.body.style.backgroundImage = `url(${wallpaperUrl})`;
} catch (error) {
console.error('获取必应壁纸失败:', error);
}
}
setBingBackground();
</script>
</body>
</html>