feat: Add animations

This commit is contained in:
2025-11-20 23:37:48 +11:00
parent 994b5bc5bf
commit adfa0fd4a0
2 changed files with 73 additions and 18 deletions

View File

@@ -100,6 +100,8 @@ main {
box-shadow: var(--glass-shadow);
border: 1px solid var(--card-border);
transition: transform 0.2s ease, box-shadow 0.2s ease;
animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
opacity: 0; /* Start hidden for animation */
}
.card:hover {
@@ -254,6 +256,7 @@ main {
border-radius: 8px;
margin-bottom: 0.75rem;
transition: border-color 0.2s ease;
animation: staggerFade 0.4s ease forwards;
}
.tx-item:hover {
@@ -474,18 +477,21 @@ main {
cursor: pointer;
font-size: 0.95rem;
font-weight: 500;
transition: all 0.2s ease;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
overflow: hidden;
}
.tab-btn:hover {
color: var(--text-primary);
background: rgba(255, 255, 255, 0.05);
background: rgba(255, 255, 255, 0.08);
}
.tab-btn.active {
background: var(--primary-gradient);
color: #ffffff;
box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
transform: translateY(-1px);
}
.tab-content {
@@ -525,8 +531,8 @@ main {
.search-box input:focus {
outline: none;
border-color: var(--accent-color);
box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
background: rgba(15, 23, 42, 0.8);
box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15), 0 0 20px rgba(139, 92, 246, 0.2);
background: rgba(15, 23, 42, 0.9);
}
.search-box input::placeholder {
@@ -701,3 +707,52 @@ a:hover {
color: var(--text-secondary);
font-style: italic;
}
/* New Animations */
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes staggerFade {
from {
opacity: 0;
transform: translateX(-10px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
/* Apply animations */
.card {
animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
opacity: 0; /* Start hidden for animation */
}
.search-section .card {
animation-delay: 0.1s;
}
.status-section .card:nth-child(1) {
animation-delay: 0.2s;
}
.status-section .card:nth-child(2) {
animation-delay: 0.3s;
}
.additional-section .card {
animation-delay: 0.4s;
}
.tx-item {
animation: staggerFade 0.4s ease forwards;
}

View File

@@ -41,19 +41,6 @@
</header>
<main class="container">
<!-- Status Cards -->
<section class="status-section">
<div class="card status-card">
<h3>Chain Info</h3>
<div id="chain-status" class="status-content">Loading...</div>
</div>
<div class="card status-card">
<h3>Mempool</h3>
<div id="mempool-status" class="status-content">Loading...</div>
<div id="mempool-txs" class="mempool-txs-container"></div>
</div>
</section>
<!-- Search Section -->
<section class="search-section">
<div class="card">
@@ -111,6 +98,19 @@
</div>
</section>
<!-- Status Cards -->
<section class="status-section">
<div class="card status-card">
<h3>Chain Info</h3>
<div id="chain-status" class="status-content">Loading...</div>
</div>
<div class="card status-card">
<h3>Mempool</h3>
<div id="mempool-status" class="status-content">Loading...</div>
<div id="mempool-txs" class="mempool-txs-container"></div>
</div>
</section>
<!-- Coin Lookup -->
<section class="additional-section">
<div class="card">