{project.name}
+{project.description}
+diff --git a/app/projects/page.tsx b/app/projects/page.tsx new file mode 100644 index 0000000..f53ec79 --- /dev/null +++ b/app/projects/page.tsx @@ -0,0 +1,216 @@ +"use client" + +import Image from "next/image" +import Link from "next/link" +import { Github, Twitter, Globe, Share2, Linkedin, Copy } from "lucide-react" +import { useMemo } from "react" +import { getAbsoluteUrl } from "@/lib/metadata" + +interface Project { + id: string + name: string + description: string + logo?: string + links: { + website?: string + github?: string + twitter?: string + } +} + +// Temporary project data. In a real app, this could be fetched from an API or a JSON file. +const projects: Project[] = [ + { + id: "stability-nexus", + name: "Stability Nexus", + description: + "Research and publications on stability across AI, blockchain, and finance.", + logo: "/StabilityNexus.svg", + links: { + website: "https://stability.nexus", + github: "https://github.com/StabilityNexus", + twitter: "https://x.com/StabilityNexus", + }, + }, + { + id: "stable-viewpoints", + name: "Stable Viewpoints", + description: + "Digital publication focused on thoughtful perspectives about stability.", + logo: "/stability-nexus-og.png", + links: { + website: "https://viewpoints.stability.nexus", + github: "https://github.com/StabilityNexus/StableViewpoints", + twitter: "https://x.com/StabilityNexus", + }, + }, +] + +function ShareLinks({ project }: { project: Project }) { + const shareTarget = project.links.website || project.links.github || getAbsoluteUrl("/projects") + const shareText = encodeURIComponent(`${project.name}`) + const encodedUrl = encodeURIComponent(shareTarget) + + const twitterUrl = `https://twitter.com/intent/tweet?url=${encodedUrl}&text=${shareText}` + const linkedinUrl = `https://www.linkedin.com/sharing/share-offsite/?url=${encodedUrl}` + const facebookUrl = `https://www.facebook.com/sharer/sharer.php?u=${encodedUrl}` + + const copyLink = async () => { + try { + await navigator.clipboard.writeText(shareTarget) + // Optional: You could integrate a toast here, but we'll keep it minimal and accessible. + alert("Link copied to clipboard") + } catch (e) { + alert("Unable to copy link") + } + } + + return ( +
{project.description}
+Explore our projects and organizations.
+