Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite2295fa

Browse files
committed
move animation to tailwind
1 parent29e222d commite2295fa

File tree

2 files changed

+13
-27
lines changed

2 files changed

+13
-27
lines changed

‎site/src/modules/tasks/TaskPrompt/TaskPrompt.tsx‎

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -480,35 +480,13 @@ const PromptTextarea: FC<PromptTextareaProps> = ({
480480
/>
481481
{isSubmitting&&(
482482
<divclassName="absolute inset-0 pointer-events-none overflow-hidden">
483-
<divclassName="caret-scanner"/>
483+
<div
484+
className={`absolute top-0 w-0.5 h-full
485+
bg-green-400/90 animate-caret-scan rounded-sm
486+
shadow-[-15px_0_15px_rgba(0,255,0,0.9),-30px_0_30px_rgba(0,255,0,0.7),-45px_0_45px_rgba(0,255,0,0.5),-60px_0_60px_rgba(0,255,0,0.3)]`}
487+
/>
484488
</div>
485489
)}
486-
<style>{`
487-
@keyframes caretScan {
488-
0% {
489-
left: 0%;
490-
}
491-
100% {
492-
left: 100%;
493-
}
494-
}
495-
496-
.caret-scanner {
497-
position: absolute;
498-
width: 2px;
499-
height: 100%;
500-
top: 0;
501-
background-color: rgba(0, 255, 0, 0.8);
502-
border: none;
503-
animation: caretScan 3s ease-in-out infinite;
504-
border-radius: 1px;
505-
box-shadow:
506-
-10px 0 10px rgba(0, 255, 0, 0.8),
507-
-20px 0 20px rgba(0, 255, 0, 0.6),
508-
-30px 0 30px rgba(0, 255, 0, 0.4),
509-
-40px 0 40px rgba(0, 255, 0, 0.2);
510-
}
511-
`}</style>
512490
</div>
513491
);
514492
};

‎site/tailwind.config.js‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ module.exports = {
8383
"75%":{opacity:0.3},
8484
"100%":{opacity:0.2},
8585
},
86+
"caret-scan":{
87+
"0%":{left:"0%"},
88+
"100%":{left:"100%"},
89+
},
90+
},
91+
animation:{
92+
loading:"loading 2s ease-in-out infinite alternate",
93+
"caret-scan":"caret-scan 3s ease-in-out infinite",
8694
},
8795
},
8896
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp