你好!我是一个热爱编程和技术的开发者。
+我喜欢探索新的技术和工具,并将它们应用到实际项目中。
+在业余时间,我喜欢阅读技术书籍以及参与开源项目。
+如果你对我的工作感兴趣,欢迎通过以下方式联系我(Contact Me):
+-
+
- 电子邮件: example@example.com +
- GitHub: https://github.com/suifengwudong +
diff --git a/frontend/public/about-me.css b/frontend/public/about-me.css new file mode 100644 index 0000000..b3b9f8b --- /dev/null +++ b/frontend/public/about-me.css @@ -0,0 +1,249 @@ +#main-frame { + display: flex; + flex-direction: column; + min-height: 100vh; + width: 100%; + background: linear-gradient(135deg, #e3e6f3 0%, #f8f9fd 100%); + font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif; +} + +#top-frame { + width: 100%; + text-align: center; + padding: 40px 0 20px 0; + border-bottom: 2px solid #e0e0e0; + background: rgba(255,255,255,0.95); + box-shadow: 0 4px 16px rgba(73, 219, 232, 0.08); + backdrop-filter: blur(2px); +} +#top-frame h1 { + margin: 0 0 12px 0; + font-size: 2.2rem; + color: #6c3ad6; + letter-spacing: 2px; + font-weight: 700; +} +#top-frame a { + color: #2196f3; + text-decoration: underline; + font-size: 1.1rem; + padding: 6px 18px; + border-radius: 20px; + background: #f3f6fb; + transition: background 0.2s; +} +#top-frame a:hover { + background: #e3e6f3; +} + +#mid-frame { + display: flex; + flex: 1; + width: 100%; + max-width: 1100px; + margin: 0 auto; + gap: 40px; + padding: 40px 0; + box-sizing: border-box; +} +.mid-frame-ele { + flex: 1; + display: flex; + align-items: flex-start; + justify-content: center; +} + +#about-card { + background: rgba(255,255,255,0.98); + border-radius: 16px; + box-shadow: 0 6px 32px rgba(108,58,214,0.08); + padding: 32px 28px; + width: 100%; + max-width: 420px; + margin-bottom: 24px; + transition: box-shadow 0.2s; +} +#about-card:hover { + box-shadow: 0 12px 48px rgba(108,58,214,0.16); +} + +#further-info-card { + background: rgba(255,255,255,0.98); + border-radius: 16px; + box-shadow: 0 6px 32px rgba(33,150,243,0.08); + padding: 32px 28px; + max-width: 420px; + width: 100%; + transition: box-shadow 0.2s; +} +#further-info-card:hover { + box-shadow: 0 12px 48px rgba(33,150,243,0.16); +} +#further-info-card h2 { + color: #2196f3; + margin-top: 0; + font-size: 1.5rem; + font-weight: 600; +} +#further-info-card h3 { + color: #6c3ad6; + margin-bottom: 8px; + font-size: 1.1rem; + font-weight: 500; +} + +#about-header { + background: transparent; + border-radius: 16px 16px 0 0; + padding: 0 0 16px 0; + width: 100%; + text-align: center; +} +#about-main-content { + background: transparent; + border-radius: 0 0 16px 16px; + padding: 0; + width: 100%; +} + +li { + background: #f6faff; + box-shadow: 0 2px 8px rgba(108,58,214,0.10); + border-radius: 12px; + margin-bottom: 10px; + padding: 12px 20px; + transition: background 0.2s, box-shadow 0.2s; + list-style: none; + font-size: 1rem; + color: #333; +} +li::before { + content: ''; + display: inline-block; + width: 10px; + height: 10px; + background: linear-gradient(135deg, #6c3ad6 60%, #2196f3 100%); + border-radius: 50%; + margin-right: 12px; + vertical-align: middle; +} +li:hover { + background: #e3e6f3; + box-shadow: 0 4px 16px rgba(108,58,214,0.18); +} + +a { + color: #2196f3; + text-decoration: underline; + transition: color 0.2s; +} +a:hover { + color: #6c3ad6; +} + +#footer { + width: 100%; + text-align: center; + padding: 18px 0; + background: linear-gradient(90deg, #e3e6f3 0%, #f3f6fb 100%); + color: #888; + font-size: 1.05rem; + border-top: 1px solid #e0e0e0; + letter-spacing: 1px; +} + +.commits-btn { + padding: 8px 20px; + border-radius: 8px; + border: none; + background: #6c3ad6; + color: #fff; + font-size: 1rem; + cursor: pointer; + box-shadow: 0 2px 8px rgba(108,58,214,0.10); + transition: background 0.2s, box-shadow 0.2s; +} +.commits-btn:hover:not(:disabled) { + background: #2196f3; + box-shadow: 0 4px 16px rgba(33,150,243,0.18); +} +.commits-btn:disabled { + background: #aaa; + cursor: not-allowed; +} + +@media (max-width: 900px) { + #mid-frame { + flex-direction: column; + gap: 20px; + padding: 20px 0; + } + #about-card, #further-info-card { + max-width: 98vw; + margin: 0 auto 18px auto; + } +} + +body.dark-mode { + background: linear-gradient(135deg, #23243a 0%, #2c2e3e 100%) !important; + color: #e0e0e0; +} +body.dark-mode #main-frame { + background: linear-gradient(135deg, #23243a 0%, #2c2e3e 100%) !important; +} +body.dark-mode #top-frame { + background: rgba(30,32,48,0.95); + color: #e0e0e0; + border-bottom: 2px solid #444; +} +body.dark-mode #top-frame h1 { + color: #b39ddb; +} +body.dark-mode #about-card, +body.dark-mode #further-info-card { + background: rgba(40,42,60,0.98); + box-shadow: 0 6px 32px rgba(40,42,60,0.18); + color: #e0e0e0; +} +body.dark-mode #about-header { + background: transparent; +} +body.dark-mode #about-main-content { + background: transparent; +} +body.dark-mode li { + background: #2c2e3e; + color: #e0e0e0; + box-shadow: 0 2px 8px rgba(40,42,60,0.18); +} +body.dark-mode li::before { + background: linear-gradient(135deg, #b39ddb 60%, #2196f3 100%); +} +body.dark-mode li:hover { + background: #23243a; + box-shadow: 0 4px 16px rgba(40,42,60,0.28); +} +body.dark-mode a { + color: #90caf9; +} +body.dark-mode a:hover { + color: #b39ddb; +} +body.dark-mode #footer { + background: linear-gradient(90deg, #23243a 0%, #2c2e3e 100%); + color: #aaa; + border-top: 1px solid #444; +} +body.dark-mode .commits-btn { + background: #23243a; + color: #e0e0e0; + box-shadow: 0 2px 8px rgba(40,42,60,0.18); +} +body.dark-mode .commits-btn:hover:not(:disabled) { + background: #2196f3; + color: #fff; +} +body.dark-mode .commits-btn:disabled { + background: #444; + color: #aaa; +} diff --git a/frontend/public/about-me.html b/frontend/public/about-me.html new file mode 100644 index 0000000..0e69657 --- /dev/null +++ b/frontend/public/about-me.html @@ -0,0 +1,65 @@ + + +
+ + + +你好!我是一个热爱编程和技术的开发者。
+我喜欢探索新的技术和工具,并将它们应用到实际项目中。
+在业余时间,我喜欢阅读技术书籍以及参与开源项目。
+如果你对我的工作感兴趣,欢迎通过以下方式联系我(Contact Me):
+在这里你可以找到我参与的项目和更多的个人信息。
+仓库获取失败
'); + } +} + +async function fetchGitHubCommits() { + const res = await fetch('https://api.github.com/users/suifengwudong/events'); + const events = await res.json(); + let html = '提交获取失败
'); + } +} +async function deleteCommits(commitList) { + if (!commitList) return; + // 只删除ul和p类型的提交内容,保留h3和按钮 + Array.from(commitList.children).forEach(child => { + if (child.tagName === 'UL') { + commitList.removeChild(child); + } + }); +} + +let commitsShown = false; +async function showCommitsByClick(btn) { + if (!btn) return; + const commitList = document.getElementById('github-commits'); + if (!commitsShown) { + btn.textContent = '正在加载...'; + await showCommits(commitList); + btn.textContent = '收起'; + commitsShown = true; + } else { + btn.textContent = '展开'; + await deleteCommits(commitList); + commitsShown = false; + } +} + +function toggleDarkMode() { + const body = document.body; + const btn = document.getElementById('dark-mode-toggle'); + body.classList.toggle('dark-mode'); + if (body.classList.contains('dark-mode')) { + btn.textContent = '切换白天模式'; + } else { + btn.textContent = '切换黑暗模式'; + } +} + +window.addEventListener('DOMContentLoaded', () => { + showRepos(); // 页面加载时展示仓库 +}); diff --git a/frontend/public/index.html b/frontend/public/index.html index fe08636..e2b627c 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -28,6 +28,8 @@当前时间加载中... ...
每日一句加载中... ...