docs: landing improvements (#695)

This commit is contained in:
KinfeMichael Tariku
2024-11-29 08:30:21 +03:00
committed by GitHub
parent f833373dee
commit 492cda1474
6 changed files with 25 additions and 19 deletions

View File

@@ -217,7 +217,11 @@ function ChangelogItem({
version, version,
date, date,
changes, changes,
}: { version: string; date: string; changes: string[] }) { }: {
version: string;
date: string;
changes: string[];
}) {
return ( return (
<div className="border-l-2 border-white/10 pl-6 relative"> <div className="border-l-2 border-white/10 pl-6 relative">
<div className="absolute w-3 h-3 bg-white rounded-full -left-[7px] top-2" /> <div className="absolute w-3 h-3 bg-white rounded-full -left-[7px] top-2" />

View File

@@ -25,16 +25,18 @@ export function CodeEditor({ code, language }: CodeEditorProps) {
}; };
return ( return (
<div className="relative"> <div className="relative w-full">
<Highlight theme={theme} code={code} language={language}> <Highlight theme={theme} code={code} language={language}>
{({ className, style, tokens, getLineProps, getTokenProps }) => ( {({ className, style, tokens, getLineProps, getTokenProps }) => (
<pre <pre
className={`${className} p-4 overflow-auto max-h-[400px] rounded-md`} className={`${className} text-sm p-4 w-fit overflow-scroll max-h-[400px] rounded-md`}
style={style} style={style}
> >
{tokens.map((line, i) => ( {tokens.map((line, i) => (
<div key={i} {...getLineProps({ line, key: i })}> <div key={i} {...getLineProps({ line, key: i })}>
<span className="mr-4 text-gray-500 select-none">{i + 1}</span> <span className="inline-block w-4 mr-3 text-gray-500 select-none">
{i + 1}
</span>
{line.map((token, key) => ( {line.map((token, key) => (
<span key={key} {...getTokenProps({ token, key })} /> <span key={key} {...getTokenProps({ token, key })} />
))} ))}

View File

@@ -123,14 +123,14 @@ ${
const activeFile = files.find((file) => file.id === activeFileId); const activeFile = files.find((file) => file.id === activeFileId);
return ( return (
<div className="w-full max-w-3xl mx-auto mt-8 border border-border rounded-md overflow-hidden"> <div className="w-full mr-auto max-w-3xl mt-8 border border-border rounded-md overflow-hidden">
<TabBar <TabBar
files={files} files={files}
activeFileId={activeFileId} activeFileId={activeFileId}
onTabClick={handleTabClick} onTabClick={handleTabClick}
onTabClose={handleTabClose} onTabClose={handleTabClose}
/> />
<div className="bg-background"> <div className="bg-back">
{activeFile && ( {activeFile && (
<CodeEditor <CodeEditor
language="typescript" language="typescript"

View File

@@ -292,7 +292,7 @@ export function Builder() {
)} )}
</div> </div>
</ScrollArea> </ScrollArea>
<ScrollArea className="w-5/12 flex-grow"> <ScrollArea className="w-[45%] flex-grow">
<div className="h-[580px]"> <div className="h-[580px]">
{currentStep === 0 ? ( {currentStep === 0 ? (
<Card className="rounded-none flex-grow h-full"> <Card className="rounded-none flex-grow h-full">
@@ -540,14 +540,14 @@ export function Builder() {
</CardContent> </CardContent>
</Card> </Card>
) : ( ) : (
<Card className="rounded-none flex-grow h-full overflow-scroll"> <Card className="rounded-none w-full overflow-y-hidden h-full overflow-auto">
<CardHeader> <CardHeader>
<div className="flex flex-col items-start"> <div className="flex flex-col -mb-2 items-start">
<CardTitle>Code</CardTitle> <CardTitle>Code</CardTitle>
</div> </div>
</CardHeader> </CardHeader>
<CardContent> <CardContent>
<div> <div className="flex gap-2 items-baseline">
<p> <p>
Copy the code below and paste it in your application to Copy the code below and paste it in your application to
get started. get started.

View File

@@ -72,7 +72,7 @@ const features = [
export default function Features({ stars }: { stars: string | null }) { export default function Features({ stars }: { stars: string | null }) {
return ( return (
<div className="md:w-10/12 mt-10 mx-auto font-geist relative md:border-l-0 md:border-[1.2px] rounded-none -pr-2"> <div className="md:w-10/12 mt-10 mx-auto font-geist relative md:border-l-0 md:border-b-0 md:border-[1.2px] rounded-none -pr-2">
<div className="w-full md:mx-0"> <div className="w-full md:mx-0">
<div className="grid grid-cols-1 relative md:grid-rows-2 md:grid-cols-3 border-b-[1.2px]"> <div className="grid grid-cols-1 relative md:grid-rows-2 md:grid-cols-3 border-b-[1.2px]">
<div className="hidden md:grid top-1/2 left-0 -translate-y-1/2 w-full grid-cols-3 z-10 pointer-events-none select-none absolute"> <div className="hidden md:grid top-1/2 left-0 -translate-y-1/2 w-full grid-cols-3 z-10 pointer-events-none select-none absolute">