测试自建 Git 服务首次提交
This commit is contained in:
commit
3a8248c13c
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
*.log
|
||||
.idea/
|
||||
.vscode/
|
||||
17
README.md
Normal file
17
README.md
Normal file
@ -0,0 +1,17 @@
|
||||
# 自建 Git 服务提交测试
|
||||
|
||||
本仓库用于验证自建 Git 服务的基本功能,包括:
|
||||
|
||||
- HTTP 仓库访问;
|
||||
- Git 提交对象创建;
|
||||
- `main` 分支首次推送;
|
||||
- 中文提交信息传输;
|
||||
- HTML、CSS 和 JavaScript 文件同步。
|
||||
|
||||
## 本地预览
|
||||
|
||||
直接使用浏览器打开 `index.html` 即可查看测试页面。
|
||||
|
||||
## 测试日期
|
||||
|
||||
2026 年 8 月 26 日。
|
||||
9
app.js
Normal file
9
app.js
Normal file
@ -0,0 +1,9 @@
|
||||
const testButton = document.querySelector("#testButton");
|
||||
const testResult = document.querySelector("#testResult");
|
||||
|
||||
testButton.addEventListener("click", () => {
|
||||
const testTime = new Date().toLocaleString("zh-CN", { hour12: false });
|
||||
|
||||
testResult.textContent = `页面测试成功:${testTime}`;
|
||||
testResult.classList.add("is-success");
|
||||
});
|
||||
21
index.html
Normal file
21
index.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>自建 Git 服务测试</title>
|
||||
<link rel="stylesheet" href="styles.css" />
|
||||
</head>
|
||||
<body>
|
||||
<main class="test-card">
|
||||
<p class="eyebrow">连接状态检查</p>
|
||||
<h1>自建 Git 服务测试</h1>
|
||||
<p class="description">
|
||||
如果这个页面能够从仓库正常获取,说明测试文件已经成功推送。
|
||||
</p>
|
||||
<button id="testButton" type="button">运行页面测试</button>
|
||||
<p id="testResult" class="result" aria-live="polite">等待测试</p>
|
||||
</main>
|
||||
<script src="app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
70
styles.css
Normal file
70
styles.css
Normal file
@ -0,0 +1,70 @@
|
||||
:root {
|
||||
color-scheme: light;
|
||||
font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
|
||||
color: #172033;
|
||||
background: #eef3f8;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.test-card {
|
||||
width: min(100%, 560px);
|
||||
padding: 40px;
|
||||
border: 1px solid #d8e1ec;
|
||||
border-radius: 20px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 20px 60px rgb(23 32 51 / 12%);
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
margin: 0 0 12px;
|
||||
color: #2563eb;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
font-size: clamp(30px, 6vw, 44px);
|
||||
}
|
||||
|
||||
.description {
|
||||
margin: 20px 0 28px;
|
||||
color: #526079;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
button {
|
||||
border: 0;
|
||||
border-radius: 10px;
|
||||
padding: 12px 20px;
|
||||
color: #ffffff;
|
||||
background: #2563eb;
|
||||
font: inherit;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background: #1d4ed8;
|
||||
}
|
||||
|
||||
.result {
|
||||
margin: 20px 0 0;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.result.is-success {
|
||||
color: #15803d;
|
||||
font-weight: 700;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user