Skip to content

Commit cfaf3c9

Browse files
committed
add data explorers to services
1 parent 698fcbf commit cfaf3c9

8 files changed

Lines changed: 68 additions & 11 deletions

File tree

src/data/cv.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9252,7 +9252,9 @@
92529252
"startDate": "2025-12-01",
92539253
"endDate": "",
92549254
"description": "OpenLobbying collects, cleans and standardises UK lobbying registers so you can explore how corporations shape policy.",
9255-
"url": "https://openlobbying.org/"
9255+
"url": "https://openlobbying.org/",
9256+
"category": "data-explorer",
9257+
"img": "openlobbying.gif"
92569258
},
92579259
{
92589260
"name": "OpenMoney.md",
@@ -9262,7 +9264,9 @@
92629264
"highlights": [
92639265
"Open data platform for transparency in Moldova"
92649266
],
9265-
"url": "https://openmoney.md/"
9267+
"url": "https://openmoney.md/",
9268+
"category": "data-explorer",
9269+
"img": "openmoney.gif"
92669270
},
92679271
{
92689272
"name": "Augmenta",

src/data/img/openlobbying.gif

1.09 MB
Loading

src/data/img/openmoney.gif

517 KB
Loading

src/lib/components/sections/home/HomeWork.svelte

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
category: "interactive";
2727
img?: string;
2828
};
29+
type Project = (typeof cvData.projects)[number];
30+
type DataExplorerProject = Project & {
31+
category: "data-explorer";
32+
img?: string;
33+
};
2934
type ImageModule = { default: string };
3035
3136
const articleImages = import.meta.glob("../../../../data/img/*", {
@@ -40,6 +45,10 @@
4045
(publication): publication is InteractivePublication =>
4146
publication.category === "interactive",
4247
);
48+
const dataExplorers = cvData.projects.filter(
49+
(project): project is DataExplorerProject =>
50+
project.category === "data-explorer",
51+
);
4352
4453
const getArticleImage = (imageName?: string) =>
4554
imageName ? (articleImages[`../../../../data/img/${imageName}`]?.default ?? "") : "";
@@ -77,6 +86,16 @@
7786
}) satisfies ImageCardData,
7887
),
7988
);
89+
const dataExplorerCards = $derived(
90+
dataExplorers.map(
91+
(project) =>
92+
({
93+
title: project.name,
94+
image: getArticleImage(project.img),
95+
href: project.url,
96+
}) satisfies ImageCardData,
97+
),
98+
);
8099
</script>
81100

82101
<section class="work section-block-tight" id="work">
@@ -98,7 +117,15 @@
98117
<ImageCard {card} />
99118
{/each}
100119

101-
<ServiceCard card={serviceCards[2]} />
120+
<ServiceCard card={serviceCards[3]} />
121+
122+
<div class="span-2">
123+
<ServiceCard card={serviceCards[2]} large />
124+
</div>
125+
126+
{#each dataExplorerCards as card}
127+
<ImageCard {card} />
128+
{/each}
102129
</div>
103130
</div>
104131
</section>

src/lib/components/ui/cards/ServiceCard.svelte

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,30 @@
22
import {
33
ArrowRight,
44
ChartNoAxesCombined,
5+
Database,
56
FileSearch,
67
GraduationCap,
78
} from "@lucide/svelte";
89
import type { ServiceCardData } from "$lib/data/site";
910
import CardShell from "./CardShell.svelte";
1011
12+
type ServiceCardIcon =
13+
| "file-search"
14+
| "chart-no-axes-combined"
15+
| "database"
16+
| "graduation-cap";
17+
1118
let { card, large = false }: { card: ServiceCardData; large?: boolean } =
1219
$props();
1320
1421
const external = $derived(card.href.startsWith("http"));
22+
const iconComponents = {
23+
"file-search": FileSearch,
24+
"chart-no-axes-combined": ChartNoAxesCombined,
25+
database: Database,
26+
"graduation-cap": GraduationCap,
27+
} satisfies Record<ServiceCardIcon, typeof FileSearch>;
28+
const Icon = $derived(iconComponents[card.icon as ServiceCardIcon]);
1529
</script>
1630

1731
<CardShell
@@ -24,13 +38,7 @@
2438
>
2539
<div class="content">
2640
<div>
27-
{#if card.icon === "file-search"}
28-
<FileSearch size={36} class="icon" />
29-
{:else if card.icon === "chart-no-axes-combined"}
30-
<ChartNoAxesCombined size={36} class="icon" />
31-
{:else}
32-
<GraduationCap size={36} class="icon" />
33-
{/if}
41+
<Icon size={36} class="icon" />
3442
<h3>{card.title}</h3>
3543
<p>{card.description}</p>
3644
</div>

src/lib/data/site.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ export type NavItem = {
88
export type ServiceCardData = {
99
title: string;
1010
description: string;
11-
icon: "file-search" | "chart-no-axes-combined" | "graduation-cap";
11+
icon:
12+
| "file-search"
13+
| "chart-no-axes-combined"
14+
| "database"
15+
| "graduation-cap";
1216
href: string;
1317
variant?: "accent";
1418
label?: string;

src/lib/i18n/messages/en.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ export const enMessages: LocaleMessages = {
7373
icon: "chart-no-axes-combined",
7474
cta: "Let's talk about your vision",
7575
},
76+
{
77+
title: "Data explorers",
78+
description:
79+
"Searchable databases and public-interest lookup tools that turn messy records into something people can actually use.",
80+
icon: "database",
81+
cta: "Plan a data product",
82+
},
7683
{
7784
title: "Training",
7885
description:

src/lib/i18n/messages/ro.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ export const roMessages: LocaleMessages = {
7474
icon: "chart-no-axes-combined",
7575
cta: "Hai sa discutam despre viziunea ta",
7676
},
77+
{
78+
title: "Exploratoare de date",
79+
description:
80+
"Baze de date cautabile si instrumente de consultare de interes public care transforma registre haotice in produse utile.",
81+
icon: "database",
82+
cta: "Planifica un produs de date",
83+
},
7784
{
7885
title: "Training",
7986
description:

0 commit comments

Comments
 (0)