Skip to content

Commit efec033

Browse files
committed
docs: add minimal changes
1 parent 19bca67 commit efec033

File tree

5 files changed

+80
-40
lines changed

5 files changed

+80
-40
lines changed

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,11 @@ Thumbs.db
88
*.bkp
99
/dev
1010
/tmp
11-
/build
11+
/build
12+
13+
*.md
14+
!README.md
15+
!CONTRIBUTING.md
16+
!CHANGELOG.md
17+
!docs/**/*.md
18+
!examples/**/*.md

docs/README.md

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,7 @@
1-
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
1+
# GQLSchemaGen Docs
22

3-
## Getting Started
3+
[![Logo](../art/logo.svg)](../art/logo.svg)
44

5-
First, run the development server:
5+
This is the documentation for **GQLSchemaGen**, a tool to generate GraphQL schemas from Go structs.
66

7-
```bash
8-
npm run dev
9-
# or
10-
yarn dev
11-
# or
12-
pnpm dev
13-
# or
14-
bun dev
15-
```
16-
17-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18-
19-
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20-
21-
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22-
23-
## Learn More
24-
25-
To learn more about Next.js, take a look at the following resources:
26-
27-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29-
30-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31-
32-
## Deploy on Vercel
33-
34-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35-
36-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
7+
See the [full documentation website](https://pablor21.github.io/gqlschemagen) for more details.

docs/src/app/docs/nav.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ export default function DocsNavbar() {
159159
<NavbarItem data-active={isExamplesActive}>
160160
<Link
161161
as={NextLink}
162-
href="/examples"
162+
href="https://github.com/pablor21/gqlschemagen/tree/master/examples"
163+
target="_blank"
164+
rel="noopener noreferrer"
163165
color="foreground"
164166
className="text-sm"
165167
>

docs/src/app/layout.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Exo_2, Raleway } from "next/font/google";
44

55
import type { Metadata } from "next";
66
import { Providers } from "./providers";
7+
import Script from "next/script";
78

89
const raleway = Raleway({
910
variable: "--font-raleway",
@@ -60,9 +61,17 @@ export default function RootLayout({
6061
}>) {
6162
return (
6263
<html lang="en" className="dark">
64+
6365
<body
6466
className={`${raleway.variable} ${exo.variable} antialiased font-sans dark:bg-black`}
6567
>
68+
{process.env.NODE_ENV === "production" && (
69+
<Script
70+
defer
71+
src="https://analytics.pramirez.dev/script.js"
72+
data-website-id="0a9146bb-75d8-447c-80a1-3f37938fdc84"
73+
/>
74+
)}
6675
<Providers>{children}</Providers>
6776
</body>
6877
</html>

docs/src/app/page.tsx

Lines changed: 56 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
Button,
66
Card,
77
CardBody,
8+
Chip,
89
Link,
910
Navbar,
1011
NavbarContent,
@@ -80,7 +81,9 @@ export default function Home() {
8081
<NavbarItem>
8182
<Link
8283
as={NextLink}
83-
href="/examples"
84+
href="https://github.com/pablor21/gqlschemagen/tree/master/examples"
85+
target="_blank"
86+
rel="noopener noreferrer"
8487
color="foreground"
8588
className="text-sm"
8689
>
@@ -93,7 +96,7 @@ export default function Home() {
9396
<NavbarItem>
9497
<Button
9598
as={Link}
96-
href="[https://github.com/pablor21/gqlschemagen](https://github.com/pablor21/gqlschemagen)"
99+
href="https://github.com/pablor21/gqlschemagen"
97100
variant="ghost"
98101
startContent={<Github size={18} />}
99102
isExternal
@@ -120,14 +123,14 @@ export default function Home() {
120123
<main className="relative z-10 max-w-7xl mx-auto px-6 pt-20 pb-32">
121124
{/* Hero Section */}
122125
<div className="flex flex-col items-center text-center mb-32">
123-
{/* <Chip
126+
<Chip
124127
variant="flat"
125128
color="primary"
126129
className="mb-6 border border-primary/20 bg-primary/10"
127130
startContent={<Zap size={14} className="ml-1" />}
128131
>
129132
v1.0.0 Now Available
130-
</Chip> */}
133+
</Chip>
131134

132135
<h1 className="text-5xl md:text-7xl font-bold tracking-tight mb-6">
133136
Type-safe GraphQL <br />
@@ -278,7 +281,7 @@ type User struct {
278281
</div>
279282

280283
{/* Step 3 */}
281-
<div className="flex flex-col md:flex-row gap-8 items-start relative">
284+
<div className="flex flex-col md:flex-row gap-8 items-start relative mb-20 ">
282285
<div className="md:w-1/3 flex flex-col md:items-end md:text-right mt-4">
283286
<div className="text-6xl font-bold text-default-100 absolute -top-8 md:-right-6 -z-10 select-none">
284287
3
@@ -302,8 +305,56 @@ type User struct {
302305
</Card>
303306
</div>
304307
</div>
308+
309+
{/* Step 4 */}
310+
<div className="flex flex-col md:flex-row gap-8 items-start relative">
311+
<div className="md:w-1/3 flex flex-col md:items-end md:text-right mt-4">
312+
<div className="text-6xl font-bold text-default-100 absolute -top-8 md:-right-6 -z-10 select-none">
313+
4
314+
</div>
315+
<h3 className="text-xl font-bold text-primary mb-2">What you get?</h3>
316+
<p className="text-default-400">
317+
A beatifully generated GraphQL schema file ready to use in your server!!!
318+
</p>
319+
</div>
320+
<div className="md:w-2/3 w-full">
321+
<Card className="bg-[#0d1117] border-default-200 relative overflow-hidden">
322+
{/* MagicUI Border Beam */}
323+
<BorderBeam
324+
size={250}
325+
duration={12}
326+
delay={9}
327+
borderWidth={1.5}
328+
/>
329+
330+
<div className="flex items-center justify-between px-4 py-2 bg-default-50/5 border-b border-white/5">
331+
<div className="flex gap-2">
332+
<div className="w-3 h-3 rounded-full bg-red-500/20"></div>
333+
<div className="w-3 h-3 rounded-full bg-yellow-500/20"></div>
334+
<div className="w-3 h-3 rounded-full bg-green-500/20"></div>
335+
</div>
336+
<span className="text-xs text-default-500">
337+
graph/schema.graphqls
338+
</span>
339+
</div>
340+
<CardBody className="p-6 font-mono text-sm overflow-x-auto">
341+
<CodeBlock
342+
language="graphql"
343+
filename="schema.graphqls"
344+
label="GraphQL Schema"
345+
>{`"""Represents a user"""
346+
type UserProfile {
347+
id: ID!
348+
name: String!
349+
}`}</CodeBlock>
350+
</CardBody>
351+
</Card>
352+
</div>
353+
</div>
305354
</div>
306355

356+
357+
307358
{/* Final CTA */}
308359
<div className="mt-32 text-center">
309360
<Card className="max-w-3xl mx-auto bg-linear-to-b from-default-50 to-transparent border border-default-100">

0 commit comments

Comments
 (0)