SPB Git

Repository Public

IconMarquee.tsx 3.1 KB 74 lines tsx

1/**2 * =============================================================================3 *                  SP BOUCHER | SOFTWARE & RESEARCH4 *             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project          : ORIX App Universe8 * File             : src/components/lineup/IconMarquee.tsx9 * Module           : components10 * Repository       : https://git.spboucher.ai/orix-spboucher-ai11 * Project Website  : https://www.orixlab.dev12 * Created          : 2026-11-2513 * Last Modified    : 2026-11-2514 *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 Image from "next/image";44import Link from "next/link";45import type { CSSProperties } from "react";4647export type MarqueeApp = { slug: string; name: string; icon: string | null; accent: string | null; href: string };4849/** Two rows of the real app icons drifting in opposite directions. The links are reachable once; the copies are decorative. */50export function IconMarquee({ apps, label }: { apps: MarqueeApp[]; label: string }) {51  const half = Math.ceil(apps.length / 2);52  const rows = [apps.slice(0, half), apps.slice(half)];53  return (54    <div className="icon-band" role="group" aria-label={label} data-testid="icon-band">55      {rows.map((row, r) => (56        <div key={r} className={`icon-row ${r ? "is-reverse" : ""}`}>57          {[0, 1, 2].map((k) => (58            <ul key={k} aria-hidden={k > 0}>59              {row.map((a) => (60                <li key={a.slug}>61                  <Link href={a.href} tabIndex={k > 0 ? -1 : 0} className="icon-chip" style={{ "--accent": a.accent ?? "var(--blue)" } as CSSProperties}>62                    {a.icon ? <span className="icon w-11"><Image src={a.icon} alt="" width={44} height={44} sizes="44px" /></span> : <span className="icon icon-empty w-11"><span aria-hidden data-i={a.name.replace(/^ORIX\s+/i, "").slice(0, 2)} /></span>}63                    <span>{a.name}</span>64                  </Link>65                </li>66              ))}67            </ul>68          ))}69        </div>70      ))}71    </div>72  );73}74
Files main
Menu

Theme