2026-01-27 16:21:58 +00:00
|
|
|
---
|
|
|
|
|
import Layout from '../layouts/Layout.astro';
|
|
|
|
|
import { API_BASE as apiBase } from '../lib/api';
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
<Layout title="Dashboard">
|
2026-01-29 12:35:10 +00:00
|
|
|
<section class="ui-page">
|
|
|
|
|
<div class="ui-container">
|
|
|
|
|
<div id="dashboard-content">
|
|
|
|
|
<div class="list-skeleton">
|
|
|
|
|
<div class="skeleton-card"></div>
|
|
|
|
|
<div class="skeleton-card"></div>
|
|
|
|
|
<div class="skeleton-card"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-01-27 16:21:58 +00:00
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
</Layout>
|
|
|
|
|
|
|
|
|
|
<script define:vars={{ apiBase }}>
|
|
|
|
|
const token = localStorage.getItem('token');
|
|
|
|
|
const userStr = localStorage.getItem('user');
|
|
|
|
|
|
|
|
|
|
if (!token || !userStr) {
|
|
|
|
|
window.location.href = '/login';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const user = JSON.parse(userStr || '{}');
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
function escapeHtml(value) {
|
|
|
|
|
return String(value || '').replace(/[&<>"']/g, function(ch) {
|
|
|
|
|
switch (ch) {
|
|
|
|
|
case '&': return '&';
|
|
|
|
|
case '<': return '<';
|
|
|
|
|
case '>': return '>';
|
|
|
|
|
case '"': return '"';
|
|
|
|
|
case "'": return ''';
|
|
|
|
|
default: return ch;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function normalizeStatus(status) {
|
|
|
|
|
const s = String(status || '').toLowerCase();
|
|
|
|
|
if (s === 'draft' || s === 'discussion' || s === 'voting' || s === 'closed') return s;
|
|
|
|
|
return 'draft';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setText(id, value) {
|
|
|
|
|
const el = document.getElementById(id);
|
|
|
|
|
if (el) el.textContent = String(value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setBadge(id, value) {
|
|
|
|
|
const el = document.getElementById(id);
|
|
|
|
|
if (!el) return;
|
|
|
|
|
const str = String(value);
|
|
|
|
|
el.textContent = str;
|
|
|
|
|
el.setAttribute('aria-label', str);
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-27 16:21:58 +00:00
|
|
|
async function loadDashboard() {
|
|
|
|
|
const container = document.getElementById('dashboard-content');
|
|
|
|
|
if (!container) return;
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
const safeName = escapeHtml(user.display_name || user.username || '');
|
|
|
|
|
const safeEmail = escapeHtml(user.email || '');
|
2026-01-27 16:21:58 +00:00
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
container.innerHTML = `
|
|
|
|
|
<div class="hero ui-card ui-card-glass">
|
|
|
|
|
<div class="hero-top">
|
|
|
|
|
<div>
|
|
|
|
|
<h1 class="hero-title">Welcome, ${safeName}!</h1>
|
|
|
|
|
<p class="hero-subtitle">${safeEmail}</p>
|
2026-01-27 16:21:58 +00:00
|
|
|
</div>
|
2026-01-29 12:35:10 +00:00
|
|
|
<div class="hero-actions">
|
|
|
|
|
<a href="/communities" class="ui-btn ui-btn-secondary">Browse</a>
|
|
|
|
|
<a href="/communities/new" class="ui-btn ui-btn-primary">Create Community</a>
|
2026-01-27 16:21:58 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
<div class="hero-kpis">
|
|
|
|
|
<div class="hero-kpis-label">At a glance</div>
|
|
|
|
|
<div class="ui-kpis">
|
|
|
|
|
<div class="ui-kpi">
|
|
|
|
|
<div class="ui-kpi-value" id="kpi-my-communities">—</div>
|
|
|
|
|
<div class="ui-kpi-label">My communities</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ui-kpi">
|
|
|
|
|
<div class="ui-kpi-value" id="kpi-my-proposals">—</div>
|
|
|
|
|
<div class="ui-kpi-label">My proposals</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ui-kpi">
|
|
|
|
|
<div class="ui-kpi-value" id="kpi-recent">—</div>
|
|
|
|
|
<div class="ui-kpi-label">Recent activity</div>
|
|
|
|
|
</div>
|
2026-01-27 16:21:58 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-01-29 12:35:10 +00:00
|
|
|
</div>
|
2026-01-27 16:21:58 +00:00
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
<div class="panels">
|
|
|
|
|
<details class="panel ui-card" open>
|
|
|
|
|
<summary class="panel-summary">
|
|
|
|
|
<span class="panel-title">My Communities</span>
|
|
|
|
|
<span class="panel-meta">
|
|
|
|
|
<span class="ui-badge" id="badge-my-communities">—</span>
|
|
|
|
|
</span>
|
|
|
|
|
</summary>
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
<div id="my-communities" class="panel-content">
|
|
|
|
|
<p class="loading-small">Loading...</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</details>
|
|
|
|
|
|
|
|
|
|
<details class="panel ui-card" open>
|
|
|
|
|
<summary class="panel-summary">
|
|
|
|
|
<span class="panel-title">My Proposals</span>
|
|
|
|
|
<span class="panel-meta">
|
|
|
|
|
<span class="ui-badge" id="badge-my-proposals">—</span>
|
|
|
|
|
</span>
|
|
|
|
|
</summary>
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
<div id="my-proposals" class="panel-content">
|
|
|
|
|
<p class="loading-small">Loading...</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</details>
|
|
|
|
|
|
|
|
|
|
<details class="panel ui-card">
|
|
|
|
|
<summary class="panel-summary">
|
|
|
|
|
<span class="panel-title">Recent Activity</span>
|
|
|
|
|
<span class="panel-meta">
|
|
|
|
|
<span class="ui-badge" id="badge-recent">—</span>
|
|
|
|
|
</span>
|
|
|
|
|
</summary>
|
|
|
|
|
<div class="panel-body">
|
|
|
|
|
<div id="recent-activity" class="panel-content">
|
|
|
|
|
<p class="loading-small">Loading...</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</details>
|
|
|
|
|
|
|
|
|
|
<div class="account ui-card">
|
|
|
|
|
<div class="account-row">
|
|
|
|
|
<div>
|
|
|
|
|
<div class="account-title">Account</div>
|
|
|
|
|
<div class="account-subtitle">Log out of this device</div>
|
|
|
|
|
</div>
|
|
|
|
|
<button id="logout-btn" class="ui-btn ui-btn-danger" type="button">Logout</button>
|
2026-01-27 16:21:58 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
document.getElementById('logout-btn')?.addEventListener('click', () => {
|
|
|
|
|
localStorage.removeItem('token');
|
|
|
|
|
localStorage.removeItem('user');
|
|
|
|
|
window.location.href = '/';
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
loadMyCommunities();
|
|
|
|
|
loadMyProposals();
|
|
|
|
|
loadRecentActivity();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function loadRecentActivity() {
|
|
|
|
|
const container = document.getElementById('recent-activity');
|
|
|
|
|
if (!container) return;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
const res = await fetch(`${apiBase}/api/activity/recent`);
|
|
|
|
|
const activities = await res.json();
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
setText('kpi-recent', activities.length);
|
|
|
|
|
setBadge('badge-recent', activities.length);
|
|
|
|
|
|
2026-01-27 16:21:58 +00:00
|
|
|
if (activities.length === 0) {
|
|
|
|
|
container.innerHTML = '<p class="empty-small">No recent activity</p>';
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
container.innerHTML = activities.slice(0, 7).map((a) => {
|
|
|
|
|
const rawType = String(a.activity_type || 'activity');
|
|
|
|
|
const typeClass = rawType.toLowerCase().replace(/[^a-z0-9_-]/g, '');
|
|
|
|
|
const type = escapeHtml(rawType);
|
|
|
|
|
const safeTitle = escapeHtml(a.title);
|
|
|
|
|
let safeLink = String(a.link || '#');
|
|
|
|
|
if (!safeLink.startsWith('/')) safeLink = '#';
|
|
|
|
|
return `
|
|
|
|
|
<a href="${safeLink}" class="activity-item">
|
|
|
|
|
<span class="activity-type type-${typeClass}">${type}</span>
|
|
|
|
|
<span class="activity-title">${safeTitle}</span>
|
|
|
|
|
</a>
|
|
|
|
|
`;
|
|
|
|
|
}).join('');
|
2026-01-27 16:21:58 +00:00
|
|
|
} catch (e) {
|
|
|
|
|
container.innerHTML = '<p class="error-small">Failed to load</p>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function loadMyProposals() {
|
|
|
|
|
const container = document.getElementById('my-proposals');
|
|
|
|
|
if (!container) return;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
const res = await fetch(`${apiBase}/api/proposals/my`, {
|
|
|
|
|
headers: { 'Authorization': `Bearer ${token}` },
|
|
|
|
|
});
|
|
|
|
|
const proposals = await res.json();
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
setText('kpi-my-proposals', proposals.length);
|
|
|
|
|
setBadge('badge-my-proposals', proposals.length);
|
|
|
|
|
|
2026-01-27 16:21:58 +00:00
|
|
|
if (proposals.length === 0) {
|
|
|
|
|
container.innerHTML = '<p class="empty-small">You haven\'t created any proposals yet</p>';
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
container.innerHTML = proposals.slice(0, 7).map((p) => {
|
|
|
|
|
const safeTitle = escapeHtml(p.title);
|
|
|
|
|
const status = normalizeStatus(p.status);
|
|
|
|
|
return `
|
|
|
|
|
<a href="/proposals/${encodeURIComponent(String(p.id))}" class="list-item">
|
|
|
|
|
<span class="item-title">${safeTitle}</span>
|
|
|
|
|
<span class="item-status status-${status}">${escapeHtml(status)}</span>
|
|
|
|
|
</a>
|
|
|
|
|
`;
|
|
|
|
|
}).join('');
|
2026-01-27 16:21:58 +00:00
|
|
|
} catch (e) {
|
|
|
|
|
container.innerHTML = '<p class="error-small">Failed to load</p>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function loadMyCommunities() {
|
|
|
|
|
const container = document.getElementById('my-communities');
|
|
|
|
|
if (!container) return;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
const res = await fetch(`${apiBase}/api/users/me/communities`, {
|
|
|
|
|
headers: { 'Authorization': `Bearer ${token}` },
|
|
|
|
|
});
|
|
|
|
|
const communities = await res.json();
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
setText('kpi-my-communities', communities.length);
|
|
|
|
|
setBadge('badge-my-communities', communities.length);
|
|
|
|
|
|
2026-01-27 16:21:58 +00:00
|
|
|
if (communities.length === 0) {
|
|
|
|
|
container.innerHTML = `
|
|
|
|
|
<p class="empty-small">You haven't joined any communities yet</p>
|
2026-01-29 12:35:10 +00:00
|
|
|
<a href="/communities" class="browse-link ui-btn ui-btn-secondary">Browse Communities</a>
|
2026-01-27 16:21:58 +00:00
|
|
|
`;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
container.innerHTML = communities.slice(0, 7).map((c) => {
|
|
|
|
|
const safeName = escapeHtml(c.name);
|
|
|
|
|
const safeSlug = encodeURIComponent(String(c.slug || ''));
|
|
|
|
|
return `<a href="/communities/${safeSlug}" class="list-item">${safeName}</a>`;
|
|
|
|
|
}).join('');
|
2026-01-27 16:21:58 +00:00
|
|
|
} catch (e) {
|
|
|
|
|
container.innerHTML = '<p class="error-small">Failed to load</p>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
loadDashboard();
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
2026-01-29 12:35:10 +00:00
|
|
|
.hero {
|
|
|
|
|
padding: 1.25rem;
|
|
|
|
|
margin-bottom: 1rem;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.hero-top {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
gap: 1rem;
|
|
|
|
|
flex-wrap: wrap;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.hero-title {
|
|
|
|
|
margin: 0;
|
|
|
|
|
font-size: 2.125rem;
|
|
|
|
|
letter-spacing: -0.02em;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.hero-subtitle {
|
|
|
|
|
margin: 0.25rem 0 0;
|
2026-01-27 16:21:58 +00:00
|
|
|
color: var(--color-text-muted);
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.hero-actions {
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 0.5rem;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
align-items: center;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.hero-kpis {
|
|
|
|
|
margin-top: 1rem;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.hero-kpis-label {
|
|
|
|
|
color: var(--color-text-muted);
|
|
|
|
|
font-size: 0.8125rem;
|
|
|
|
|
margin-bottom: 0.5rem;
|
|
|
|
|
letter-spacing: 0.02em;
|
|
|
|
|
text-transform: uppercase;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.panels {
|
|
|
|
|
display: grid;
|
|
|
|
|
gap: 1rem;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.panel {
|
|
|
|
|
padding: 0;
|
|
|
|
|
overflow: hidden;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.panel-summary {
|
|
|
|
|
list-style: none;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
padding: 1rem 1.1rem;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
gap: 1rem;
|
|
|
|
|
user-select: none;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.panel-summary::-webkit-details-marker {
|
|
|
|
|
display: none;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.panel-title {
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
letter-spacing: -0.01em;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.panel-body {
|
|
|
|
|
border-top: 1px solid var(--color-border);
|
|
|
|
|
padding: 0.9rem 1.1rem 1.1rem;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.panel-content {
|
|
|
|
|
min-height: 72px;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.list-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
gap: 0.75rem;
|
|
|
|
|
padding: 0.6rem 0;
|
2026-01-27 16:21:58 +00:00
|
|
|
color: var(--color-text);
|
2026-01-29 12:35:10 +00:00
|
|
|
border-bottom: 1px solid var(--color-border);
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
transition: color 140ms ease;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.list-item:last-child {
|
|
|
|
|
border-bottom: none;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.list-item:hover {
|
|
|
|
|
color: var(--color-primary);
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.account {
|
|
|
|
|
padding: 1rem 1.1rem;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.account-row {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
gap: 1rem;
|
|
|
|
|
flex-wrap: wrap;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.account-title {
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
letter-spacing: -0.01em;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
2026-01-29 12:35:10 +00:00
|
|
|
.account-subtitle {
|
2026-01-27 16:21:58 +00:00
|
|
|
color: var(--color-text-muted);
|
2026-01-29 12:35:10 +00:00
|
|
|
font-size: 0.875rem;
|
|
|
|
|
margin-top: 0.15rem;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.loading-small, .empty-small, .error-small {
|
|
|
|
|
color: var(--color-text-muted);
|
|
|
|
|
font-size: 0.875rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.browse-link {
|
|
|
|
|
display: block;
|
|
|
|
|
margin-top: 0.5rem;
|
|
|
|
|
font-size: 0.875rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.activity-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 0.75rem;
|
|
|
|
|
padding: 0.5rem 0;
|
|
|
|
|
border-bottom: 1px solid var(--color-border);
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
color: var(--color-text);
|
2026-01-29 12:35:10 +00:00
|
|
|
transition: color 140ms ease;
|
2026-01-27 16:21:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.activity-item:last-child {
|
|
|
|
|
border-bottom: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.activity-item:hover .activity-title {
|
|
|
|
|
color: var(--color-primary);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.activity-type {
|
|
|
|
|
font-size: 0.625rem;
|
|
|
|
|
padding: 0.125rem 0.5rem;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.type-proposal { background: var(--color-success); color: var(--color-on-primary); }
|
|
|
|
|
.type-community { background: var(--color-secondary); color: var(--color-on-primary); }
|
|
|
|
|
|
|
|
|
|
.activity-title {
|
|
|
|
|
font-size: 0.875rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.item-title {
|
|
|
|
|
flex: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.item-status {
|
|
|
|
|
font-size: 0.625rem;
|
|
|
|
|
padding: 0.125rem 0.5rem;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.status-draft { background: var(--color-neutral-muted); color: var(--color-on-primary); }
|
|
|
|
|
.status-discussion { background: var(--color-info); color: var(--color-on-primary); }
|
|
|
|
|
.status-voting { background: var(--color-success); color: var(--color-on-primary); }
|
|
|
|
|
.status-closed { background: var(--color-neutral); color: var(--color-on-primary); }
|
2026-01-29 12:35:10 +00:00
|
|
|
|
|
|
|
|
.list-skeleton {
|
|
|
|
|
display: grid;
|
|
|
|
|
gap: 1rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.skeleton-card {
|
|
|
|
|
height: 120px;
|
|
|
|
|
border-radius: 14px;
|
|
|
|
|
border: 1px solid var(--color-border);
|
|
|
|
|
background: linear-gradient(
|
|
|
|
|
90deg,
|
|
|
|
|
rgba(255, 255, 255, 0.03) 0%,
|
|
|
|
|
rgba(255, 255, 255, 0.06) 50%,
|
|
|
|
|
rgba(255, 255, 255, 0.03) 100%
|
|
|
|
|
);
|
|
|
|
|
background-size: 200% 100%;
|
|
|
|
|
animation: shimmer 1.2s ease-in-out infinite;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@keyframes shimmer {
|
|
|
|
|
0% { background-position: 0% 0%; }
|
|
|
|
|
100% { background-position: 200% 0%; }
|
|
|
|
|
}
|
2026-01-27 16:21:58 +00:00
|
|
|
</style>
|