Skip to content

Commit d0eb551

Browse files
authored
Merge pull request #430 from code-hike/next
Add pricing
2 parents a464f5d + e8fe340 commit d0eb551

File tree

3 files changed

+88
-5
lines changed

3 files changed

+88
-5
lines changed

Diff for: apps/web/app/landing/sponsors.tsx

+76
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,82 @@ import UidevLogo from "./logo.uidev.svg"
77
import Image from "next/image"
88
import Link from "next/link"
99
import sponsorData from "./sponsors.json"
10+
import { Check, CheckCheck, Heart } from "lucide-react"
11+
12+
export function Pricing() {
13+
const current = 624
14+
const goal = 950
15+
return (
16+
<section className="max-w-3xl mx-2 pb-12">
17+
<h3 className="text-center pb-12 text-primary/60 text-lg">Pricing</h3>
18+
<div className="grid gap-4 md:grid-cols-2 md:gap-4">
19+
<div className="flex flex-col items-center space-y-4 border py-4 rounded min-h-72">
20+
<h4 className="text-2xl font-bold py-4">Free</h4>
21+
<ul className="space-y-2 text-sm text-muted-foreground">
22+
<li>
23+
<Check className="inline text-green-400" size={20} /> Full access
24+
to all features
25+
</li>
26+
<li>
27+
<Check className="inline text-green-400" size={20} /> Regular
28+
updates
29+
</li>
30+
<li>
31+
<Check className="inline text-green-400" size={20} />{" "}
32+
Comprehensive documentation
33+
</li>
34+
<li>
35+
<Check className="inline text-green-400" size={20} /> Support on
36+
GitHub and Discord
37+
</li>
38+
<li>
39+
<Check className="inline text-green-400" size={20} /> Plenty
40+
copy-pastable examples
41+
</li>
42+
</ul>
43+
<div className="flex-1" />
44+
<Link
45+
href="/docs"
46+
className="block border rounded p-2 mx-4 text-center hover:border-primary transition-colors self-stretch text-muted-foreground hover:text-primary"
47+
>
48+
Get started
49+
</Link>
50+
</div>
51+
<div className="flex flex-col items-center space-y-4 border py-4 rounded min-h-72 border-pink-400">
52+
<h4 className="text-2xl font-bold py-4">Pay what you want</h4>
53+
<ul className="space-y-2 text-sm text-muted-foreground">
54+
<li>
55+
<CheckCheck className="inline text-green-400" size={20} />{" "}
56+
Everything in Free
57+
</li>
58+
<li>
59+
<Heart className="inline text-pink-400 align-bottom" size={18} />{" "}
60+
Contribute to sustainable open source
61+
</li>
62+
</ul>
63+
<div className="flex-1" />
64+
<div className="self-stretch mx-4 text-primary/70">
65+
<div className="text-xs pb-2 text-center">
66+
{Math.round((100 * current) / goal)}% towards $950 per month goal
67+
</div>
68+
<div className=" w-full h-2 bg-muted rounded-full overflow-hidden">
69+
<div
70+
className="h-full bg-pink-400 transition-all duration-500 ease-in-out"
71+
style={{ width: `${(100 * current) / goal}%` }}
72+
/>
73+
</div>
74+
</div>
75+
<Link
76+
href="https://github.com/sponsors/code-hike?metadata_source=pricing"
77+
className="block border text-primary border-pink-400/50 rounded p-2 mx-4 text-center hover:border-pink-400 transition-colors self-stretch"
78+
>
79+
Become a sponsor
80+
</Link>
81+
</div>
82+
</div>
83+
</section>
84+
)
85+
}
1086

1187
export function TopSponsors({
1288
title = "Top Sponsors",

Diff for: apps/web/app/page.tsx

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import Link from "next/link"
2-
import { AllSponsors, PoweredBy, TopSponsors } from "./landing/sponsors"
2+
import {
3+
AllSponsors,
4+
PoweredBy,
5+
Pricing,
6+
TopSponsors,
7+
} from "./landing/sponsors"
38
import { cn } from "../lib/utils"
49
import { Boxes } from "./landing/boxes"
510
import { Demo } from "./landing/demo"
@@ -31,7 +36,9 @@ export default function HomePage() {
3136

3237
<Boxes className="mb-24" />
3338

34-
<AllSponsors className="mb-24" title="Sponsors" cta="Sponsor Code Hike" />
39+
<Pricing />
40+
41+
<AllSponsors className="mb-24" title="Sponsors" />
3542

3643
<PoweredBy className="mb-8 text-center flex items-center justify-center gap-4 w-full flex-wrap" />
3744
</main>

Diff for: apps/web/content/blog/v1.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ Code Hike v1 introduces two new features: **fine-grained markdown** and **headle
2323

2424
### Fine-grained Markdown
2525

26-
When using Markdown, the content often becomes a large, inflexible block of UI that limits your control over its rendering.
26+
When using Markdown, the content often becomes an inflexible block of UI that limits your control over its rendering.
2727

28-
Code Hike allows you to break down your Markdown into smaller pieces, which you can then render however you like using React. This is done by using special decorators in Markdown:
28+
Code Hike allows you to break down your Markdown into smaller pieces, which can be rendered however you like using React. This is done by using special decorators in Markdown:
2929

3030
<FineGrained>
3131

@@ -212,7 +212,7 @@ Landing pages, marketing sites, portfolios. It doesn't even need content related
212212

213213
## Try Code Hike v1
214214

215-
Try it online on [StackBlitz](https://stackblitz.com/github/code-hike/v1-starter). Or clone the Code Hike v1 starter:
215+
Try it online on [StackBlitz](https://stackblitz.com/github/code-hike/v1-starter), or clone the Code Hike v1 starter:
216216

217217
```bash -c
218218
# !link[24:62] https://github.com/code-hike/v1-starter

0 commit comments

Comments
 (0)