Skip to content

Commit 7e0decc

Browse files
authored
Merge pull request #32 from Zondax/dev
Adds faucet section to developers page
2 parents 435d3c3 + a25de63 commit 7e0decc

9 files changed

Lines changed: 222 additions & 70 deletions

File tree

biome.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@
2323
"quoteStyle": "double"
2424
}
2525
},
26+
"css": {
27+
"parser": {
28+
"cssModules": true,
29+
"tailwindDirectives": true
30+
},
31+
"formatter": {
32+
"enabled": true
33+
},
34+
"linter": {
35+
"enabled": false
36+
}
37+
},
2638
"assist": {
2739
"enabled": true,
2840
"actions": {

package-lock.json

Lines changed: 28 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/developers/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { ChainSpecsSection } from "@/components/sections/ChainSpecsSection";
44
import { ComparisonSection } from "@/components/sections/ComparisonSection";
55
import {
66
DevelopersHeroSection,
7+
FaucetSection,
78
RpcEndpointsSection,
89
} from "@/components/sections/developers";
910
import { ResourcesSection } from "@/components/sections/ResourcesSection";
@@ -19,6 +20,7 @@ export default function DevelopersPage() {
1920
<div className="min-h-screen bg-background text-foreground">
2021
<FloatingNav />
2122
<DevelopersHeroSection />
23+
<FaucetSection />
2224
<RpcEndpointsSection />
2325
<ChainSpecsSection />
2426
<ComparisonSection />

src/components/sections/FaucetSection.tsx

Lines changed: 0 additions & 58 deletions
This file was deleted.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
"use client";
2+
3+
import { FaucetCard } from "@/components/shared/FaucetCard";
4+
import { Badge } from "@/components/ui/badge";
5+
import { Button } from "@/components/ui/button";
6+
import { DEVELOPERS_PAGE_CONTENT } from "@/constants/developers";
7+
import { Droplets, ExternalLink, Sparkles } from "lucide-react";
8+
9+
export function FaucetSection() {
10+
return (
11+
<section id="faucet" className="section-primary py-24">
12+
<div className="max-w-7xl mx-auto px-6">
13+
<div className="text-center mb-16">
14+
<h2 className="text-4xl md:text-5xl font-bold mb-6">
15+
{DEVELOPERS_PAGE_CONTENT.faucet.title}
16+
</h2>
17+
<p className="text-xl text-muted-foreground max-w-3xl mx-auto">
18+
{DEVELOPERS_PAGE_CONTENT.faucet.description}
19+
</p>
20+
</div>
21+
22+
<div className="grid gap-6 max-w-4xl mx-auto">
23+
{DEVELOPERS_PAGE_CONTENT.faucet.faucets.map((faucet) => (
24+
<FaucetCard
25+
key={faucet.name}
26+
icon={Droplets}
27+
title={faucet.name}
28+
subtitle={
29+
<div className="flex items-center gap-1 text-sm text-muted-foreground">
30+
<Sparkles className="w-3 h-3" />
31+
<span>Free testnet tokens</span>
32+
</div>
33+
}
34+
description={faucet.description}
35+
action={
36+
<Button asChild size="lg" className="group w-full md:w-auto">
37+
<a
38+
href={faucet.url}
39+
target="_blank"
40+
rel="noopener noreferrer"
41+
>
42+
<Droplets className="mr-2 h-5 w-5" />
43+
Get Test Tokens
44+
<ExternalLink className="ml-2 h-4 w-4 transition-transform group-hover:translate-x-1" />
45+
</a>
46+
</Button>
47+
}
48+
>
49+
<div className="flex flex-wrap gap-2">
50+
{faucet.networks.map((network) => (
51+
<Badge key={network} variant="secondary" className="text-xs">
52+
{network}
53+
</Badge>
54+
))}
55+
</div>
56+
</FaucetCard>
57+
))}
58+
</div>
59+
</div>
60+
</section>
61+
);
62+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export { DevelopersHeroSection } from "./DevelopersHeroSection";
2+
export { FaucetSection } from "./FaucetSection";
23
export { RpcEndpointsSection } from "./RpcEndpointsSection";

0 commit comments

Comments
 (0)