Skip to content

Commit 544bee8

Browse files
committed
add stats
1 parent fcb8246 commit 544bee8

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed

src/Providers.svelte

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@
129129
...sorted.filter(e => !priorityOrder.includes(e))
130130
];
131131
}
132+
133+
// Calculate statistics
134+
$: providerCount = providers.length;
135+
$: endpointCount = endpointColumns.length;
136+
$: providerEndpointCount = providers.reduce((total, provider) => {
137+
return total + Object.values(provider.endpoints).filter(supported => supported === true).length;
138+
}, 0);
132139
</script>
133140

134141
<main>
@@ -139,6 +146,26 @@
139146
</div>
140147
</div>
141148

149+
<!-- Statistics Cards -->
150+
{#if !loading}
151+
<div class="stats-section">
152+
<div class="stats-container">
153+
<div class="stat-card">
154+
<div class="stat-value">{providerCount}</div>
155+
<div class="stat-label">Providers</div>
156+
</div>
157+
<div class="stat-card">
158+
<div class="stat-value">{endpointCount}</div>
159+
<div class="stat-label">Unique Endpoints</div>
160+
</div>
161+
<div class="stat-card">
162+
<div class="stat-value">{providerEndpointCount}</div>
163+
<div class="stat-label">Provider + Endpoint Combinations</div>
164+
</div>
165+
</div>
166+
</div>
167+
{/if}
168+
142169
<!-- Search and Filters -->
143170
<div class="search-section">
144171
<div class="filters-row">
@@ -398,6 +425,49 @@
398425
line-height: 1.6;
399426
}
400427
428+
/* Statistics Section */
429+
.stats-section {
430+
max-width: 1400px;
431+
margin: 0 auto 3rem;
432+
padding: 0 2rem;
433+
}
434+
435+
.stats-container {
436+
display: grid;
437+
grid-template-columns: repeat(3, 1fr);
438+
gap: 1.5rem;
439+
}
440+
441+
.stat-card {
442+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
443+
border-radius: 12px;
444+
padding: 2rem;
445+
text-align: center;
446+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
447+
transition: transform 0.2s ease, box-shadow 0.2s ease;
448+
}
449+
450+
.stat-card:hover {
451+
transform: translateY(-2px);
452+
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
453+
}
454+
455+
.stat-value {
456+
font-size: 3rem;
457+
font-weight: 700;
458+
color: #ffffff;
459+
line-height: 1;
460+
margin-bottom: 0.5rem;
461+
}
462+
463+
.stat-label {
464+
font-size: 1rem;
465+
font-weight: 500;
466+
color: rgba(255, 255, 255, 0.9);
467+
text-transform: uppercase;
468+
letter-spacing: 0.05em;
469+
}
470+
401471
/* Search Section */
402472
.search-section {
403473
max-width: 1400px;
@@ -812,6 +882,23 @@
812882
font-size: 1rem;
813883
}
814884
885+
.stats-container {
886+
grid-template-columns: 1fr;
887+
gap: 1rem;
888+
}
889+
890+
.stat-card {
891+
padding: 1.5rem;
892+
}
893+
894+
.stat-value {
895+
font-size: 2.5rem;
896+
}
897+
898+
.stat-label {
899+
font-size: 0.875rem;
900+
}
901+
815902
.view-section {
816903
flex-direction: column;
817904
align-items: stretch;

0 commit comments

Comments
 (0)