style(friends): 为友链卡片加入动画效果

2. chore(config): 更改 API 调用链接,从 Netlify Function 改为 GitHub API
3. GitHub Card 中头像 URL avatars.githubusercontent.com 改为 EdgeOne CDN 链接 avatars.gh.api.adclosenn.dev
This commit is contained in:
Ad-closeNN
2025-09-13 00:52:21 +08:00
parent 7e48caa994
commit 33225891fa
4 changed files with 41 additions and 13 deletions
+4 -3
View File
@@ -45,16 +45,17 @@
statsElement.textContent = 'Err. invalid domain name';
}
// 第一步:调用 API
const githubResponse = await fetch(`https://api.adclosenn.top/.netlify/functions/commit`);
const githubResponse = await fetch(`https://api.github.com/repos/Ad-closeNN/blog-fuwari/commits?per_page=1`);
if (!githubResponse.ok) {
throw new Error('获取信息失败');
}
const Data = await githubResponse.json();
let Data = await githubResponse.json();
Data = Data[0];
// 第二步:获取 Commit 数据
const latestCommit = Data
const latestCommit = Data;
const commitData = {
hash: latestCommit.sha.slice(0, 7),