Skip to content

Commit e07985a

Browse files
committed
feat: added changelog to the header
1 parent 51d3eb0 commit e07985a

6 files changed

Lines changed: 1135 additions & 108 deletions

File tree

‎package.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"@radix-ui/react-toggle": "^1.1.8",
4747
"@radix-ui/react-toggle-group": "^1.1.9",
4848
"@radix-ui/react-tooltip": "^1.2.6",
49+
"@tailwindcss/typography": "^0.5.19",
4950
"@tanstack/react-virtual": "^3.13.8",
5051
"@tiptap/extension-horizontal-rule": "^2.11.7",
5152
"@tiptap/extension-text-align": "^2.11.7",
@@ -78,9 +79,11 @@
7879
"react-frame-component": "^5.2.7",
7980
"react-hook-form": "^7.56.2",
8081
"react-icons": "^5.5.0",
82+
"react-markdown": "^10.1.0",
8183
"react-payment-inputs": "^1.2.0",
8284
"react-resizable-panels": "^3.0.1",
8385
"recharts": "^2.15.3",
86+
"remark-gfm": "^4.0.0",
8487
"simple-icons": "^14.11.1",
8588
"sonner": "^2.0.3",
8689
"styled-components": "^6.1.19",

‎src/app/changelog/page.tsx‎

Lines changed: 91 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,120 +1,107 @@
11
import Header from "@/components/landingpage/header";
22
import Footer from "@/components/landingpage/footer";
3-
import { Badge } from "@/components/ui/badge";
3+
import type { ComponentProps } from "react";
4+
import ReactMarkdown from "react-markdown";
5+
import remarkGfm from "remark-gfm";
6+
import {
7+
Breadcrumb,
8+
BreadcrumbItem,
9+
BreadcrumbLink,
10+
BreadcrumbList,
11+
BreadcrumbSeparator,
12+
} from "@/components/ui/breadcrumb";
13+
import { Link, ArrowRight } from "lucide-react";
14+
import { Separator } from "@/components/ui/separator";
415
import { Button } from "@/components/ui/button";
5-
import { ArrowUpRight } from "lucide-react";
6-
import Image from "next/image";
716

8-
export type ChangelogEntry = {
9-
version: string;
10-
date: string;
11-
title: string;
12-
description: string;
13-
items?: string[];
14-
image?: string;
15-
button?: {
16-
url: string;
17-
text: string;
18-
};
19-
};
20-
21-
const changelogEntries: ChangelogEntry[] = [
22-
{
23-
version: "Version 1.0.0",
24-
date: "24 October 2025",
25-
title: "Initial Release - Form Builder Platform",
26-
description: "We're excited to announce the launch of our comprehensive form builder platform. This initial release includes all the core features needed to create beautiful, responsive forms with drag-and-drop simplicity.",
27-
items: [
28-
"Drag-and-drop form builder with intuitive interface",
29-
"Comprehensive form component library (inputs, selects, checkboxes, etc.)",
30-
"WYSIWYG text editor with rich formatting options",
31-
"Icon picker with extensive icon library",
32-
"Form validation system with real-time feedback",
33-
"Template system with pre-designed form templates",
34-
"User authentication and form management",
35-
"Code generation for React components",
36-
"Responsive design with container queries",
37-
"JSON import/export functionality",
38-
"Form examples and best practices",
39-
"Mobile-optimized interface"
40-
],
41-
button: {
42-
url: "/builder",
43-
text: "Try the Builder"
44-
}
17+
async function fetchChangelog(): Promise<string> {
18+
// Use raw GitHub URL to fetch plain Markdown content
19+
const res = await fetch(
20+
"https://raw.githubusercontent.com/iduspara/shadcn-builder/refs/heads/main/CHANGELOG.md",
21+
{ next: { revalidate: 60 } }
22+
);
23+
if (!res.ok) {
24+
return "Failed to load changelog.";
4525
}
46-
];
26+
return res.text();
27+
}
4728

48-
export default function ChangelogPage() {
29+
export default async function ChangelogPage() {
30+
const markdown = await fetchChangelog();
4931
return (
50-
<div className="min-h-screen bg-background">
32+
<div>
5133
<Header />
52-
53-
<main className="pt-20">
54-
<section className="py-32">
55-
<div className="container">
56-
<div className="mx-auto max-w-3xl">
57-
<h1 className="mb-4 text-3xl font-bold tracking-tight md:text-5xl">
58-
Changelog
59-
</h1>
60-
<p className="text-muted-foreground mb-6 text-base md:text-lg">
61-
Get the latest updates and improvements to our platform.
62-
</p>
34+
<main className="container mx-auto px-4 py-16 md:py-24 max-w-7xl">
35+
<div className="space-y-8">
36+
{/* Header */}
37+
<div className="space-y-4">
38+
<Breadcrumb className="mb-4">
39+
<BreadcrumbList>
40+
<BreadcrumbItem>
41+
<BreadcrumbLink href="/">Home</BreadcrumbLink>
42+
</BreadcrumbItem>
43+
<BreadcrumbSeparator />
44+
<BreadcrumbItem>
45+
<BreadcrumbLink href="/changelog">Changelog</BreadcrumbLink>
46+
</BreadcrumbItem>
47+
</BreadcrumbList>
48+
</Breadcrumb>
49+
<div className="space-y-6">
50+
<div className="flex items-center gap-3">
51+
<div>
52+
<h1 className="text-4xl font-bold tracking-tight">
53+
Changelog
54+
</h1>
55+
</div>
56+
</div>
6357
</div>
64-
<div className="mx-auto mt-16 max-w-3xl space-y-16 md:mt-24 md:space-y-24">
65-
{changelogEntries.map((entry, index) => (
66-
<div
67-
key={index}
68-
className="relative flex flex-col gap-4 md:flex-row md:gap-16"
69-
>
70-
<div className="top-8 flex h-min w-64 shrink-0 items-center gap-4 md:sticky">
71-
<Badge variant="secondary" className="text-xs">
72-
{entry.version}
73-
</Badge>
74-
<span className="text-muted-foreground text-xs font-medium">
75-
{entry.date}
76-
</span>
77-
</div>
78-
<div className="flex flex-col">
79-
<h2 className="text-foreground/90 mb-3 text-lg font-bold leading-tight md:text-2xl">
80-
{entry.title}
81-
</h2>
82-
<p className="text-muted-foreground text-sm md:text-base">
83-
{entry.description}
84-
</p>
85-
{entry.items && entry.items.length > 0 && (
86-
<ul className="text-muted-foreground ml-4 mt-4 space-y-1.5 text-sm md:text-base">
87-
{entry.items.map((item, itemIndex) => (
88-
<li key={itemIndex} className="list-disc">
89-
{item}
90-
</li>
91-
))}
92-
</ul>
93-
)}
94-
{entry.image && (
95-
<Image
96-
src={entry.image}
97-
alt={`${entry.version} visual`}
98-
width={800}
99-
height={400}
100-
className="mt-8 w-full rounded-lg object-cover"
58+
</div>
59+
60+
<Separator />
61+
62+
<section className="space-y-6">
63+
<article className="prose">
64+
<ReactMarkdown
65+
remarkPlugins={[remarkGfm]}
66+
components={{
67+
a(props: ComponentProps<"a">) {
68+
return (
69+
<a
70+
{...props}
71+
target="_blank"
72+
rel="noopener noreferrer"
73+
className="underline hover:opacity-80"
10174
/>
102-
)}
103-
{entry.button && (
104-
<Button variant="link" className="mt-4 self-end" asChild>
105-
<a href={entry.button.url}>
106-
{entry.button.text} <ArrowUpRight className="h-4 w-4" />
107-
</a>
108-
</Button>
109-
)}
110-
</div>
111-
</div>
112-
))}
75+
);
76+
},
77+
}}
78+
>
79+
{markdown}
80+
</ReactMarkdown>
81+
</article>
82+
</section>
83+
84+
<div className="bg-dotted border rounded-lg p-8 text-center space-y-4 mt-12">
85+
<h3 className="text-2xl font-semibold">Ready to start building?</h3>
86+
<p className="text-muted-foreground max-w-2xl mx-auto">
87+
Take these components for a spin in our interactive form builder.
88+
Drag, drop, and customize to create the perfect form for your needs.
89+
</p>
90+
<div className="flex flex-col sm:flex-row gap-4 justify-center">
91+
<Button size="lg" asChild>
92+
<a href="/builder">
93+
Open Form Builder <ArrowRight className="h-4 w-4 ml-2" />
94+
</a>
95+
</Button>
96+
<Button size="lg" variant="outline" asChild>
97+
<Link href="/templates">
98+
Browse Templates
99+
</Link>
100+
</Button>
113101
</div>
114102
</div>
115-
</section>
103+
</div>
116104
</main>
117-
118105
<Footer />
119106
</div>
120107
);

‎src/app/globals.css‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
---break---
44
*/
55
@plugin 'tailwindcss-animate';
6+
@plugin "@tailwindcss/typography";
67
/*
78
---break---
89
*/

‎src/components/landingpage/header.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default function Header() {
3434
{ href: "/", label: "Home" },
3535
{ href: "/components", label: "Components" },
3636
{ href: "/templates", label: "Templates" },
37+
{ href: "/changelog", label: "Changelog" },
3738
{ href: "/faq", label: "FAQ" },
3839
{ href: "/about", label: "About" },
3940
];

‎src/types/markdown-modules.d.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
declare module "react-markdown";
2+
declare module "remark-gfm";
3+

0 commit comments

Comments
 (0)