-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
374 lines (319 loc) · 11.1 KB
/
index.html
File metadata and controls
374 lines (319 loc) · 11.1 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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
<!-- <!DOCTYPE html>
<html>
<body>
<h1>Hello World</h1>
<p>I'm hosted with GitHub Pages.</p>
</body>
</html>
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="./NYU.png" sizes="192x192">
<link rel="apple-touch-icon" href="./NYU.png">
<meta name="msapplication-TileImage" content="./NYU.png">
<title>Ariel McLaughlin's Home Page</title>
<style>
/* 亮色模式 */
:root {
/* 亮色變量 */
--bg-color: white;
--text-color: #333; /* 使用深灰色文字,避免純黑過於刺眼 */
--heading-color: #222;
--link-color: #007bff;
--link-visited-color: #6610f2;
--link-hover-color: #dc3545;
--hr-color: #ddd;
--footer-bg: #f8f9fa;
--footer-border: 1px solid #e9ecef;
--main-container-bg: white;
--nav-link-color: #007bff;
}
/* 深色模式變量 */
body.dark-mode {
--bg-color: #1a1a1a; /* 更柔和的深色背景 */
--text-color: #e8eaed;
--heading-color: #ffffff;
--link-color: #8ab4f8;
--link-visited-color: #c58af9;
--link-hover-color: #fdd663;
--hr-color: #444;
--footer-bg: #2a2a2a;
--footer-border: 1px solid #444;
--main-container-bg: #222;
--nav-link-color: #8ab4f8;
}
/* 通用样式 */
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 0 0 70px 0; /* 底部留出空间給 footer */
transition: background-color 0.3s, color 0.3s;
background-color: var(--bg-color);
color: var(--text-color);
min-height: 100vh;
}
/* 主內容容器 */
.container {
max-width: 1000px; /* 限制內容最大寬度 */
margin: 40px auto; /* 居中 */
padding: 0 20px;
}
h1, h2 {
color: var(--heading-color);
margin-top: 0;
}
h2 {
margin-bottom: 15px;
font-size: 1.5em;
}
a {
color: var(--link-color);
text-decoration: none;
transition: color 0.2s;
}
a:visited {
color: var(--link-visited-color);
}
a:hover {
color: var(--link-hover-color);
text-decoration: underline;
}
.bio-text {
line-height: 1.6;
font-size: 17px;
}
/* 頂部簡介區塊 (Flexbox) */
.profile-header {
display: flex;
gap: 30px; /* 圖片和文字之間的間距 */
align-items: flex-start;
margin-bottom: 40px;
}
.profile-image-container {
flex-shrink: 0; /* 防止圖片被壓縮 */
}
.profile-image {
width: 150px; /* 調整圖片大小,更符合專業網站標準 */
height: auto;
border-radius: 8px; /* 圓角 */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 輕微陰影 */
object-fit: cover;
/* 調整圖片長寬比的樣式 */
/* width: 204px;
height: 306px; */
}
.profile-info {
flex-grow: 1;
}
/* 導航欄樣式 (Flexbox) */
.main-nav {
list-style: none;
padding: 0;
margin: 0;
display: flex;
flex-direction: column; /* 垂直導航 */
gap: 10px;
margin-right: 30px;
}
.main-nav a {
font-size: 1.1em;
font-weight: 500;
padding: 5px 0;
display: block;
color: var(--nav-link-color);
}
/* 內容區塊 (Flexbox) */
.content-section {
display: flex;
gap: 20px;
margin-top: 30px;
}
.sidebar {
width: 200px;
flex-shrink: 0;
}
.main-content {
flex-grow: 1;
padding-left: 20px;
border-left: 1px solid var(--hr-color); /* 添加垂直分割線 */
}
.quote {
text-align: center;
font-style: italic;
margin: 20px 0;
padding: 10px;
border-left: 5px solid var(--link-color);
background-color: rgba(128, 128, 128, 0.05);
}
/* 主題切換按鈕 */
#theme-toggle {
position: fixed;
top: 20px;
right: 20px;
background: var(--main-container-bg);
border: 1px solid var(--hr-color);
color: var(--text-color);
border-radius: 50%;
width: 40px;
height: 40px;
font-size: 18px;
cursor: pointer;
z-index: 1000;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
transition: background 0.3s, border 0.3s;
}
#theme-toggle:hover {
opacity: 0.8;
}
/* 頁腳 */
.footer {
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
padding: 15px 0;
background-color: var(--footer-bg);
border-top: var(--footer-border);
font-size: 0.9em;
z-index: 900;
}
/* 響應式設計 */
@media (max-width: 768px) {
.container {
margin: 20px auto;
padding: 0 15px;
}
.profile-header {
flex-direction: column; /* 圖片和文字垂直堆疊 */
align-items: center; /* 居中對齊 */
text-align: center;
}
.profile-info h1 {
margin-top: 10px;
}
.content-section {
flex-direction: column; /* 導航和內容垂直堆疊 */
}
.sidebar {
width: 100%;
border-bottom: 1px solid var(--hr-color);
padding-bottom: 10px;
}
.main-content {
padding-left: 0;
border-left: none;
padding-top: 10px;
}
.main-nav {
flex-direction: row; /* 導航連結改為水平排列 */
justify-content: center;
gap: 20px;
}
.main-nav a {
font-size: 1em;
}
#theme-toggle {
top: 10px;
right: 10px;
width: 35px;
height: 35px;
font-size: 16px;
}
}
</style>
</head>
<body class="light-mode">
<button id="theme-toggle" aria-label="切換深色/亮色模式">🌙</button>
<div class="container">
<header class="profile-header">
<div class="profile-image-container">
<img class="profile-image" src="./Patchouli.jpg" alt="個人頭像" title="Ariel Wang">
</div>
<div class="profile-info">
<h1>Ariel McLaughlin</h1>
<div class="bio-text">
<p>
Mathematics student <br>
<strong>New York University Shanghai</strong>
</p>
<p>
567 West Yangsi Road, Pudong New District, Shanghai, China 200126 <br>
Office: Room WB244 <br>
Email: <a href="mailto:ariel@netc.fr">ariel@netc.fr </a>
</p>
<p>
Research interests: Nothing
</p>
</div>
</div>
</header>
<hr style="border: none; border-top: 1px solid var(--hr-color);">
<main class="content-section">
<nav class="sidebar">
<ul class="main-nav">
<li><a href="/">Biography</a></li>
<li><a href="/languages.html">Languages</a></li>
<li><a href="https://yourwhitemoon.wordpress.com">Blog</a></li>
<li><a href="/poems.html">Poems</a></li>
</ul>
</nav>
<section class="main-content">
<h2>Biography</h2>
<div class="bio-text">
<p class="quote"><i>Knowing yourself is the beginning of all wisdom. --Aristotle</i></p>
<p>
I am currently a student at New York University Shanghai majoring in Mathematics. Besides that, I have a general interest in chemistry. Before joining NYU Shanghai, I was a high school student majoring in Chinese Chemistry Olympiad.
</p>
<p>
I used to have a strong inclination in traditional Chinese poetry in my high school (see my <a href="/poems.html">poems</a>). I am a disciple of Friedrich Hayek and the Austrian school of economics (see my <a href="https://yourwhitemoon.wordpress.com">blog</a>).
</p>
</div>
</section>
</main>
</div>
<footer class="footer">
<a href="https://icp.gov.moe/?keyword=20250101" target="_blank">萌ICP备20250101号</a>
</footer>
<script>
document.addEventListener('DOMContentLoaded', () => {
const themeToggle = document.getElementById('theme-toggle');
const body = document.body;
// 檢查本地存儲中的主題偏好或系統偏好
const systemPrefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
let savedTheme = localStorage.getItem('theme');
if (!savedTheme) {
// 如果沒有本地存儲,則根據系統偏好設定初始主題
savedTheme = systemPrefersDark ? 'dark-mode' : 'light-mode';
}
// 應用主題
body.classList.add(savedTheme);
themeToggle.textContent = savedTheme === 'dark-mode' ? '☀️' : '🌙';
// 點擊按鈕切換主題
themeToggle.addEventListener('click', () => {
if (body.classList.contains('light-mode')) {
body.classList.replace('light-mode', 'dark-mode');
themeToggle.textContent = '☀️';
localStorage.setItem('theme', 'dark-mode');
} else {
body.classList.replace('dark-mode', 'light-mode');
themeToggle.textContent = '🌙';
localStorage.setItem('theme', 'light-mode');
}
});
});
</script>
</body>
</html>
<!-- </body>
Jan 1, 2025
Update index.html
<a href="https://icp.gov.moe/?keyword=20250101" target="_blank">萌ICP备20250101号</a>
Dec 21, 2024
Update index.html
</html>
Jan 1, 2025
Update index.html
-->