import type { Metadata } from "next" import { getTranslations, getMessages, setRequestLocale } from "next-intl/server" import { Link } from "@/i18n/navigation" import Image from "next/image" import { ArrowRight, Server, Cpu, HardDrive, Network, Shield, Activity, Wrench, Boxes, BookOpen, Bell, Sparkles, Terminal, Code2, Plug, ExternalLink, } from "lucide-react" import { DocHeader } from "@/components/ui/doc-header" import { Callout } from "@/components/ui/callout" export async function generateMetadata({ params, }: { params: Promise<{ locale: string }> }): Promise { const { locale } = await params const t = await getTranslations({ locale, namespace: "docs.introduction.meta" }) return { title: t("title"), description: t("description"), keywords: [ "proxmenux", "proxmox menu script", "proxmox management tool", "proxmox tui", "proxmox cli", "proxmox dashboard", "proxmox open source", "proxmox automation", "proxmox helper script", "proxmox post install", "proxmox community tool", ], alternates: { canonical: "https://proxmenux.com/docs/introduction" }, openGraph: { title: t("ogTitle"), description: t("ogDescription"), type: "article", url: "https://proxmenux.com/docs/introduction", siteName: "ProxMenux", images: [ { url: "https://raw.githubusercontent.com/MacRimi/ProxMenux/main/web/public/main.png", width: 1363, height: 735, alt: "ProxMenux — Menu-Driven Tool for Proxmox VE", }, ], }, twitter: { card: "summary_large_image", title: t("twitterTitle"), description: t("twitterDescription"), images: [ "https://raw.githubusercontent.com/MacRimi/ProxMenux/main/web/public/main.png", ], }, } } const iconMap: Record> = { Server, Cpu, HardDrive, Network, Shield, Activity, Wrench, Boxes, BookOpen, Bell, Sparkles, Terminal, Code2, Plug, } type FeatureItem = { title: string description: string icon: string href: string } type InstallRow = { pathRich: string; bundles: string; when: string } type NextItem = { lead: string linkHref: string linkLabel: string tail?: string tailRich?: string } function FeatureCard({ title, description, Icon, href, }: { title: string description: string Icon: React.ComponentType<{ className?: string; "aria-hidden"?: boolean }> href: string }) { return (
{title}
{description}
) } export default async function IntroductionPage({ params, }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations({ locale, namespace: "docs.introduction" }) const messages = (await getMessages({ locale })) as unknown as { docs: { introduction: { twoProducts: { layers: string[] } scriptsSection: { items: FeatureItem[] } monitorSection: { items: FeatureItem[] } installPaths: { rows: InstallRow[] } next: { items: NextItem[] } } } } const block = messages.docs.introduction const layers = block.twoProducts.layers const scriptItems = block.scriptsSection.items const monitorItems = block.monitorSection.items const installRows = block.installPaths.rows const nextItems = block.next.items const code = (chunks: React.ReactNode) => {chunks} const strong = (chunks: React.ReactNode) => {chunks} const em = (chunks: React.ReactNode) => {chunks} const github = (chunks: React.ReactNode) => ( {chunks} ) const monitorOverviewLink = (chunks: React.ReactNode) => ( {chunks} ) const installationLink = (chunks: React.ReactNode) => ( {chunks} ) return (
ProxMenux Logo

{t.rich("hero.tagline", { strong })}

{t.rich("hero.audience", { em, github })}

{t("twoProducts.heading")}

{t("twoProducts.intro")}

{t("twoProducts.scripts.title")}

{t.rich("twoProducts.scripts.body", { code })}

{t("twoProducts.monitor.title")}

{t("twoProducts.monitor.body")}

{t("twoProducts.calloutIntro")}
    {layers.map((_, idx) => (
  • {t.rich(`twoProducts.layers.${idx}`, { strong })}
  • ))}

{t("scriptsSection.heading")}

{t.rich("scriptsSection.intro", { code })}

{scriptItems.map((f) => { const Icon = iconMap[f.icon] ?? Server return })}

{t("monitorSection.heading")}

{t.rich("monitorSection.intro", { link: monitorOverviewLink })}

{monitorItems.map((f) => { const Icon = iconMap[f.icon] ?? Activity return })}

{t("installPaths.heading")}

{t("installPaths.intro")}

{installRows.map((row, idx) => ( ))}
{t("installPaths.headerPath")} {t("installPaths.headerBundles")}
{t.rich(`installPaths.rows.${idx}.pathRich`, { strong })} {row.bundles}

{t.rich("installPaths.outro", { link: installationLink })}

{t("warnSource.body")}{" "} {t("warnSource.sourceLabel")} {" "}·{" "} {t("warnSource.cocLabel")}

{t("next.heading")}

    {nextItems.map((item, idx) => (
  • {t.rich(`next.items.${idx}.lead`, { strong })} {item.linkLabel} {item.tailRich ? t.rich(`next.items.${idx}.tailRich`, { code }) : item.tail}
  • ))}
) }