Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions tutorial-demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Git 教程演示项目

这个目录配合三集中文视频教程使用:

1. 使用 Commit 保存和恢复代码版本。
2. 使用不同 Branch 隔离不同功能。
3. 使用 Pull Request 把稳定代码合并到 `main`。

## 运行

直接用浏览器打开 `index.html`。

也可以在目录中启动一个本地服务器:

```powershell
python -m http.server 8000
```

然后访问 `http://localhost:8000`。

## 安全工作流

```text
修改前看状态
修改后看 Diff
验证通过再 Commit
功能分支先走 PR
稳定代码才进 main
```

34 changes: 34 additions & 0 deletions tutorial-demo/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>AI 项目控制台</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<main class="dashboard">
<p class="eyebrow">LEARN GIT</p>
<h1>AI 项目控制台</h1>
<p class="summary">先保存可用版本,再让 AI 继续修改。</p>

<section class="status-card">
<span class="status-dot" aria-hidden="true"></span>
<div>
<strong>当前状态:稳定</strong>
<p>基础页面已经通过人工检查。</p>
</div>
</section>

<section class="rules">
<h2>三个固定动作</h2>
<ol>
<li>修改前查看状态</li>
<li>修改后检查 Diff</li>
<li>验证通过再 Commit</li>
</ol>
</section>
</main>
</body>
</html>

80 changes: 80 additions & 0 deletions tutorial-demo/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
:root {
color-scheme: light;
font-family:
Inter, "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont,
"Segoe UI", sans-serif;
background: #f6f2e9;
color: #171717;
}

* {
box-sizing: border-box;
}

body {
min-height: 100vh;
margin: 0;
display: grid;
place-items: center;
padding: 24px;
}

.dashboard {
width: min(680px, 100%);
padding: 48px;
border: 2px solid #171717;
border-radius: 28px;
background: #fffdf8;
box-shadow: 12px 12px 0 #ff5a5f;
}

.eyebrow {
margin: 0 0 12px;
color: #d83a40;
font-weight: 800;
letter-spacing: 0.16em;
}

h1 {
margin: 0;
font-size: clamp(36px, 8vw, 72px);
line-height: 1;
}

.summary {
margin: 20px 0 32px;
font-size: 20px;
line-height: 1.7;
}

.status-card {
display: flex;
gap: 14px;
align-items: flex-start;
padding: 20px;
border-radius: 18px;
background: #e7f6ee;
}

.status-card p {
margin: 6px 0 0;
}

.status-dot {
width: 14px;
height: 14px;
margin-top: 5px;
border-radius: 50%;
background: #198754;
box-shadow: 0 0 0 6px rgb(25 135 84 / 14%);
}

.rules {
margin-top: 32px;
}

.rules li {
margin: 10px 0;
padding-left: 6px;
}