Skip to content

Commit

Permalink
👍 feat(docs): adding docs and navigations
Browse files Browse the repository at this point in the history
  • Loading branch information
nyomansunima committed Dec 19, 2024
1 parent 4baffe1 commit a677da9
Show file tree
Hide file tree
Showing 28 changed files with 961 additions and 71 deletions.
22 changes: 13 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,33 @@
## [v2.0.1](https://github.com/brook-code-theme/official-website/releases/tag/v2.0.1) - 2024-12-10 06:53:30

## What's Changed
* npm(deps): bump next from 15.0.3 to 15.0.4 by @dependabot in https://github.com/brook-code-theme/official-website/pull/10
* npm(deps-dev): bump eslint-config-next from 15.0.3 to 15.0.4 by @dependabot in https://github.com/brook-code-theme/official-website/pull/8
* npm(deps-dev): bump @types/node from 20.17.9 to 22.10.1 by @dependabot in https://github.com/brook-code-theme/official-website/pull/6
* npm(deps-dev): bump eslint from 8.57.1 to 9.16.0 by @dependabot in https://github.com/brook-code-theme/official-website/pull/7
* npm(deps): bump react-dom from 19.0.0-rc-66855b96-20241106 to 19.0.0 by @dependabot in https://github.com/brook-code-theme/official-website/pull/9

- npm(deps): bump next from 15.0.3 to 15.0.4 by @dependabot in https://github.com/brook-code-theme/official-website/pull/10
- npm(deps-dev): bump eslint-config-next from 15.0.3 to 15.0.4 by @dependabot in https://github.com/brook-code-theme/official-website/pull/8
- npm(deps-dev): bump @types/node from 20.17.9 to 22.10.1 by @dependabot in https://github.com/brook-code-theme/official-website/pull/6
- npm(deps-dev): bump eslint from 8.57.1 to 9.16.0 by @dependabot in https://github.com/brook-code-theme/official-website/pull/7
- npm(deps): bump react-dom from 19.0.0-rc-66855b96-20241106 to 19.0.0 by @dependabot in https://github.com/brook-code-theme/official-website/pull/9

## New Contributors
* @dependabot made their first contribution in https://github.com/brook-code-theme/official-website/pull/10

- @dependabot made their first contribution in https://github.com/brook-code-theme/official-website/pull/10

**Full Changelog**: https://github.com/brook-code-theme/official-website/compare/v2.0.0...v2.0.1

## [v2.0.0](https://github.com/brook-code-theme/official-website/releases/tag/v2.0.0) - 2024-11-29 13:37:07

## What's Changed
* Add multiple pages by @nyomansunima in https://github.com/brook-code-theme/official-website/pull/5

- Add multiple pages by @nyomansunima in https://github.com/brook-code-theme/official-website/pull/5

## New Contributors
* @nyomansunima made their first contribution in https://github.com/brook-code-theme/official-website/pull/5

- @nyomansunima made their first contribution in https://github.com/brook-code-theme/official-website/pull/5

**Full Changelog**: https://github.com/brook-code-theme/official-website/compare/v1.0.0...v2.0.0

## [v1.0.0](https://github.com/brook-code-theme/official-website/releases/tag/v1.0.0) - 2024-11-25 16:11:43

**Full Changelog**: https://github.com/brook-code-theme/official-website/commits/v1.0.0

\* *This CHANGELOG was automatically generated by [auto-generate-changelog](https://github.com/BobAnkh/auto-generate-changelog)*
\* _This CHANGELOG was automatically generated by [auto-generate-changelog](https://github.com/BobAnkh/auto-generate-changelog)_
Binary file modified bun.lockb
Binary file not shown.
35 changes: 19 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,38 @@
},
"dependencies": {
"@flaticon/flaticon-uicons": "^3.3.1",
"@radix-ui/react-accordion": "^1.2.1",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-toast": "^1.2.2",
"@radix-ui/react-tooltip": "^1.1.4",
"@radix-ui/react-accordion": "^1.2.2",
"@radix-ui/react-slot": "^1.1.1",
"@radix-ui/react-toast": "^1.2.4",
"@radix-ui/react-tooltip": "^1.1.6",
"dayjs": "^1.11.13",
"lenis": "^1.1.16",
"motion": "^11.13.3",
"next": "15.1.0",
"next-themes": "^0.4.3",
"posthog-js": "^1.188.0",
"lenis": "^1.1.18",
"motion": "^11.15.0",
"next": "15.1.1",
"next-mdx-remote-client": "^1.0.3",
"next-themes": "^0.4.4",
"posthog-js": "^1.202.2",
"react": "19.0.0",
"react-dom": "19.0.0"
"react-dom": "19.0.0",
"rehype-slug": "^6.0.0",
"remark-flexible-toc": "^1.1.1"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.9",
"@tailwindcss/typography": "^0.5.15",
"@types/node": "^22",
"@types/react": "^18",
"@types/react": "^19",
"@types/react-dom": "^19",
"autoprefixer": "^10.4.20",
"class-variance-authority": "^0.7.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"eslint": "^9",
"eslint-config-next": "15.1.0",
"eslint-config-next": "15.1.1",
"eslint-config-prettier": "^9.1.0",
"postcss": "^8.4.49",
"prettier": "^3.3.3",
"tailwind-merge": "^2.5.4",
"tailwindcss": "^3.4.15",
"prettier": "^3.4.2",
"tailwind-merge": "^2.5.5",
"tailwindcss": "^3.4.17",
"tailwindcss-animate": "^1.0.7",
"typescript": "^5"
}
Expand Down
Binary file added src/app/apple-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions src/app/docs/[[...slug]]/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { CenterContent, LeftContent, RightContent } from '@features/docs'
import * as React from 'react'

type Params = {
slug: string[] | undefined
}

type DocsLayoutProps = {
children: React.ReactNode
params: Promise<Params>
}

export default async function DocsLayout({
children,
params,
}: DocsLayoutProps): Promise<React.ReactElement> {
const { slug } = await params

return (
<main className="flex mt-28 min-h-screen relative">
<LeftContent />
<CenterContent slug={slug}>{children}</CenterContent>
<RightContent slug={slug} />
</main>
)
}
60 changes: 60 additions & 0 deletions src/app/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import { DocsContent, getAllDocsPaths, getDocMetadata } from '@features/docs'
import { sharedMetadata } from '@shared/libs'
import { Metadata, ResolvingMetadata } from 'next'
import * as React from 'react'

type Params = {
slug: string[] | undefined
}

type DocsPageProps = {
params: Promise<Params>
}

export async function generateMetadata(
{ params }: DocsPageProps,
parent: ResolvingMetadata,
): Promise<Metadata> {
const { slug } = await params
const meta = await getDocMetadata(slug)
const previousOgImages = (await parent).openGraph?.images || []
const previousTwitterImages = (await parent).twitter?.images || []

return {
title: meta.title,
description: meta.description,
openGraph: {
...sharedMetadata.openGraph,
title: meta.title,
description: meta.description,
images: [...previousOgImages],
},
twitter: {
...sharedMetadata.twitter,
title: meta.title,
description: meta.description,
images: [...previousTwitterImages],
},
}
}

export async function generateStaticParams(): Promise<Params[]> {
const paths = await getAllDocsPaths()
const staticParams = paths.map((path) => ({
slug: [path],
}))

return staticParams
}

export default async function DocsPage({
params,
}: DocsPageProps): Promise<React.ReactElement> {
const { slug } = await params

return (
<div className="flex flex-col">
<DocsContent slug={slug} />
</div>
)
}
31 changes: 0 additions & 31 deletions src/app/docs/page.tsx

This file was deleted.

11 changes: 6 additions & 5 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ export default function RootLayout({
children,
}: Readonly<RootLayoutProps>): React.ReactElement {
return (
<html lang="en" suppressHydrationWarning>
<html
lang="en"
suppressHydrationWarning
className={`${fonts.geistSans.variable} ${fonts.geistMono.variable}`}
>
<PosthogProvider>
<AnimationProvider>
<body
className={`${fonts.geistSans.variable} ${fonts.geistMono.variable}`}
suppressHydrationWarning
>
<body suppressHydrationWarning>
<ThemeProvider
enableSystem
attribute={'class'}
Expand Down
33 changes: 33 additions & 0 deletions src/features/docs/breadcrumb.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import Link from 'next/link'
import * as React from 'react'
import { getBreadcrumb } from './docs-service'

type BreadcrumbProps = {
slug: string[] | undefined
}

export async function Breadcrumb({
slug,
}: BreadcrumbProps): Promise<React.ReactElement> {
const { title, link } = await getBreadcrumb(slug)

return (
<div className="flex items-center w-full text-sm text-foreground/60 gap-1">
<Link
href={'/docs'}
className="transition-all duration-300 hover:text-foreground"
>
Docs
</Link>

<i className="fi fi-rr-angle-small-right" />

<Link
href={link}
className="transition-all duration-300 hover:text-foreground"
>
{title}
</Link>
</div>
)
}
21 changes: 21 additions & 0 deletions src/features/docs/center-content.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as React from 'react'
import { Breadcrumb } from './breadcrumb'

type CenterContentProps = {
children: React.ReactNode
slug: string[] | undefined
}

export function CenterContent({
children,
slug,
}: CenterContentProps): React.ReactElement {
return (
<div className="flex container mx-auto">
<div className="flex flex-col w-9/12 mx-auto gap-6 pb-28 tablet:pb-36">
<Breadcrumb slug={slug} />
<div className="flex w-full">{children}</div>
</div>
</div>
)
}
89 changes: 89 additions & 0 deletions src/features/docs/content/configuration.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
title: Introduction
description: Welcome to Brook Code Theme!
publishedAt: 2024-12-19
---

Brook Code Theme is your ultimate companion for an elegant and productive coding experience. Designed with developers in mind, this theme brings a **clean**, **balanced**, and **visually appealing** look to your favorite code editors.

## 🌟 Why Brook Code Theme?

Brook Code Theme stands out by offering:

- **Elegant Syntax Highlighting**
Say goodbye to cluttered code. Enjoy a balanced color palette that improves readability and keeps your focus intact during long coding sessions.

- **Dark and Light Modes**
Switch effortlessly between dark and light themes to match your coding environment and preference.

- **Multi-Editor Support**
Compatible with popular editors, including:

- **VSCode**

- **JetBrains IDEs**

- **Zed**
- And more!

- **Language Versatility**
Optimized for a wide range of programming languages, including:
- **JavaScript**, **TypeScript**, **Python**, **Go**, **Rust**, **HTML**, and **CSS**.

## 🎨 Key Features

1. **Aesthetic Design**
Enjoy a polished theme with carefully selected colors that are easy on the eyes.

2. **Focus-Driven Color Palette**
Each color is chosen to emphasize the structure and syntax of your code, reducing cognitive load and improving productivity.

3. **Flexible Variants**
Choose between subtle pastel tones or vibrant colors to suit your coding style.

4. **Cross-Platform Compatibility**
Works seamlessly across multiple platforms and editors for a consistent experience.

## 🚀 Installation Guide

### For VSCode

1. Open the Extensions Marketplace.
2. Search for **Brook Code Theme**.
3. Click "Install" and select the theme from your settings.

### For JetBrains IDEs

1. Download the theme file from the official website (coming soon!).
2. Import the theme in **Preferences > Appearance & Behavior > Themes**.
3. Apply the theme and start coding.

### For Zed

1. Follow the Zed documentation for custom theme installation.
2. Copy the Brook Code Theme configuration file.
3. Activate the theme in Zed.

## 📸 Preview

Here’s a sneak peek of Brook Code Theme in action:

- **Dark Mode**: A moody, elegant theme with perfect contrast.
- **Light Mode**: Bright and vibrant for daylight coding sessions.

_Full previews and live demos will be available on our official website._

## ✨ Future Plans

Brook Code Theme is evolving! Here’s what’s next:

- **More Editor Support**: Expand compatibility to editors like Sublime Text and Atom.
- **Terminal Themes**: Matching themes for terminal applications like iTerm2 and Warp.
- **Customizable Options**: Tools to tweak the theme and make it truly yours.

Brook Code Theme is designed to enhance your coding experience, whether you're
building apps, writing scripts, or crafting web designs.

**Get ready to code in style. Let Brook Code Theme be your go-to choice for a seamless coding environment!**

Stay tuned for updates, or follow us on [GitHub](#) for the latest releases.
Loading

0 comments on commit a677da9

Please sign in to comment.