From 3a8248c13c4f778ba36713d03e2128a5ebefa2e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=87=AA=E5=BB=BA=20Git=20=E6=B5=8B=E8=AF=95?= Date: Wed, 26 Aug 2026 15:12:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=87=AA=E5=BB=BA=20Git=20?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E9=A6=96=E6=AC=A1=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 5 ++++ README.md | 17 +++++++++++++ app.js | 9 +++++++ index.html | 21 ++++++++++++++++ styles.css | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 122 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 app.js create mode 100644 index.html create mode 100644 styles.css diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c4e821b --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.DS_Store +Thumbs.db +*.log +.idea/ +.vscode/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..fef0a75 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# 自建 Git 服务提交测试 + +本仓库用于验证自建 Git 服务的基本功能,包括: + +- HTTP 仓库访问; +- Git 提交对象创建; +- `main` 分支首次推送; +- 中文提交信息传输; +- HTML、CSS 和 JavaScript 文件同步。 + +## 本地预览 + +直接使用浏览器打开 `index.html` 即可查看测试页面。 + +## 测试日期 + +2026 年 8 月 26 日。 \ No newline at end of file diff --git a/app.js b/app.js new file mode 100644 index 0000000..5aebd9c --- /dev/null +++ b/app.js @@ -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"); +}); \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..e384c37 --- /dev/null +++ b/index.html @@ -0,0 +1,21 @@ + + + + + + 自建 Git 服务测试 + + + +
+

连接状态检查

+

自建 Git 服务测试

+

+ 如果这个页面能够从仓库正常获取,说明测试文件已经成功推送。 +

+ +

等待测试

+
+ + + \ No newline at end of file diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..e7f5cb0 --- /dev/null +++ b/styles.css @@ -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; +} \ No newline at end of file