Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
185 lines (164 loc) · 4.62 KB
/
Copy pathindex.html
File metadata and controls
185 lines (164 loc) · 4.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FastAPI 学习笔记</title>
<style>
:root {
color-scheme: light;
--bg: #f6f8fb;
--panel: #ffffff;
--text: #1d2733;
--muted: #647084;
--line: #dce3ed;
--brand: #0f766e;
--brand-soft: #e6f5f3;
--accent: #b45309;
--shadow: 0 18px 45px rgba(24, 39, 75, 0.09);
}
* {
box-sizing: border-box;
}
body {
margin: 0;
min-height: 100vh;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
background: var(--bg);
color: var(--text);
}
main {
width: min(920px, calc(100% - 32px));
margin: 0 auto;
padding: 48px 0;
}
header {
margin-bottom: 28px;
}
.eyebrow {
display: inline-flex;
align-items: center;
min-height: 28px;
padding: 0 10px;
border: 1px solid rgba(15, 118, 110, 0.22);
border-radius: 6px;
background: var(--brand-soft);
color: var(--brand);
font-size: 14px;
font-weight: 700;
}
h1 {
margin: 18px 0 10px;
font-size: clamp(34px, 7vw, 58px);
line-height: 1.05;
letter-spacing: 0;
}
.summary {
max-width: 680px;
margin: 0;
color: var(--muted);
font-size: 17px;
line-height: 1.7;
}
.notes {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 16px;
margin-top: 30px;
}
.note {
display: block;
min-height: 168px;
padding: 20px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel);
color: inherit;
text-decoration: none;
box-shadow: var(--shadow);
transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.note:focus,
.note:hover {
transform: translateY(-3px);
border-color: rgba(15, 118, 110, 0.5);
box-shadow: 0 22px 52px rgba(24, 39, 75, 0.14);
outline: none;
}
.day {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 68px;
min-height: 32px;
border-radius: 6px;
background: #fff7ed;
color: var(--accent);
font-size: 14px;
font-weight: 800;
}
h2 {
margin: 18px 0 8px;
font-size: 22px;
line-height: 1.25;
letter-spacing: 0;
}
.desc {
margin: 0;
color: var(--muted);
font-size: 15px;
line-height: 1.6;
}
@media (max-width: 560px) {
main {
width: min(100% - 24px, 920px);
padding: 28px 0;
}
.note {
min-height: 144px;
}
}
</style>
</head>
<body>
<main>
<header>
<span class="eyebrow">FastAPI Notes</span>
<h1>FastAPI 学习笔记</h1>
<p class="summary">按天整理的 FastAPI 学习页面,适合在手机上快速打开、回看重点代码和当天知识点。</p>
</header>
<section class="notes" aria-label="学习笔记列表">
<a class="note" href="day1-fastapi-notes.html">
<span class="day">Day 1</span>
<h2>项目启动与基础接口</h2>
<p class="desc">回顾 FastAPI 项目入口、运行方式和最基础的接口结构。</p>
</a>
<a class="note" href="day2-fastapi-notes.html">
<span class="day">Day 2</span>
<h2>路由与接口组织</h2>
<p class="desc">梳理接口拆分、路径设计和日常开发里常见的路由写法。</p>
</a>
<a class="note" href="day3-fastapi-notes.html">
<span class="day">Day 3</span>
<h2>路径参数与查询参数</h2>
<p class="desc">对比 path parameter、query parameter,以及校验参数的常见写法。</p>
</a>
<a class="note" href="day4-fastapi-notes.html">
<span class="day">Day 4</span>
<h2>请求体与 Pydantic</h2>
<p class="desc">学习 Request Body、Pydantic 模型、数据校验和创建资源接口。</p>
</a>
<a class="note" href="day6-fastapi-notes.html">
<span class="day">Day 6</span>
<h2>内存版 Todo CRUD</h2>
<p class="desc">整合路径参数、请求体、响应模型、状态码和错误处理,完成 Todo API。</p>
</a>
<a class="note" href="day7-fastapi-notes.html">
<span class="day">Day 7</span>
<h2>复盘和重构</h2>
<p class="desc">整理第一周 Todo API,补充自动文档、README 和接口文档。</p>
</a>
</section>
</main>
</body>
</html>