Skip to content

Commit 766a552

Browse files
committed
update docs
1 parent e41441c commit 766a552

1 file changed

Lines changed: 126 additions & 38 deletions

File tree

docs/.vuepress/components/AiNeuralBadge.vue

Lines changed: 126 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const bubbleTexts = [
1616
"fba skills 已发布,AI 赋能,效率倍增 ⚡",
1717
"Hello!我是 fba 小助手,嘻嘻 😺",
1818
"fba + AI = 无限可能 💪",
19-
"有问题?查看文档或加入社区 💬",
19+
"有问题?查看文档或加入社区吧 💬",
2020
"感谢使用 FastAPI Best Architecture ❤️",
2121
]
2222
@@ -51,10 +51,10 @@ function handleClick() {
5151
typeText(currentFullText.value)
5252
}, 100)
5353
54-
// 重置跳跃动画
54+
// 重置动画
5555
setTimeout(() => {
5656
isClicked.value = false
57-
}, 600)
57+
}, 800)
5858
}
5959
6060
function checkHome() {
@@ -145,10 +145,11 @@ watch(() => route.path, () => {
145145
<animate attributeName="cx" values="32;34;32;30;32" dur="4s" repeatCount="indefinite" />
146146
</circle>
147147
<circle cx="34" cy="32" r="1.5" fill="#fff" />
148-
<!-- 眨眼 -->
149-
<ellipse cx="32" cy="34" rx="7" ry="8" fill="url(#face-grad)">
150-
<animate attributeName="ry" values="0;0;0;0;0;0;0;0;8;0;0;0" dur="3s" repeatCount="indefinite" />
151-
</ellipse>
148+
<!-- 笑眼遮罩 -->
149+
<ellipse class="eye-lid" cx="32" cy="34" rx="7" ry="8" fill="url(#face-grad)" />
150+
<!-- 笑眼 ◡ -->
151+
<path class="happy-eye" d="M26 32 Q32 40 38 32" stroke="#1e1b4b" stroke-width="2.5" fill="none"
152+
stroke-linecap="round" />
152153
</g>
153154

154155
<!-- 右眼 -->
@@ -158,15 +159,16 @@ watch(() => route.path, () => {
158159
<animate attributeName="cx" values="48;50;48;46;48" dur="4s" repeatCount="indefinite" />
159160
</circle>
160161
<circle cx="50" cy="32" r="1.5" fill="#fff" />
161-
<!-- 眨眼 -->
162-
<ellipse cx="48" cy="34" rx="7" ry="8" fill="url(#face-grad)">
163-
<animate attributeName="ry" values="0;0;0;0;0;0;0;0;8;0;0;0" dur="3s" repeatCount="indefinite" />
164-
</ellipse>
162+
<!-- 笑眼遮罩 -->
163+
<ellipse class="eye-lid" cx="48" cy="34" rx="7" ry="8" fill="url(#face-grad)" />
164+
<!-- 笑眼 ◡ -->
165+
<path class="happy-eye" d="M42 32 Q48 40 54 32" stroke="#1e1b4b" stroke-width="2.5" fill="none"
166+
stroke-linecap="round" />
165167
</g>
166168

167169
<!-- 腮红 -->
168-
<ellipse cx="22" cy="42" rx="5" ry="3" fill="#fda4af" opacity="0.6" />
169-
<ellipse cx="58" cy="42" rx="5" ry="3" fill="#fda4af" opacity="0.6" />
170+
<ellipse class="blush blush-left" cx="22" cy="42" rx="5" ry="3" fill="#fda4af" opacity="0.6" />
171+
<ellipse class="blush blush-right" cx="58" cy="42" rx="5" ry="3" fill="#fda4af" opacity="0.6" />
170172

171173
<!-- 嘴巴 -->
172174
<path d="M32 46 Q40 54 48 46" stroke="#7c3aed" stroke-width="3" fill="none" stroke-linecap="round">
@@ -252,9 +254,117 @@ watch(() => route.path, () => {
252254
transform: scale(1.1);
253255
}
254256
255-
/* 点击动画 */
256-
.ai-float-bot.is-clicked .ai-robot {
257-
animation: click-jump 0.6s ease;
257+
/* 眼睛遮罩默认隐藏 */
258+
.eye-lid {
259+
transform-origin: center;
260+
transform: scaleY(0);
261+
}
262+
263+
/* 笑眼弧线默认隐藏 */
264+
.happy-eye {
265+
opacity: 0;
266+
}
267+
268+
/* 点击时显示笑眼 */
269+
.ai-float-bot.is-clicked .eye-lid {
270+
animation: smile-lid 0.8s ease forwards;
271+
}
272+
273+
.ai-float-bot.is-clicked .happy-eye {
274+
animation: smile-eye 0.8s ease forwards;
275+
}
276+
277+
/* 点击时腮红变红变大 */
278+
.ai-float-bot.is-clicked .blush {
279+
animation: blush-glow 0.8s ease forwards;
280+
}
281+
282+
/* 遮罩动画 - 盖住原来的眼睛 */
283+
@keyframes smile-lid {
284+
0% {
285+
transform: scaleY(0);
286+
}
287+
15%, 85% {
288+
transform: scaleY(1);
289+
}
290+
100% {
291+
transform: scaleY(0);
292+
}
293+
}
294+
295+
/* 笑眼弧线淡入淡出 */
296+
@keyframes smile-eye {
297+
0% {
298+
opacity: 0;
299+
}
300+
15%, 85% {
301+
opacity: 1;
302+
}
303+
100% {
304+
opacity: 0;
305+
}
306+
}
307+
308+
/* 腮红默认状态 */
309+
.blush {
310+
transform-origin: center;
311+
}
312+
313+
/* 腮红变亮动画 */
314+
@keyframes blush-glow {
315+
0%, 100% {
316+
opacity: 0.6;
317+
transform: scale(1);
318+
}
319+
20%, 70% {
320+
opacity: 1;
321+
transform: scale(1.1);
322+
}
323+
}
324+
325+
.ai-float-bot.is-clicked .right-arm {
326+
animation: click-wave 0.6s ease;
327+
transform-origin: 62px 62px;
328+
}
329+
330+
.ai-float-bot.is-clicked .left-arm {
331+
animation: click-wave-left 0.6s ease;
332+
transform-origin: 18px 62px;
333+
}
334+
335+
/* 右手挥动动画 */
336+
@keyframes click-wave {
337+
0%, 100% {
338+
transform: rotate(0deg);
339+
}
340+
20% {
341+
transform: rotate(-40deg);
342+
}
343+
40% {
344+
transform: rotate(10deg);
345+
}
346+
60% {
347+
transform: rotate(-35deg);
348+
}
349+
80% {
350+
transform: rotate(5deg);
351+
}
352+
}
353+
354+
/* 左手摆动动画 */
355+
@keyframes click-wave-left {
356+
0%, 100% {
357+
transform: rotate(0deg);
358+
}
359+
25% {
360+
transform: rotate(20deg);
361+
}
362+
50% {
363+
transform: rotate(-10deg);
364+
}
365+
75% {
366+
transform: rotate(15deg);
367+
}
258368
}
259369
260370
.ai-float-bot svg {
@@ -365,28 +475,6 @@ watch(() => route.path, () => {
365475
box-shadow: 0 2px 4px rgba(124, 58, 237, 0.15);
366476
}
367477
368-
/* 点击跳跃动画 */
369-
@keyframes click-jump {
370-
0% {
371-
transform: translateY(0) scale(1);
372-
}
373-
20% {
374-
transform: translateY(-20px) scale(1.1);
375-
}
376-
40% {
377-
transform: translateY(0) scale(0.95);
378-
}
379-
60% {
380-
transform: translateY(-10px) scale(1.05);
381-
}
382-
80% {
383-
transform: translateY(0) scale(0.98);
384-
}
385-
100% {
386-
transform: translateY(0) scale(1);
387-
}
388-
}
389-
390478
/* 气泡展开动画 */
391479
@keyframes bubble-expand {
392480
0% {

0 commit comments

Comments
 (0)