-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
251 lines (217 loc) · 5.56 KB
/
index.html
File metadata and controls
251 lines (217 loc) · 5.56 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>mkzi</title>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" />
<style>
:root {
--bg-color: #1a1a1a;
--text-color: #ffffff;
--accent-color: #2ecc71;
--card-bg: rgba(255, 255, 255, 0.1);
}
[data-theme="light"] {
--bg-color: #f5f5f5;
--text-color: #333333;
--card-bg: rgba(0, 0, 0, 0.1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
transition: background 0.3s ease;
}
body {
background-color: var(--bg-color);
color: var(--text-color);
font-family: 'Segoe UI', system-ui, sans-serif;
line-height: 1.6;
min-height: 100vh;
padding: 2rem;
}
.container {
max-width: 800px;
margin: 0 auto;
}
.header {
text-align: center;
margin-bottom: 2rem;
}
.avatar {
width: 150px;
height: 150px;
border-radius: 50%;
object-fit: cover;
margin-bottom: 1rem;
border: 3px solid var(--accent-color);
}
.name {
font-size: 2.5rem;
margin-bottom: 0.5rem;
}
.bio {
background: var(--card-bg);
padding: 1.5rem;
border-radius: 10px;
margin-bottom: 2rem;
}
.bio a {
color: lightblue;
text-decoration: underline;
}
/* 修改超链接的颜色 */
body[data-theme="light"] .bio a,
body[data-theme="light"] .social-card a {
color: blue;
}
body[data-theme="dark"] .bio a,
body[data-theme="dark"] .social-card a {
color: lightblue;
}
.social-row {
display: flex;
gap: 1rem;
justify-content: center;
margin-top: 2rem;
flex-wrap: nowrap;
width: 100%;
overflow-x: auto;
align-items: stretch;
}
/* 图标按钮样式 */
.icon-only {
display: flex;
align-items: center;
justify-content: center;
padding: 0.8rem;
background: var(--card-bg);
border-radius: 10px;
text-decoration: none;
flex: 0 0 auto;
}
.icon-only {
width: 60px;
height: 60px;
background: rgba(ff, ff, ff, 0.3);
/* 50% 黑色透明 */
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
flex: 0 0 auto;
}
.icon-only i {
font-size: clamp(1.5rem, 5vw, 2rem);
color: #ffffff;
}
/* QQ 卡片保留结构 */
.social-card {
flex: 1 1 0;
display: flex;
align-items: center;
background: var(--card-bg);
padding: 0.8rem 1rem;
border-radius: 10px;
min-width: 0;
white-space: nowrap;
}
.social-card i {
font-size: clamp(1.2rem, 5vw, 2rem);
margin-right: 0.8rem;
color: var(--text-color);
}
.social-card a {
color: lightblue;
text-decoration: underline;
font-size: clamp(0.8rem, 4vw, 1rem);
display: block;
margin-bottom: 0.2rem;
word-break: break-word;
}
.theme-toggle {
position: fixed;
top: 1rem;
right: 1rem;
background: none;
border: none;
color: var(--text-color);
cursor: pointer;
font-size: 1.5rem;
}
@media (max-width: 768px) {
body {
padding: 1rem;
}
.name {
font-size: 2rem;
}
.avatar {
width: 120px;
height: 120px;
}
.social-card {
flex: 1 1 100%;
justify-content: flex-start;
}
}
</style>
</head>
<body>
<button class="theme-toggle" onclick="toggleTheme()">
<i class="fas fa-moon"></i>
</button>
<div class="container">
<header class="header">
<img src="./mkzi/mkzi.jpg" alt="头像" class="avatar" />
<h1 class="name">mkzi-nya</h1>
</header>
<section class="bio" id="bio-content">
<!-- Markdown 内容将在这里显示 -->
</section>
<!-- 社交卡片行 -->
<div class="social-row">
<!-- Discord 图标 -->
<a href="https://discordapp.com/users/1135097559891853435" target="_blank" class="icon-only">
<i class="fab fa-discord"></i>
</a>
<!-- GitHub 图标 -->
<a href="https://github.com/mkzi-nya" target="_blank" class="icon-only">
<i class="fab fa-github"></i>
</a>
<!-- QQ 卡片 -->
<div class="social-card">
<i class="fab fa-qq"></i>
<div>
<a href="https://qm.qq.com/q/UfEfmy7MEE" target="_blank">2450382239</a>
<!--<a href="https://qm.qq.com/q/IfsuPxdYEo" target="_blank">2013773457</a>-->
</div>
</div>
</div>
</div>
<script>
fetch('./mkzi/mkzi.md')
.then(response => response.text())
.then(markdown => {
document.getElementById('bio-content').innerHTML = marked.parse(markdown);
})
.catch(() => {
document.getElementById('bio-content').innerHTML = '<p>未能加载个人介绍</p>';
});
function toggleTheme() {
const body = document.body;
const themeToggle = document.querySelector('.theme-toggle i');
if (body.getAttribute('data-theme') === 'light') {
body.removeAttribute('data-theme');
themeToggle.className = 'fas fa-moon';
} else {
body.setAttribute('data-theme', 'light');
themeToggle.className = 'fas fa-sun';
}
}
</script>
</body>
</html>