Skip to content

Add entry fade-in and animated gradient header #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2025
Merged
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
4 changes: 2 additions & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function App() {
}, [handleGlobalDragEnter, handleGlobalDragOver, handleGlobalDragLeave, handleGlobalDrop]);

return (
<div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 relative">
<div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 relative page-fade-in">
{/* 全页面拖拽覆盖层 */}
{globalDragOver && (
<div
Expand Down Expand Up @@ -263,7 +263,7 @@ function App() {
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
</svg>
</div>
<h1 className="text-lg font-bold text-gray-800">
<h1 className="text-lg font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-blue-600 via-purple-500 to-indigo-600 animate-gradient-slow">
Log Analyzer
</h1>
<button
Expand Down
43 changes: 43 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,46 @@ input[type="checkbox"]:focus {
animation: none !important;
}
}

/* 页面入场动画 */
@keyframes pageFadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}

.page-fade-in {
animation: pageFadeIn 0.5s ease-out;
}

@media (prefers-reduced-motion: reduce) {
.page-fade-in {
animation: none !important;
}
}

/* 渐变文字动画 */
@keyframes gradientShift {
0%, 100% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
}

.animate-gradient-slow {
background-size: 200% 200%;
animation: gradientShift 8s ease infinite;
}

@media (prefers-reduced-motion: reduce) {
.animate-gradient-slow {
animation: none !important;
}
}