mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-06-14 04:17:00 +00:00
complete i18n migration to /[locale]/ with EN+ES content
Full rewrite of the docs site under app/[locale]/ with next-intl in localePrefix:"always" mode. Every page now exists at both /en/<path> and /es/<path>; the root / shows a meta-refresh + JS redirect to /<defaultLocale>/ so GitHub Pages serves something on the apex URL. Highlights: - 107 doc pages migrated to file-per-page JSON namespaces under messages/en/ and messages/es/. Spanish content is fully translated (no copy-of-English placeholders). - New documentation for the Active Suppressions section in the Settings tab and the per-event Dismiss dropdown in the Health Monitor modal. - New screenshots: dismiss-duration-dropdown.png and an updated health-suppression-settings.png. - Pagefind integrated for client-side search; index is built on every CI deploy (not committed). - RSS feeds: per-locale at /<locale>/rss.xml plus root /rss.xml for backward compat. - Removed the dead app/[locale]/guides/[slug]/ route — every guide now has its own static page and no markdown source remains. - Fixed orphan link /guides/nvidia -> /guides/nvidia-manual in docs/hardware/nvidia-host. - Removed obsolete components (footer2, calendar, drawer). Verified locally with `npm ci && npm run build`: 2804 files in out/, 231 pages indexed by pagefind, root redirect intact, both locale roots and the new Active Suppressions docs render OK.
This commit is contained in:
@@ -1,51 +1,55 @@
|
||||
"use client"
|
||||
|
||||
import { Book, GitBranch, FileText, Github } from "lucide-react"
|
||||
import Link from "next/link"
|
||||
|
||||
const resources = [
|
||||
{
|
||||
icon: <Book className="h-6 w-6" />,
|
||||
title: "Documentation",
|
||||
description: "System description and user guides",
|
||||
link: "/docs/introduction",
|
||||
},
|
||||
{
|
||||
icon: <FileText className="h-6 w-6" />,
|
||||
title: "Changelog",
|
||||
description: "Information on the latest updates",
|
||||
link: "/changelog",
|
||||
},
|
||||
{
|
||||
icon: <GitBranch className="h-6 w-6" />,
|
||||
title: "Guides",
|
||||
description: "Step-by-step tutorials and guides for common tasks",
|
||||
link: "/guides",
|
||||
},
|
||||
{
|
||||
icon: <Github className="h-6 w-6" />,
|
||||
title: "GitHub Repository",
|
||||
description: "Explore the source code.",
|
||||
link: "https://github.com/MacRimi/ProxMenux",
|
||||
},
|
||||
]
|
||||
import { Link } from "@/i18n/navigation"
|
||||
import NextLink from "next/link"
|
||||
import { useTranslations } from "next-intl"
|
||||
|
||||
export default function Resources() {
|
||||
const t = useTranslations("resources")
|
||||
|
||||
// External link to GitHub stays on next/link to avoid the locale
|
||||
// prefix; the three internal links use the locale-aware Link so they
|
||||
// route under /[locale]/ automatically.
|
||||
const resources = [
|
||||
{ key: "documentation", icon: <Book className="h-6 w-6" />, link: "/docs/introduction", external: false },
|
||||
{ key: "changelog", icon: <FileText className="h-6 w-6" />, link: "/changelog", external: false },
|
||||
{ key: "guides", icon: <GitBranch className="h-6 w-6" />, link: "/guides", external: false },
|
||||
{ key: "github", icon: <Github className="h-6 w-6" />, link: "https://github.com/MacRimi/ProxMenux", external: true },
|
||||
] as const
|
||||
|
||||
return (
|
||||
<section className="py-20 bg-gray-900">
|
||||
<div className="container mx-auto px-4">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8">
|
||||
{resources.map((resource, index) => (
|
||||
<Link key={index} href={resource.link} className="block h-full">
|
||||
{resources.map((resource) => {
|
||||
const title = t(`${resource.key}.title`)
|
||||
const description = t(`${resource.key}.description`)
|
||||
const inner = (
|
||||
<div className="bg-gray-800 p-6 rounded-lg shadow-lg hover:bg-gray-700 transition-colors duration-200 h-full flex flex-col justify-between">
|
||||
<div className="flex items-center mb-4">
|
||||
{resource.icon}
|
||||
<h3 className="text-xl font-semibold ml-2">{resource.title}</h3>
|
||||
<h3 className="text-xl font-semibold ml-2">{title}</h3>
|
||||
</div>
|
||||
<p className="text-gray-400 min-h-[48px]">{resource.description}</p>
|
||||
<p className="text-gray-400 min-h-[48px]">{description}</p>
|
||||
</div>
|
||||
</Link>
|
||||
))}
|
||||
)
|
||||
return resource.external ? (
|
||||
<NextLink
|
||||
key={resource.key}
|
||||
href={resource.link}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="block h-full"
|
||||
>
|
||||
{inner}
|
||||
</NextLink>
|
||||
) : (
|
||||
<Link key={resource.key} href={resource.link} className="block h-full">
|
||||
{inner}
|
||||
</Link>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user