Skip to content

Commit a3f0540

Browse files
authored
Merge pull request #795 from hirosystems/develop
release v2.3.0
2 parents b2939a9 + 911340e commit a3f0540

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+4354
-2365
lines changed

.env-example

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
NEXT_PUBLIC_ALGOLIA_APP_ID=
22
NEXT_PUBLIC_ALGOLIA_API_KEY=
33
NEXT_PUBLIC_ALGOLIA_INDEX=
4-
NEXT_PUBLIC_GTM_ID=
4+
NEXT_PUBLIC_GTM_ID=

app/(docs)/[...slug]/page.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ export default function Page({ params }: { params: Param }): JSX.Element {
4848
] || secondSegment.charAt(0).toUpperCase() + secondSegment.slice(1));
4949
}
5050

51+
if (page.slugs[1].toLowerCase() === "platform-api") {
52+
prefix = "Platform API";
53+
}
54+
5155
if (page.slugs[1].toLowerCase() === "token-metadata-api") {
5256
prefix = "Token Metadata API";
5357
}

app/(docs)/layout.client.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ const itemVariants = cva(
1818
true: "text-accent-foreground",
1919
},
2020
mode: {
21-
bitcoin: "bg-[hsl(var(--hiro))]",
21+
bitcoin: "bg-hiro",
2222
stacks: "bg-background",
2323
},
2424
},
2525
compoundVariants: [
2626
{
2727
active: true,
2828
mode: "bitcoin",
29-
className: "hsl(var(--hiro)) dark:text-background",
29+
className: "bg-hiro dark:text-background",
3030
},
3131
{
3232
active: true,

app/(docs)/layout.tsx

+26-6
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,38 @@ export const layoutOptions: Omit<DocsLayoutProps, "children"> = {
2727
},
2828
],
2929
},
30-
links: [
31-
{
32-
text: "Guides",
33-
url: "/guides",
34-
},
35-
],
30+
links: [],
3631
sidebar: {
3732
defaultOpenLevel: 0,
3833
banner: <SidebarBanner />,
3934
},
4035
};
4136

37+
export const homeLayoutOptions: Omit<DocsLayoutProps, "children"> = {
38+
tree: utils.pageTree,
39+
nav: {
40+
transparentMode: "top",
41+
title: <DocsLogo className="size-28 hidden sm:block" />,
42+
children: null,
43+
links: [
44+
{
45+
label: "Hiro Platform",
46+
href: "https://platform.hiro.so/",
47+
icon: (
48+
<div className="flex items-center gap-1 bg-secondary p-1.5 rounded-md">
49+
<span className="ml-2 font-semibold max-md:hidden">
50+
Hiro Platform
51+
</span>
52+
<ArrowUpRight />
53+
</div>
54+
),
55+
external: true,
56+
},
57+
],
58+
},
59+
links: [],
60+
};
61+
4262
export default function Layout({
4363
children,
4464
}: {

app/(home)/layout.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import { Layout } from "fumadocs-ui/layout";
22
import type { ReactNode } from "react";
3-
import { layoutOptions } from "../(docs)/layout";
3+
import { homeLayoutOptions } from "../(docs)/layout";
44

55
export default function HomeLayout({
66
children,
77
}: {
88
children: ReactNode;
99
}): JSX.Element {
10-
return <Layout {...layoutOptions}>{children}</Layout>;
10+
return (
11+
<div className="max-w-7xl mx-auto *:border-none">
12+
<Layout {...homeLayoutOptions}>{children}</Layout>
13+
</div>
14+
);
1115
}

app/(home)/page.tsx

+158-100
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,168 @@
1-
import Link from "next/link";
2-
import { cn } from "@/utils/cn";
3-
import { buttonVariants } from "@/components/ui/button";
4-
import { CodeBlock } from "@/components/code-block";
5-
import { Integration } from "./page.client";
1+
import { StacksCardIcon, BitcoinCardIcon } from "@/components/ui/icon";
2+
import { Card } from "@/components/ui/card";
3+
import { Badge } from "@/components/ui/badge";
4+
import Link from "fumadocs-core/link";
65

76
export default function HomePage(): JSX.Element {
87
return (
9-
<>
10-
<div
11-
className="absolute inset-x-0 top-[200px] h-[250px] max-md:hidden"
12-
style={{
13-
background:
14-
"repeating-linear-gradient(to right, hsl(var(--border)), transparent 1px, transparent 50px), repeating-linear-gradient(to bottom, hsl(var(--border)), transparent 1px, transparent 50px)",
15-
}}
16-
/>
17-
<main className="container relative max-w-[1250px] px-8 py-4 lg:py-16">
18-
<div className="relative border-b">
19-
<div className="grid grid-cols-1 bg-background border-r md:grid-cols-2 lg:grid-cols-3">
20-
<div className="relative flex flex-col overflow-hidden border-l border-t px-6 py-10">
21-
<h2 className="text-7xl font-extrabold font-sans">
22-
Build on Bitcoin Layers.
23-
</h2>
24-
<ul className="my-8 flex flex-col gap-6">
25-
<li>
26-
<span className="font-medium">Guides and code samples.</span>
27-
<span className="ml-2 text-muted-foreground">
28-
Copy and paste your way to making things work.
29-
</span>
30-
</li>
31-
<li>
32-
<span className="font-medium">Interactive.</span>
33-
<span className="ml-2 text-muted-foreground">
34-
Play around and get results before installing anything.
35-
</span>
36-
</li>
37-
<li>
38-
<span className="font-medium">Fully open-source.</span>
39-
<span className="ml-2 text-muted-foreground">
40-
Open source, available on Github for contributions.
41-
</span>
42-
</li>
43-
</ul>
44-
<div className="w-full mt-auto flex flex-row flex-wrap *:flex-1 gap-2 border-t pt-8">
45-
<Link
46-
href="/stacks"
47-
className={cn(
48-
buttonVariants(),
49-
"bg-[rgb(255,85,0)] hover:bg-[rgba(255,85,0,0.9)]"
50-
)}
51-
>
52-
Get started
53-
</Link>
54-
<Link
55-
href="/guides"
56-
className={cn(
57-
buttonVariants({
58-
variant: "outline",
59-
})
60-
)}
61-
>
62-
View all guides
63-
</Link>
64-
</div>
8+
<main className="container max-w-7xl mx-auto my-12 space-y-10">
9+
<div className="space-y-1">
10+
<h1 className="text-4xl font-bold text-gray-900">
11+
Welcome to Hiro Docs.
12+
</h1>
13+
<h2 className="text-2xl font-bold text-muted-foreground">
14+
Explore our tutorials, guides, API references, and more.
15+
</h2>
16+
</div>
17+
18+
<div className="grid md:grid-cols-2 gap-6 mb-16">
19+
{/* Stacks Docs Card */}
20+
<Link
21+
href="/stacks"
22+
className="not-prose block rounded-lg border bg-card p-4 text-md text-card-foreground transition-colors hover:bg-accent/80"
23+
>
24+
<div className="mb-6">
25+
<div className="w-20 h-20 rounded-lg flex items-center justify-center mb-4">
26+
<StacksCardIcon />
6527
</div>
28+
<h3 className="text-xl font-semibold mb-2">Stacks Docs</h3>
29+
<p className="text-muted-foreground">Start building on Stacks.</p>
30+
</div>
6631

67-
<Integration
68-
className="border-t lg:col-span-2"
69-
codeBlocks={[
70-
{
71-
key: "clarinet",
72-
message: "Install now and start building!",
73-
block: (
74-
<CodeBlock
75-
wrapper={{ className: "mt-2" }}
76-
lang="bash"
77-
code="brew install clarinet"
78-
/>
79-
),
80-
},
81-
{
82-
key: "stacks.js",
83-
message: "Try it in your terminal!",
84-
block: (
85-
<CodeBlock
86-
wrapper={{ className: "mt-2" }}
87-
lang="bash"
88-
code="npx create stacks"
89-
/>
90-
),
91-
},
92-
{
93-
key: "chainhook",
94-
message: "Install now and start scanning!",
95-
block: (
96-
<CodeBlock
97-
wrapper={{ className: "mt-2" }}
98-
lang="bash"
99-
code="brew install chainhook"
100-
/>
101-
),
102-
},
103-
]}
104-
/>
32+
<div className="flex flex-wrap gap-2">
33+
<Badge
34+
variant="secondary"
35+
className="bg-background/95 text-gray-900"
36+
>
37+
CLARINET
38+
</Badge>
39+
<Badge
40+
variant="secondary"
41+
className="bg-background/95 text-gray-900"
42+
>
43+
CHAINHOOK
44+
</Badge>
45+
<Badge
46+
variant="secondary"
47+
className="bg-background/95 text-gray-900"
48+
>
49+
STACKS.JS
50+
</Badge>
51+
<Badge
52+
variant="secondary"
53+
className="bg-background/95 text-gray-900"
54+
>
55+
HIRO PLATFORM
56+
</Badge>
57+
<Badge
58+
variant="secondary"
59+
className="bg-background/95 text-gray-900"
60+
>
61+
STACKS API
62+
</Badge>
63+
<Badge
64+
variant="secondary"
65+
className="bg-background/95 text-gray-900"
66+
>
67+
TOKEN METADATA API
68+
</Badge>
69+
<Badge
70+
variant="secondary"
71+
className="bg-background/95 text-gray-900"
72+
>
73+
+3 MORE
74+
</Badge>
75+
</div>
76+
</Link>
77+
<Link
78+
href="/bitcoin"
79+
className="not-prose block rounded-lg border bg-card p-4 text-md text-card-foreground transition-colors hover:bg-accent/80"
80+
>
81+
<div className="mb-6">
82+
<div className="w-20 h-20 rounded-lg flex items-center justify-center mb-4">
83+
<BitcoinCardIcon />
84+
</div>
85+
<h3 className="text-xl font-semibold mb-2">Bitcoin Docs</h3>
86+
<p className="text-muted-foreground">
87+
Start building on Ordinals and Runes.
88+
</p>
10589
</div>
90+
<div className="flex flex-wrap gap-2">
91+
<Badge
92+
variant="secondary"
93+
className="bg-background/95 text-gray-900"
94+
>
95+
ORDHOOK
96+
</Badge>
97+
<Badge
98+
variant="secondary"
99+
className="bg-background/95 text-gray-900"
100+
>
101+
ORDINALS API
102+
</Badge>
103+
<Badge
104+
variant="secondary"
105+
className="bg-background/95 text-gray-900"
106+
>
107+
RUNES API
108+
</Badge>
109+
</div>
110+
</Link>
111+
</div>
112+
113+
<main className="space-y-6">
114+
<div className="space-y-1">
115+
<h2 className="text-2xl font-bold">Need help getting started?</h2>
116+
<p className="text-xl text-muted-foreground">
117+
Check out these resources.
118+
</p>
119+
</div>
120+
121+
<div className="grid md:grid-cols-4 gap-6">
122+
<Link href="/stacks/get-started" className="block h-full">
123+
<Card className="p-6 border bg-card h-full flex flex-col">
124+
<h3 className="text-lg font-semibold mb-2">
125+
Get started with Stacks
126+
</h3>
127+
<p className="text-muted-foreground text-sm flex-grow">
128+
Build on Stacks with some of our most popular guides and
129+
tutorials.
130+
</p>
131+
</Card>
132+
</Link>
133+
<Link href="/stacks/api" className="block h-full">
134+
<Card className="p-6 border bg-card h-full flex flex-col">
135+
<h3 className="text-lg font-semibold mb-2">
136+
Stacks API Overview
137+
</h3>
138+
<p className="text-muted-foreground text-sm flex-grow">
139+
View the API reference for the Stacks API.
140+
</p>
141+
</Card>
142+
</Link>
143+
<Link href="/bitcoin/get-started" className="block h-full">
144+
<Card className="p-6 border bg-card h-full flex flex-col">
145+
<h3 className="text-lg font-semibold mb-2">
146+
Get started with Bitcoin
147+
</h3>
148+
<p className="text-muted-foreground text-sm flex-grow">
149+
Build on Bitcoin with some of our most popular guides and
150+
tutorials.
151+
</p>
152+
</Card>
153+
</Link>
154+
<Link href="/bitcoin/ordinals/api" className="block h-full">
155+
<Card className="p-6 border bg-card h-full flex flex-col">
156+
<h3 className="text-lg font-semibold mb-2">
157+
Ordinals API Overview
158+
</h3>
159+
<p className="text-muted-foreground text-sm flex-grow">
160+
View the API reference for our Ordinals API.
161+
</p>
162+
</Card>
163+
</Link>
106164
</div>
107165
</main>
108-
</>
166+
</main>
109167
);
110168
}

0 commit comments

Comments
 (0)