embykeeper / index.html
embykeeper's picture
Create index.html
edd5f3e verified
raw
history blame
1.9 kB
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>重定向提示</title>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
background-color: #f5f5f5;
}
.container {
text-align: center;
padding: 20px;
background-color: white;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.url {
margin: 20px 0;
padding: 10px;
background-color: #f0f0f0;
border-radius: 4px;
cursor: pointer;
}
.copied {
color: #4CAF50;
display: none;
margin-top: 10px;
}
</style>
</head>
<body>
<div class="container">
<p>由于该存储库已被限制, 请转到以下URL重新部署:</p>
<div class="url" id="copyUrl">https://huggingface.co/spaces/embykeeper/ek</div>
<div class="copied" id="copiedMessage">已复制</div>
</div>
<script>
const urlElement = document.getElementById('copyUrl');
const copiedMessage = document.getElementById('copiedMessage');
urlElement.addEventListener('click', async () => {
try {
await navigator.clipboard.writeText(urlElement.textContent);
copiedMessage.style.display = 'block';
setTimeout(() => {
copiedMessage.style.display = 'none';
}, 2000);
} catch (err) {
console.error('复制失败:', err);
}
});
</script>
</body>
</html>