Skip to content

Commit 3a13edf

Browse files
committed
feat: Constructo page improvements
1 parent a2cc0b5 commit 3a13edf

File tree

2 files changed

+27
-26
lines changed

2 files changed

+27
-26
lines changed

src/components/CodeBlock.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,20 @@ const CodeBlock = ({
5252
const style = theme === "dark" ? oneDark : oneLight;
5353

5454
return (
55-
<Card className={cn("overflow-hidden relative", className)}>
55+
<Card
56+
className={cn(
57+
"overflow-hidden relative bg-background brightness-100 dark:brightness-125",
58+
className,
59+
)}
60+
>
5661
{showCopy && (
5762
<Button
5863
size="sm"
5964
variant="ghost"
6065
onClick={handleCopy}
6166
className="absolute top-3 right-3 z-10 hover:bg-muted/50"
6267
>
63-
{copied ? (
64-
<Check className="w-4 h-4" />
65-
) : (
66-
<Copy className="w-4 h-4" />
67-
)}
68+
{copied ? <Check className="w-4 h-4" /> : <Copy className="w-4 h-4" />}
6869
</Button>
6970
)}
7071

src/pages/Constructo.tsx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,32 @@ import {
2323
} from "lucide-react";
2424

2525
const Constructo = () => {
26+
const handleInstallClick = () => {
27+
navigator.clipboard.writeText("composer require devitools/constructo");
28+
};
29+
30+
const handleGithubClick = () => {
31+
window.open("https://github.com/devitools/constructo", "_blank");
32+
};
33+
34+
const handlePackagistClick = () => {
35+
window.open("https://packagist.org/packages/devitools/constructo", "_blank");
36+
};
37+
38+
const handleDocsClick = () => {
39+
window.open("/docs/constructo", "_blank");
40+
};
41+
2642
const features = [
2743
{
2844
icon: <Blocks className="w-6 h-6 text-constructo-foreground" />,
29-
title: "Codec Inteligente",
30-
description: "Converta objetos para arrays e vice-versa sem nenhuma configuração",
45+
title: "Serialização Inteligente",
46+
description: "Converta arrays em instâncias usando apenas os tipos da classe",
3147
},
3248
{
3349
icon: <Database className="w-6 h-6 text-constructo-foreground" />,
34-
title: "Validação Robusta",
35-
description: "Sistema de validação flexível baseado na estrutura das suas classes",
50+
title: "Desserialização Eficiente",
51+
description: "Converta objetos em arrays formatando valores automaticamente",
3652
},
3753
{
3854
icon: <TestTube className="w-6 h-6 text-constructo-foreground" />,
@@ -80,22 +96,6 @@ const Constructo = () => {
8096
},
8197
];
8298

83-
const handleInstallClick = () => {
84-
navigator.clipboard.writeText("composer require devitools/constructo");
85-
};
86-
87-
const handleGithubClick = () => {
88-
window.open("https://github.com/devitools/constructo", "_blank");
89-
};
90-
91-
const handlePackagistClick = () => {
92-
window.open("https://packagist.org/packages/devitools/constructo", "_blank");
93-
};
94-
95-
const handleDocsClick = () => {
96-
window.open("/docs/constructo", "_blank");
97-
};
98-
9999
return (
100100
<div className="min-h-screen" style={{ background: "var(--gradient-background)" }}>
101101
<Header />

0 commit comments

Comments
 (0)