-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathindex.html
More file actions
429 lines (380 loc) · 12.3 KB
/
Copy pathindex.html
File metadata and controls
429 lines (380 loc) · 12.3 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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hydra 微服务框架 - 官方文档</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary-color: #2563eb;
--primary-dark: #1d4ed8;
--secondary-color: #10b981;
--dark-bg: #0f172a;
--light-bg: #f8fafc;
--text-primary: #1e293b;
--text-secondary: #64748b;
--border-color: #e2e8f0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background: var(--light-bg);
color: var(--text-primary);
line-height: 1.6;
}
/* 导航栏 */
.navbar {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 64px;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-bottom: 1px solid var(--border-color);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 40px;
z-index: 1000;
}
.logo {
display: flex;
align-items: center;
gap: 12px;
font-size: 20px;
font-weight: 700;
color: var(--dark-bg);
}
.logo-icon {
width: 36px;
height: 36px;
background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 18px;
font-weight: bold;
}
.nav-links {
display: flex;
gap: 32px;
list-style: none;
}
.nav-links a {
text-decoration: none;
color: var(--text-secondary);
font-weight: 500;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary-color);
}
.btn {
padding: 10px 24px;
border-radius: 8px;
font-weight: 600;
text-decoration: none;
transition: all 0.3s;
cursor: pointer;
border: none;
}
.btn-primary {
background: var(--primary-color);
color: white;
}
.btn-primary:hover {
background: var(--primary-dark);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
/* Hero区域 */
.hero {
min-height: 100vh;
background: var(--dark-bg);
position: relative;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
padding-top: 64px;
}
.hero::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background:
radial-gradient(ellipse at 20% 80%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
radial-gradient(ellipse at 80% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
}
.hero-content {
text-align: center;
max-width: 900px;
padding: 60px 20px;
position: relative;
z-index: 1;
}
.hero-badge {
display: inline-block;
padding: 8px 16px;
background: rgba(37, 99, 235, 0.2);
border: 1px solid rgba(37, 99, 235, 0.3);
border-radius: 20px;
color: #60a5fa;
font-size: 14px;
font-weight: 500;
margin-bottom: 24px;
}
.hero h1 {
font-size: 72px;
font-weight: 800;
color: white;
line-height: 1.1;
margin-bottom: 24px;
letter-spacing: -2px;
}
.hero h1 span {
background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.hero p {
font-size: 20px;
color: #94a3b8;
max-width: 700px;
margin: 0 auto 40px;
line-height: 1.8;
}
.hero-buttons {
display: flex;
gap: 16px;
justify-content: center;
margin-bottom: 60px;
}
.btn-large {
padding: 16px 40px;
font-size: 18px;
border-radius: 12px;
}
.btn-outline {
background: transparent;
border: 2px solid rgba(255, 255, 255, 0.2);
color: white;
}
.btn-outline:hover {
border-color: rgba(255, 255, 255, 0.4);
background: rgba(255, 255, 255, 0.05);
}
/* 特性卡片 */
.features {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 24px;
margin-top: 60px;
}
.feature-card {
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 16px;
padding: 32px;
text-align: left;
transition: all 0.3s;
}
.feature-card:hover {
transform: translateY(-4px);
background: rgba(255, 255, 255, 0.08);
border-color: rgba(255, 255, 255, 0.2);
}
.feature-icon {
width: 48px;
height: 48px;
background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 16px;
font-size: 24px;
}
.feature-card h3 {
color: white;
font-size: 18px;
margin-bottom: 8px;
}
.feature-card p {
color: #94a3b8;
font-size: 14px;
margin: 0;
}
/* 统计区域 */
.stats {
display: flex;
justify-content: center;
gap: 60px;
margin-top: 80px;
padding-top: 60px;
border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.stat-item {
text-align: center;
}
.stat-number {
font-size: 48px;
font-weight: 800;
color: white;
display: block;
}
.stat-label {
color: #94a3b8;
font-size: 14px;
}
/* 底部 */
.footer {
background: var(--dark-bg);
border-top: 1px solid rgba(255, 255, 255, 0.1);
padding: 40px;
text-align: center;
color: #64748b;
font-size: 14px;
}
/* 响应式 */
@media (max-width: 1024px) {
.features {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 768px) {
.hero h1 {
font-size: 42px;
}
.nav-links {
display: none;
}
.features {
grid-template-columns: 1fr;
}
.stats {
flex-direction: column;
gap: 30px;
}
.hero-buttons {
flex-direction: column;
align-items: center;
}
}
/* 动画 */
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}
.logo-icon {
animation: float 3s ease-in-out infinite;
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.hero-content > * {
animation: fadeInUp 0.6s ease-out forwards;
opacity: 0;
}
.hero-badge { animation-delay: 0.1s; }
.hero h1 { animation-delay: 0.2s; }
.hero p { animation-delay: 0.3s; }
.hero-buttons { animation-delay: 0.4s; }
.features { animation-delay: 0.5s; }
</style>
</head>
<body>
<!-- 导航栏 -->
<nav class="navbar">
<div class="logo">
<div class="logo-icon">H</div>
<span>Hydra</span>
</div>
<ul class="nav-links">
<li><a href="#features">特性</a></li>
<li><a href="#docs">文档</a></li>
<li><a href="https://github.com/micro-plat/hydra" target="_blank">GitHub</a></li>
</ul>
<a href="reader.html" class="btn btn-primary">开始使用</a>
</nav>
<!-- Hero区域 -->
<section class="hero">
<div class="hero-content">
<div class="hero-badge">Golang 微服务框架</div>
<h1>构建高性能<br><span>微服务应用</span></h1>
<p>Hydra 是基于 Golang 实现的微服务容器框架,支持 API、Web、WebSocket、RPC、定时任务、消息消费六类服务,提供配置管理、服务注册发现、监控追踪等完整解决方案。</p>
<div class="hero-buttons">
<a href="reader.html" class="btn btn-primary btn-large">阅读文档 →</a>
<a href="https://github.com/micro-plat/hydra" target="_blank" class="btn btn-outline btn-large">GitHub</a>
</div>
<div class="features">
<div class="feature-card">
<div class="feature-icon">🚀</div>
<h3>高性能</h3>
<p>基于时间轮算法的高效任务调度,gRPC 协议的高性能 RPC 通信</p>
</div>
<div class="feature-card">
<div class="feature-icon">⚙️</div>
<h3>零配置</h3>
<p>配置中心统一管理,支持热更新,无须手动重启服务</p>
</div>
<div class="feature-card">
<div class="feature-icon">🔒</div>
<h3>安全可靠</h3>
<p>支持 JWT、Basic、API Key 等认证,支持限流、熔断、降级</p>
</div>
<div class="feature-card">
<div class="feature-icon">📊</div>
<h3>监控完善</h3>
<p>业务监控上报 InfluxDB,链路追踪支持 Skywalking</p>
</div>
<div class="feature-card">
<div class="feature-icon">🌐</div>
<h3>多服务类型</h3>
<p>API、Web、WebSocket、RPC、定时任务、消息消费,一站式开发</p>
</div>
<div class="feature-card">
<div class="feature-icon">🔌</div>
<h3>丰富组件</h3>
<p>内置 Redis、数据库、MQTT、分布式锁等常用组件</p>
</div>
</div>
<div class="stats">
<div class="stat-item">
<span class="stat-number">50+</span>
<span class="stat-label">生产项目</span>
</div>
<div class="stat-item">
<span class="stat-number">6</span>
<span class="stat-label">服务类型</span>
</div>
<div class="stat-item">
<span class="stat-number">3</span>
<span class="stat-label">平台支持</span>
</div>
</div>
</div>
</section>
<footer class="footer">
<p>© 2024 Hydra 微服务框架. 基于 MIT 许可证开源.</p>
</footer>
</body>
</html>