mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-10 08:05:14 +02:00
feat(docs): add Fumadocs site workspace
This commit is contained in:
parent
cb9ab25456
commit
572d515db0
28 changed files with 3979 additions and 84 deletions
56
docs/components/logo.tsx
Normal file
56
docs/components/logo.tsx
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
export function Logo() {
|
||||
return (
|
||||
<div className="flex items-center gap-2 group">
|
||||
<div className="relative flex items-center justify-center transition-transform duration-300 ease-out group-hover:rotate-[-4deg]">
|
||||
<svg
|
||||
width="22"
|
||||
height="22"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<defs>
|
||||
<linearGradient id="ktx-grad-a" x1="0" y1="0" x2="24" y2="24" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0%" stopColor="var(--color-fd-primary)" />
|
||||
<stop offset="100%" stopColor="var(--color-fd-primary)" stopOpacity="0.55" />
|
||||
</linearGradient>
|
||||
<linearGradient id="ktx-grad-b" x1="0" y1="0" x2="24" y2="24" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0%" stopColor="var(--color-fd-primary)" stopOpacity="0.85" />
|
||||
<stop offset="100%" stopColor="var(--color-fd-primary)" stopOpacity="0.4" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
{/* Bottom layer */}
|
||||
<path
|
||||
d="M3 17 L12 21.5 L21 17 L12 12.5 Z"
|
||||
fill="url(#ktx-grad-a)"
|
||||
opacity="0.4"
|
||||
/>
|
||||
{/* Middle layer */}
|
||||
<path
|
||||
d="M3 12 L12 16.5 L21 12 L12 7.5 Z"
|
||||
fill="url(#ktx-grad-b)"
|
||||
opacity="0.7"
|
||||
/>
|
||||
{/* Top layer */}
|
||||
<path
|
||||
d="M3 7 L12 11.5 L21 7 L12 2.5 Z"
|
||||
fill="var(--color-fd-primary)"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<span
|
||||
className="text-[15px] font-semibold text-fd-foreground tracking-tight"
|
||||
style={{ fontFamily: "var(--font-display), var(--font-sans), sans-serif" }}
|
||||
>
|
||||
KTX
|
||||
</span>
|
||||
<span
|
||||
className="text-[13px] font-medium text-fd-muted-foreground/80 tracking-tight border-l border-fd-border pl-2 ml-0.5"
|
||||
style={{ fontFamily: "var(--font-display), var(--font-sans), sans-serif" }}
|
||||
>
|
||||
Docs
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
58
docs/components/scroll-reveal.tsx
Normal file
58
docs/components/scroll-reveal.tsx
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
"use client";
|
||||
|
||||
import { useEffect, useRef, type ReactNode } from "react";
|
||||
|
||||
type Props = {
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
stagger?: boolean;
|
||||
threshold?: number;
|
||||
};
|
||||
|
||||
export function ScrollReveal({
|
||||
children,
|
||||
className = "",
|
||||
stagger = false,
|
||||
threshold = 0.1,
|
||||
}: Props) {
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
const node = ref.current;
|
||||
if (!node) return;
|
||||
|
||||
const observer = new IntersectionObserver(
|
||||
(entries) => {
|
||||
for (const entry of entries) {
|
||||
if (entry.isIntersecting) {
|
||||
entry.target.classList.add("visible");
|
||||
if (stagger) {
|
||||
entry.target.querySelectorAll(".rv").forEach((el) => {
|
||||
el.classList.add("visible");
|
||||
});
|
||||
}
|
||||
observer.unobserve(entry.target);
|
||||
}
|
||||
}
|
||||
},
|
||||
{ threshold, rootMargin: "0px 0px -40px 0px" }
|
||||
);
|
||||
|
||||
if (stagger) {
|
||||
observer.observe(node);
|
||||
} else {
|
||||
node.querySelectorAll(".rv").forEach((el) => observer.observe(el));
|
||||
}
|
||||
|
||||
return () => observer.disconnect();
|
||||
}, [stagger, threshold]);
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={ref}
|
||||
className={`${stagger ? "rv rv-stagger" : ""} ${className}`}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
56
docs/components/terminal-preview.tsx
Normal file
56
docs/components/terminal-preview.tsx
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
export function TerminalPreview() {
|
||||
return (
|
||||
<div className="terminal-frame sheen w-full max-w-[560px]">
|
||||
<div className="terminal-head">
|
||||
<span className="terminal-dot" style={{ background: "#ff5f57" }} />
|
||||
<span className="terminal-dot" style={{ background: "#febc2e" }} />
|
||||
<span className="terminal-dot" style={{ background: "#28c840" }} />
|
||||
<span className="ml-2 text-[11px] text-zinc-500 font-medium tracking-wide">
|
||||
~/analytics
|
||||
</span>
|
||||
</div>
|
||||
<div className="terminal-body">
|
||||
<div>
|
||||
<span className="term-prompt">$</span>{" "}
|
||||
<span className="term-cmd">ktx setup</span>
|
||||
</div>
|
||||
<div className="h-2" />
|
||||
<div className="term-dim">◆ Welcome to KTX setup</div>
|
||||
<div className="term-dim">│</div>
|
||||
<div>
|
||||
<span className="term-dim">◇</span>{" "}
|
||||
<span className="term-key">LLM</span>{" "}
|
||||
<span className="term-ok">✓ claude-sonnet-4-6</span>
|
||||
</div>
|
||||
<div>
|
||||
<span className="term-dim">◇</span>{" "}
|
||||
<span className="term-key">Embeddings</span>{" "}
|
||||
<span className="term-ok">✓ openai · text-embedding-3-small</span>
|
||||
</div>
|
||||
<div>
|
||||
<span className="term-dim">◇</span>{" "}
|
||||
<span className="term-key">Database</span>{" "}
|
||||
<span className="term-ok">✓ postgres-warehouse · 42 tables</span>
|
||||
</div>
|
||||
<div>
|
||||
<span className="term-dim">◇</span>{" "}
|
||||
<span className="term-key">Sources</span>{" "}
|
||||
<span className="term-ok">✓ dbt-main · 218 models</span>
|
||||
</div>
|
||||
<div className="h-2" />
|
||||
<div className="term-info">◐ Building context for agents…</div>
|
||||
<div className="pl-3 text-[12px] term-dim">
|
||||
enriching schema · detecting relationships · ingesting dbt
|
||||
</div>
|
||||
<div className="h-2" />
|
||||
<div className="term-ok">✓ KTX context is ready for agents.</div>
|
||||
<div className="h-2" />
|
||||
<div>
|
||||
<span className="term-prompt">$</span>{" "}
|
||||
<span className="term-cmd">ktx serve</span>
|
||||
<span className="term-cursor ml-1" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue