Initial commit: Card & Value Explorer (React/Vite) with AE, MFL, SDG icon filtering, floating card layout, and focus overlay

This commit is contained in:
2026-05-12 06:12:47 +02:00
parent 45fed06ec9
commit 32fa8f5b4e
128 changed files with 8155 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
const CARD_IMG: (string | null)[] = [
null,
"1-Gift-of-Water-Action.png","2-Grow-Greens-Action.png","3-Fine-Dining-Compost-Dish-Action.png",
"4-Buzzing-with-Wisdom-Action.png","5-Baking-Flatbread.png","6-Mixed-Wastemonster-Action.png",
"7-Ingredient-Detective-Action.png","8-Mindful-Eating-Action.png","9-Fermentastic-Action.png",
"10 - Tree Planter.png","11 - Seed Scout.png","12 - Natural Spritz.png",
"13 - Dashboard Designer.png","14 - Onion Bodyguard.png","15 - Local Investor.png",
"16 - Poster Designer.png","17 - Change-Maker.png","18 - Waste Remover.png",
"19 - Manure Maker.png","20 - Mixed Garden.png","21 - Ash Bug Blaster.png",
"22 - Dry & Store.png","23 - Seed Distributor.png","24 - River Cleaners.png",
"25 - Garden Documenter.png","26 - Local Variety Guardian.png","27 - Nature Regenerator.png",
"28 - Biodiversity Steward.png","29 - Land Negotiator.png","30-TJD-Booster-Action.png",
"31 - Kitchen Garden.png","32 - Balanced Plate Builder.png","33 - Indigenous Tree Lover.png",
"34 - Cover Crop Protector.png","35 - Local Food Producer.png","36 - Market Price Checker.png",
"37 - Community Meeting.png","38 - Jar Farm Product Marketer.png","39 - Food Donation Hero.png",
"40 - Windbreak Warrior.png","41 - Seed Champion.png","42 - Fruit & Tree Team.png",
"43 - Manure Cycle Drawer.png","44 - Animal Hero.png","45 - Land Magic.png",
"46 - Local Chicken Lover.png","47 - Food Dryer Explorer.png","48 - Scrap-tastic Animal Feeder.png",
"49 - Leftover Chef.png","50 - Weather Tracker Checker.png","51 - Farm Record Keeper.png",
"52 - The Water Fertilizers.png","53 - Small Farm, Big Voice.png","54 - Nature Educator.png",
"55 - Teamwork Harvest.png","56 - Sky Garden.png","57-Be-the-Change-Action.png",
"58-Ancient-Wisdom-Defender-Action.png","59-Seedling-Protector-Action.png","60-Cooperative-Builder-Action.png",
];
export function getCardImagePath(cardId: number): string {
const filename = CARD_IMG[cardId];
if (!filename) return '';
return `/cards/${encodeURI(filename)}`;
}
+20
View File
@@ -0,0 +1,20 @@
import type { ValueSet } from '../types';
const SET_DIR: Record<ValueSet, string> = {
ae: 'AE SVG',
mfl: 'MFL',
sdg: 'SDG',
};
const SET_EXT: Record<ValueSet, string> = {
ae: 'svg',
mfl: 'png',
sdg: 'png',
};
export function getIconPath(set: ValueSet, n: number): string {
if (set === 'sdg' && n === 10) return `/icons/SDG/sdg-10.png`;
const dir = SET_DIR[set];
const ext = SET_EXT[set];
return `/icons/${dir}/${set.toUpperCase()}-${n}.${ext}`;
}
+50
View File
@@ -0,0 +1,50 @@
export const AE_LABELS: Record<number, string> = {
1: 'Recycling',
2: 'Input reduction',
3: 'Soil health',
4: 'Animal health',
5: 'Biodiversity',
6: 'Synergy',
7: 'Economic diversification',
8: 'Co-creation of knowledge',
9: 'Social values & diets',
10: 'Fairness',
11: 'Connectivity',
12: 'Land & natural governance',
13: 'Participation',
};
export const MFL_LABELS: Record<number, string> = {
1: 'Conservation',
2: 'Production',
3: 'Consumption',
4: 'Trees',
5: 'Water',
6: 'Seeds',
7: 'Ecosystems',
8: 'Markets',
9: 'Waste',
10: 'Data',
11: 'Governance',
12: 'Education',
};
export const SDG_LABELS: Record<number, string> = {
1: 'No poverty',
2: 'Zero hunger',
3: 'Good health',
4: 'Quality education',
5: 'Gender equality',
6: 'Clean water',
7: 'Clean energy',
8: 'Decent work',
9: 'Industry & innovation',
10: 'Reduced inequalities',
11: 'Sustainable cities',
12: 'Responsible consumption',
13: 'Climate action',
14: 'Life below water',
15: 'Life on land',
16: 'Peace & justice',
17: 'Partnerships',
};