Files
Website/nekopara/index.html

143 lines
4.7 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FRAISEMOE-Addons-Installer</title>
<link rel="shortcut icon" href="https://static-cos.ovofish.com/static/miraipip/img/favicon.ico" type="image/x-icon">
<style>
body, html {
height: 100%;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.background-layer {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url('https://static-cos.ovofish.com/static/nekopara/img/bg.webp') no-repeat center center/cover;
z-index: -1;
}
.download-container {
margin: 20px auto;
padding: 20px;
max-width: 600px;
min-width: 480px;
border-radius: 10px;
box-shadow: 0 3px 10px rgba(0,0,0,0.1);
background-color: #ffffff;
text-align: center;
}
h3 {
color: #2c3e50;
margin-bottom: 15px;
border-bottom: 2px solid #3498db;
padding-bottom: 10px;
}
.download-link {
display: block;
padding: 12px 20px;
margin: 15px 0;
background-color: #f8f9fa;
color: #1a73e8;
text-decoration: none;
border-radius: 6px;
transition: all 0.3s ease;
border: 1px solid #dadce0;
font-weight: 500;
}
.download-link:hover {
background-color: #e3f2fd;
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
#version_info {
margin-top: 20px;
padding: 10px 15px;
background-color: #f1f8e9;
border-radius: 6px;
color: #33691e;
font-size: 14px;
}
.error {
background-color: #ffebee !important;
color: #c62828 !important;
}
a {
text-decoration: none;
}
</style>
</head>
<body>
<div class="background-layer"></div>
<div class="download-container">
<a href="https://github.com/Yanam1Anna/FRAISEMOE-Addons-Installer"><h3>FRAISEMOE-Addons-Installer</h3></a>
<a id="github_url" class="download-link" href="#"></a>
<a id="mirror_url" class="download-link" href="#"></a>
<div id="version_info">正在获取版本信息...</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const downloadUrl = 'https://archive.ovofish.com/var/widget/api/nekopara/update.php';
const githubLink = document.getElementById('github_url');
const mirrorLink = document.getElementById('mirror_url');
const versionInfo = document.getElementById('version_info');
githubLink.textContent = "获取GitHub链接中...";
mirrorLink.textContent = "获取镜像链接中...";
fetch(downloadUrl)
.then(response => {
if (!response.ok) {
throw new Error(`HTTP错误! 状态码: ${response.status}`);
}
return response.json();
})
.then(data => {
if (data.code !== 200) {
throw new Error(data.msg || 'API返回非成功状态');
}
if (!data.src_github || !data.src_mirror || !data.version) {
throw new Error('下载链接或版本信息缺失');
}
githubLink.href = data.src_github;
githubLink.textContent = `GitHub下载 (v${data.version})`;
mirrorLink.href = data.src_mirror;
mirrorLink.textContent = `镜像站下载 (v${data.version})`;
versionInfo.textContent = `当前版本: ${data.version} | 检测更新时间: ${data.update_time }`;
})
.catch(error => {
console.error('获取下载链接失败:', error);
githubLink.textContent = "GitHub下载 (获取失败)";
githubLink.style.color = "red";
mirrorLink.textContent = "镜像站下载 (获取失败)";
mirrorLink.style.color = "red";
versionInfo.textContent = `错误: ${error.message}`;
versionInfo.style.color = 'red';
});
});
</script>
</body>
</html>