-
Update index.html
-
🌐 公共聊天大厅.html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HF 公共聊天室</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="chat-box">
<h1>🌐 公共聊天大厅</h1>
<div id="messageList" class="message-list"></div>
<div class="send-area">
<input type="text" id="nameInput" placeholder="输入你的昵称" maxlength="12">
<div class="msg-input-row">
<input type="text" id="msgInput" placeholder="输入聊天内容,按回车发送" maxlength="200">
<button id="sendBtn">发送</button>
</div>
</div>
</div>
<script>
// 读取历史消息
function getMessages() {
const data = localStorage.getItem("hf_chat_msg");
return data ? JSON.parse(data) : [];
}
// 保存消息
function saveMessages(list) {
localStorage.setItem("hf_chat_msg", JSON.stringify(list));
… -
index.html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>HF静态测试网页</title>
<style>
body {
background: linear-gradient(#4facfe, #00f2fe);
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
font-family: 微软雅黑;
}
.card {
background: white;
padding: 50px;
border-radius: 16px;
text-align: center;
}
button {
padding: 10px 25px;
border: none;
background: #0088ff;
color: white;
border-radius: 6px;
cursor: pointer;
}
</style>
</head>
<body>
<div class="card">
<h1>部署成功!静态网页</h1>
<p>这个页面托管在 Hugging Face Spaces</p>
<button onclick="alert('网页正常运行')">点击测试</button>
</div>
</body>
</html> -
initial commit