{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"simple-footer","type":"registry:block","title":"Simple footer","description":"The logo, the main links and social accounts, then the copyright, legal links and a live system status.","dependencies":["lucide-react"],"registryDependencies":["https://dashral.com/r/utils.json"],"files":[{"path":"registry/dashral/blocks/simple-footer.tsx","type":"registry:file","target":"components/dashral/blocks/simple-footer.tsx","content":"import { Sparkles } from \"lucide-react\"\n\n/** A link in the footer. */\nexport type FooterLink = { label: string; href: string }\n/** A social account: its name, the path of its mark (a 24×24 icon) and where it goes. */\nexport type SocialLink = { label: string; path: string; href?: string }\n\nconst linksOf = (...labels: string[]): FooterLink[] => labels.map((label) => ({ label, href: \"#\" }))\n\n// Brand marks (Simple Icons, CC0): lucide no longer ships them.\nconst sampleSocial: SocialLink[] = [\n  {\n    label: \"GitHub\",\n    path: \"M12 .5a11.5 11.5 0 0 0-3.64 22.41c.58.1.79-.25.79-.56v-2c-3.2.7-3.88-1.37-3.88-1.37-.52-1.33-1.28-1.69-1.28-1.69-1.05-.71.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.7 1.26 3.36.96.1-.75.4-1.26.73-1.55-2.55-.29-5.24-1.28-5.24-5.69 0-1.26.45-2.29 1.19-3.1-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.17 1.18a11 11 0 0 1 5.77 0c2.2-1.49 3.17-1.18 3.17-1.18.63 1.59.23 2.76.11 3.05.74.81 1.19 1.84 1.19 3.1 0 4.42-2.7 5.4-5.26 5.68.41.36.78 1.06.78 2.14v3.17c0 .31.21.67.8.56A11.5 11.5 0 0 0 12 .5Z\",\n  },\n  { label: \"X\", path: \"M18.9 1.15h3.68l-8.04 9.19L24 22.85h-7.4l-5.8-7.58-6.63 7.58H.48l8.6-9.83L0 1.15h7.59l5.24 6.93 6.07-6.93Zm-1.29 19.5h2.04L6.48 3.24H4.3l13.31 17.41Z\" },\n  {\n    label: \"LinkedIn\",\n    path: \"M20.45 20.45h-3.56v-5.57c0-1.33-.02-3.04-1.85-3.04-1.85 0-2.14 1.45-2.14 2.94v5.67H9.35V9h3.41v1.56h.05c.48-.9 1.64-1.85 3.37-1.85 3.6 0 4.27 2.37 4.27 5.46v6.28ZM5.34 7.43a2.06 2.06 0 1 1 0-4.13 2.06 2.06 0 0 1 0 4.13ZM7.12 20.45H3.56V9h3.56v11.45ZM22.22 0H1.77C.79 0 0 .77 0 1.73v20.54C0 23.23.79 24 1.77 24h20.45c.98 0 1.78-.77 1.78-1.73V1.73C24 .77 23.2 0 22.22 0Z\",\n  },\n]\n\n/**\n * A footer in two lines: the logo, the main links and the social accounts, then the copyright, the legal links and\n * the system status. Stacks and centers on phones. Every part comes from props.\n */\nexport function SimpleFooter({\n  brand = { name: \"Acme\", href: \"#\" },\n  links = linksOf(\"Product\", \"Pricing\", \"Docs\", \"Blog\", \"Careers\"),\n  social = sampleSocial,\n  copyright,\n  legal = linksOf(\"Privacy\", \"Terms\"),\n  status = { label: \"All systems normal\", href: \"#\" },\n}: {\n  brand?: { name: string; href: string; logo?: React.ReactNode }\n  links?: FooterLink[]\n  social?: SocialLink[]\n  /** The copyright line (© this year and the brand without it). */\n  copyright?: string\n  legal?: FooterLink[]\n  /** The status pill; null hides it. */\n  status?: { label: string; href: string } | null\n}) {\n  const link = \"rounded-sm text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/50\"\n\n  return (\n    <footer className=\"border-t bg-background px-4 sm:px-6\">\n      <div className=\"mx-auto max-w-6xl\">\n        <div className=\"flex flex-col items-center gap-6 py-10 md:flex-row md:justify-between\">\n          <a href={brand.href} className=\"flex items-center gap-2 rounded-md font-semibold tracking-tight outline-none focus-visible:ring-2 focus-visible:ring-ring/50\">\n            {brand.logo ?? (\n              <span aria-hidden className=\"grid size-7 place-items-center rounded-lg bg-primary text-primary-foreground\">\n                <Sparkles className=\"size-4\" />\n              </span>\n            )}\n            {brand.name}\n          </a>\n          <nav aria-label=\"Footer\">\n            <ul className=\"flex flex-wrap justify-center gap-x-6 gap-y-2\">\n              {links.map(({ label, href }) => (\n                <li key={label}>\n                  <a href={href} className={`${link} text-sm`}>\n                    {label}\n                  </a>\n                </li>\n              ))}\n            </ul>\n          </nav>\n          {/* Pulled out by the icon buttons' padding, so the last icon lines up with the content's edge. */}\n          <ul className=\"flex gap-1 md:-me-2.5\">\n            {social.map((s) => (\n              <li key={s.label}>\n                <a\n                  href={s.href ?? \"#\"}\n                  aria-label={`${brand.name} on ${s.label}`}\n                  className=\"grid size-9 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/50\"\n                >\n                  <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden className=\"size-4\">\n                    <path d={s.path} />\n                  </svg>\n                </a>\n              </li>\n            ))}\n          </ul>\n        </div>\n        <div className=\"flex flex-col items-center gap-3 border-t py-6 text-xs text-muted-foreground md:flex-row md:justify-between\">\n          <p>{copyright ?? `© ${new Date().getFullYear()} ${brand.name}. All rights reserved.`}</p>\n          <div className=\"flex items-center gap-4\">\n            {legal.map(({ label, href }) => (\n              <a key={label} href={href} className={link}>\n                {label}\n              </a>\n            ))}\n            {status && (\n              <a href={status.href} className=\"inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/50\">\n                <span className=\"relative flex size-2\" aria-hidden>\n                  <span className=\"absolute inline-flex size-full animate-ping rounded-full bg-success opacity-60 motion-reduce:hidden\" />\n                  <span className=\"relative inline-flex size-2 rounded-full bg-success\" />\n                </span>\n                {status.label}\n              </a>\n            )}\n          </div>\n        </div>\n      </div>\n    </footer>\n  )\n}\n"}],"cssVars":{"theme":{"color-success":"var(--success)","color-success-foreground":"var(--success-foreground)","color-success-text":"var(--success-text)"},"light":{"success":"oklch(0.508 0.118 165.612)","success-foreground":"oklch(0.985 0 0)","success-text":"oklch(0.432 0.095 166.913)"},"dark":{"success":"oklch(0.696 0.17 162.48)","success-foreground":"oklch(0.2 0.04 160)","success-text":"oklch(0.765 0.177 163.223)"}}}