managarten/memoro/apps/landing/src/components/BlueprintCard.astro
Till-JS e7f5f942f3 chore: initial commit - consolidate 4 projects into monorepo
Projects included:
- maerchenzauber (NestJS backend + Expo mobile + SvelteKit web + Astro landing)
- manacore (Expo mobile + SvelteKit web + Astro landing)
- manadeck (NestJS backend + Expo mobile + SvelteKit web)
- memoro (Expo mobile + SvelteKit web + Astro landing)

This commit preserves the current state before monorepo restructuring.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 23:38:24 +01:00

86 lines
No EOL
2.5 KiB
Text

---
import type { CollectionEntry } from "astro:content";
import { getLangFromUrl } from "../i18n/utils";
interface Props {
title: string;
description: string;
icon: string;
color: string;
href: string;
features?: string[];
compatibility?: string[];
lang?: string;
industry?: string;
showIndustry?: boolean;
}
const { title, description, icon, color, href, features, compatibility, lang, industry, showIndustry = false } = Astro.props;
// Industry labels
const industryLabels: Record<string, Record<string, string>> = {
de: {
office: 'Büro',
construction: 'Handwerk',
education: 'Bildung',
business: 'Business'
},
en: {
office: 'Office',
construction: 'Craft',
education: 'Education',
business: 'Business'
}
};
// Industry colors for pills
const industryColors: Record<string, string> = {
office: 'bg-blue-100 text-blue-700 border-blue-200',
construction: 'bg-orange-100 text-orange-700 border-orange-200',
education: 'bg-purple-100 text-purple-700 border-purple-200',
business: 'bg-red-100 text-red-700 border-red-200'
};
// Extract emoji from title (assumes emoji is at the beginning)
const emojiMatch = title.match(/^(\p{Emoji}+)/u);
const emoji = emojiMatch ? emojiMatch[1] : '📄';
const titleWithoutEmoji = title.replace(/^(\p{Emoji}+)\s*/u, '');
---
<a
href={href}
class="block p-6 rounded-xl bg-background-card border border-border hover:bg-background-cardHover hover:border-border-hover transition-all duration-DEFAULT group relative"
>
<div class="mb-4">
<div class="flex items-start justify-between gap-2">
<h3 class="text-xl font-medium text-text-primary">{title}</h3>
{showIndustry && industry && lang && (
<span class={`inline-flex px-2 py-1 text-xs font-medium rounded-full border ${industryColors[industry] || 'bg-gray-100 text-gray-700 border-gray-200'}`}>
{industryLabels[lang]?.[industry] || industry}
</span>
)}
</div>
</div>
<p class="text-text-secondary mb-4">{description}</p>
<div
class="flex items-center justify-end text-primary-DEFAULT opacity-50 group-hover:opacity-100 transition-all duration-DEFAULT"
>
<span class="text-sm font-medium"
>{lang === "de" ? "Mehr erfahren" : "Learn more"}</span
>
<svg
class="w-4 h-4 ml-2"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 5l7 7-7 7"></path>
</svg>
</div>
</a>