mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-16 05:20:22 +08:00
- Extract landing-page terminal demo into a reusable <CommandTerminal /> component with inline styles (no global CSS dependency) - Animate a second command line cycling through claude/opencode/codex via @keyframes scoped inside the component - Inline BadgeLinks layout styles so the component renders correctly without relying on .badge-links from main.css - Add jsx.d.ts shim so editors do not flag the React global in component TSX files - Switch fern instance to global-theme: nvidia with multi-source enabled - Bump fern CLI to 5.40.0 and drop the basepath-aware experimental flag - Register fern/components/ as a second mdx-components directory - Remove the unused Adobe analytics script tag
61 lines
1.3 KiB
TypeScript
61 lines
1.3 KiB
TypeScript
/*
|
|
* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/**
|
|
* Badge links for GitHub, License, project status, Discord, etc.
|
|
* Uses a flex wrapper to display badges horizontally and hides Fern's
|
|
* external-link icon that otherwise stacks under each badge image.
|
|
* Requires the `.badge-links` CSS rule from main.css.
|
|
*/
|
|
declare const React: unknown;
|
|
|
|
export type BadgeItem = {
|
|
href: string;
|
|
src: string;
|
|
alt: string;
|
|
};
|
|
|
|
export function BadgeLinks({ badges = [] }: { badges?: BadgeItem[] }) {
|
|
if (badges.length === 0) {
|
|
return null;
|
|
}
|
|
return (
|
|
<div
|
|
className="badge-links"
|
|
style={{
|
|
alignItems: "center",
|
|
display: "flex",
|
|
flexWrap: "wrap",
|
|
gap: "8px",
|
|
lineHeight: 0,
|
|
margin: "0.25rem 0 0.75rem",
|
|
}}
|
|
>
|
|
{badges.map((b) => (
|
|
<a
|
|
key={b.href}
|
|
href={b.href}
|
|
target="_blank"
|
|
rel="noreferrer"
|
|
style={{
|
|
alignItems: "center",
|
|
display: "inline-flex",
|
|
width: "auto",
|
|
}}
|
|
>
|
|
<img
|
|
src={b.src}
|
|
alt={b.alt}
|
|
style={{
|
|
display: "block",
|
|
margin: 0,
|
|
}}
|
|
/>
|
|
</a>
|
|
))}
|
|
</div>
|
|
);
|
|
}
|