Repository Public
1/**2 * =============================================================================3 * SP BOUCHER | SOFTWARE & RESEARCH4 * ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project : ORIX App Universe8 * File : src/components/apps/AppCard.tsx9 * Module : components10 * Repository : https://git.spboucher.ai/orix-spboucher-ai11 * Project Website : https://www.orixlab.dev12 * Created : 2026-11-2113 * Last Modified : 2026-11-2114 *15 * Author : Simon-Pierre Boucher16 * Position : Professor of Finance17 * Institution : Université du Québec en Outaouais (UQO)18 * Organization : SP Boucher19 * Website : https://spboucher.ai20 * Git : https://git.spboucher.ai21 *22 * Preferred Contact: support@spboucher.ai23 * Development : dev@spboucher.ai24 * Support : support@spboucher.ai25 * Security/Admin : admin@spboucher.ai26 *27 * Copyright (c) 202628 * Simon-Pierre Boucher29 * All rights reserved where applicable. This file is governed by the30 * applicable project license, copyright notices and relevant law.31 * Existing third-party rights and notices remain unaffected.32 *33 * License : None specified (no license file in this repository)34 *35 * Do not embed credentials, private keys, access tokens,36 * certificates or confidential personal information.37 *38 * =============================================================================39 * END OF SP BOUCHER SOURCE HEADER40 * =============================================================================41 */4243import Link from "next/link";44import type { CardApp } from "@/models/filter";45import { dict, href, type Locale } from "@/lib/i18n";46import { AppIcon } from "../ui/AppIcon";47import { Arrow, PlatformBadges, StatusBadge } from "../ui/Badges";48import { PrimaryAction } from "./PrimaryAction";4950export function AppCard({ app, locale, priority, heading: H = "h3" }: { app: CardApp; locale: Locale; priority?: boolean; heading?: "h2" | "h3" }) {51 const t = dict(locale);52 const page = href(locale, `/apps/${app.slug}`);53 return (54 <article className="card tilt group relative flex h-full flex-col overflow-hidden p-6 hover:border-line2 sm:p-7" style={{ "--accent": app.accent ?? "var(--blue)" } as React.CSSProperties} data-testid="app-card" data-slug={app.slug}>55 <div aria-hidden className="pointer-events-none absolute -right-24 -top-24 h-64 w-64 rounded-full opacity-0 blur-3xl transition-opacity duration-700 group-hover:opacity-100" style={{ background: "color-mix(in oklab, var(--accent) 26%, transparent)" }} />56 <div className="flex items-start justify-between gap-4">57 <AppIcon name={app.name} src={app.icon} size={72} priority={priority} />58 <StatusBadge status={app.status} locale={locale} />59 </div>60 <H className="h3 mt-6">61 <Link href={page} className="after:absolute after:inset-0 after:content-['']">{app.name}</Link>62 </H>63 <p className="mt-2 text-[0.98rem] leading-relaxed text-ink2">{app.summary}</p>64 <div className="mt-5 flex flex-wrap items-center gap-1.5">65 <PlatformBadges platforms={app.platforms} locale={locale} />66 <span className="tag">{t.categories[app.category]}</span>67 {app.version && <span className="tag">v{app.version}</span>}68 </div>69 <div className="relative z-10 mt-auto pt-6">70 {app.action.kind === "details"71 ? <span className="inline-flex items-center gap-2 text-sm font-semibold text-ink2 transition-colors group-hover:text-ink" aria-hidden>{t.action.details}<Arrow className="transition-transform duration-500 ease-out-expo group-hover:translate-x-1" /></span>72 : <PrimaryAction app={app} locale={locale} size="sm" />}73 </div>74 </article>75 );76}77