feat: add skeleton loaders to marketplace and integrate global header across docs
Marketplace: - Add skeleton loading states for stats grid and GPU offer cards - Show animated skeleton placeholders during data fetch - Add skeleton CSS with shimmer animation and dark mode support - Wrap stats section in #stats-grid container for skeleton injection Trade Exchange: - Replace inline header with data-global-header component - Switch GPU offers to production API (/api/miners/list) - Add fallback to demo
This commit is contained in:
217
assets/css/site-header.css
Normal file
217
assets/css/site-header.css
Normal file
@@ -0,0 +1,217 @@
|
||||
:root {
|
||||
--global-header-bg: rgba(255, 255, 255, 0.95);
|
||||
--global-header-border: rgba(15, 23, 42, 0.08);
|
||||
--global-header-text: #111827;
|
||||
--global-header-muted: #6b7280;
|
||||
--global-header-pill: rgba(37, 99, 235, 0.07);
|
||||
--global-header-pill-hover: rgba(37, 99, 235, 0.15);
|
||||
--global-header-accent: #2563eb;
|
||||
--global-header-cta-text: #fff;
|
||||
}
|
||||
|
||||
[data-theme='dark'],
|
||||
body.dark {
|
||||
--global-header-bg: rgba(15, 23, 42, 0.92);
|
||||
--global-header-border: rgba(148, 163, 184, 0.2);
|
||||
--global-header-text: #f3f4f6;
|
||||
--global-header-muted: #94a3b8;
|
||||
--global-header-pill: rgba(59, 130, 246, 0.15);
|
||||
--global-header-pill-hover: rgba(59, 130, 246, 0.25);
|
||||
--global-header-accent: #60a5fa;
|
||||
--global-header-cta-text: #0f172a;
|
||||
}
|
||||
|
||||
body.light {
|
||||
--global-header-bg: rgba(255, 255, 255, 0.97);
|
||||
--global-header-border: rgba(15, 23, 42, 0.08);
|
||||
--global-header-text: #111827;
|
||||
--global-header-muted: #6b7280;
|
||||
--global-header-pill: rgba(37, 99, 235, 0.07);
|
||||
--global-header-pill-hover: rgba(37, 99, 235, 0.15);
|
||||
--global-header-accent: #2563eb;
|
||||
--global-header-cta-text: #fff;
|
||||
}
|
||||
|
||||
.global-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
background: var(--global-header-bg);
|
||||
border-bottom: 1px solid var(--global-header-border);
|
||||
backdrop-filter: blur(12px);
|
||||
z-index: 50;
|
||||
}
|
||||
|
||||
.global-header__inner {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 0.85rem 1.25rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1.25rem;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.global-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.85rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.global-brand__icon {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 12px;
|
||||
background: linear-gradient(135deg, #2563eb, #7c3aed);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
font-size: 1.2rem;
|
||||
box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
|
||||
}
|
||||
|
||||
.global-brand__text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: var(--global-header-text);
|
||||
font-weight: 600;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.global-brand__text small {
|
||||
font-weight: 400;
|
||||
font-size: 0.8rem;
|
||||
color: var(--global-header-muted);
|
||||
}
|
||||
|
||||
.global-nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.global-nav__link {
|
||||
text-decoration: none;
|
||||
color: var(--global-header-text);
|
||||
font-size: 0.92rem;
|
||||
font-weight: 500;
|
||||
padding: 0.35rem 0.9rem;
|
||||
border-radius: 999px;
|
||||
background: transparent;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.global-nav__link:hover,
|
||||
.global-nav__link:focus-visible,
|
||||
.global-nav__link.active {
|
||||
background: var(--global-header-pill);
|
||||
color: var(--global-header-accent);
|
||||
}
|
||||
|
||||
.global-nav__cta {
|
||||
text-decoration: none;
|
||||
background: linear-gradient(135deg, #2563eb, #7c3aed);
|
||||
color: var(--global-header-cta-text);
|
||||
font-weight: 600;
|
||||
padding: 0.45rem 1.4rem;
|
||||
border-radius: 999px;
|
||||
box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.global-nav__cta:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 15px 30px rgba(37, 99, 235, 0.3);
|
||||
}
|
||||
|
||||
.global-header__actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.global-dark-toggle {
|
||||
border: 1px solid var(--global-header-border);
|
||||
background: transparent;
|
||||
color: var(--global-header-text);
|
||||
padding: 0.35rem 0.9rem;
|
||||
border-radius: 999px;
|
||||
font-size: 0.9rem;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.global-dark-toggle:hover {
|
||||
border-color: var(--global-header-accent);
|
||||
color: var(--global-header-accent);
|
||||
}
|
||||
|
||||
.global-subnav {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 0 1.25rem 0.75rem;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.global-subnav button,
|
||||
.global-subnav a {
|
||||
border: 1px solid var(--global-header-border);
|
||||
background: var(--global-header-pill);
|
||||
color: var(--global-header-text);
|
||||
padding: 0.4rem 0.95rem;
|
||||
border-radius: 999px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.global-subnav button:hover,
|
||||
.global-subnav a:hover,
|
||||
.global-subnav button.active,
|
||||
.global-subnav a.active {
|
||||
background: var(--global-header-pill-hover);
|
||||
color: var(--global-header-accent);
|
||||
}
|
||||
|
||||
@media (max-width: 960px) {
|
||||
.global-header__inner {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.global-header__actions {
|
||||
width: 100%;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.global-nav {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.global-brand__text span {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.global-nav__cta {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.global-header__actions {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user