Skip to content

Commit

Permalink
Merge pull request #280 from nyomansunima/refactor/redesign
Browse files Browse the repository at this point in the history
update the structure and data fetching
  • Loading branch information
nyomansunima authored Dec 1, 2024
2 parents 28dc681 + 86d8782 commit ffdafef
Show file tree
Hide file tree
Showing 68 changed files with 342 additions and 1,334 deletions.
208 changes: 105 additions & 103 deletions CHANGELOG.md

Large diffs are not rendered by default.

Binary file modified bun.lockb
Binary file not shown.
124 changes: 0 additions & 124 deletions data/works/brook-code-theme.mdx

This file was deleted.

13 changes: 3 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,26 @@
},
"dependencies": {
"@flaticon/flaticon-uicons": "^3.3.1",
"@hookform/resolvers": "^3.9.0",
"@radix-ui/react-accordion": "^1.2.0",
"@radix-ui/react-hover-card": "^1.1.1",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.2",
"@tailwindcss/forms": "^0.5.9",
"@tanstack/react-query": "^5.62.0",
"@vercel/analytics": "^1.3.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"date-fns": "^4.1.0",
"lenis": "^1.1.6",
"next": "15.0.3",
"next-mdx-remote-client": "^1.0.3",
"next-themes": "^0.4.3",
"posthog-js": "^1.194.0",
"react": "19.0.0-rc.1",
"react-dom": "19.0.0-rc.1",
"react-hook-form": "^7.52.2",
"sonner": "^1.5.0",
"tailwind-merge": "^2.4.0",
"tailwindcss-animate": "^1.0.7",
"zod": "^3.23.8"
"tailwind-merge": "^2.4.0"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.9",
"@tailwindcss/typography": "^0.5.13",
"@tanstack/react-query-devtools": "^5.62.0",
"@types/node": "^22",
"@types/react": "npm:[email protected]",
"@types/react-dom": "npm:[email protected]",
Expand All @@ -52,6 +44,7 @@
"postcss": "^8",
"prettier": "^3.3.3",
"tailwindcss": "^3",
"tailwindcss-animate": "^1.0.7",
"typescript": "^5"
},
"overrides": {
Expand Down
Empty file removed public/images/.gitkeep
Empty file.
12 changes: 10 additions & 2 deletions src/app/global-error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,26 @@ export default function GlobalError({
<html
lang="en"
suppressHydrationWarning
className={`${fonts.inter.variable} ${fonts.dmMono.variable}`}
className={`${fonts.inter.variable}`}
>
<body suppressHydrationWarning>
<CenteredLayout>
<main className="min-h-screen py-20 tablet:pb-56">
<main className="min-h-screen py-20 tablet:py-36 tablet:pb-56">
<h1 className="!leading-tight text-3xl tablet:text-4xl text-center font-medium">
Something wrong!
</h1>

<p className="mt-7 !leading-relaxed laptop:w-10/12 text-center text-foreground">
Opps, something happen, don't panic. This can be happen when the
url is invalid or deleted, this mean your pages is not found.
Start explore another one, we help you find better way to navigate
through header and footer. “I’am your designer & developer”.
</p>

<div className="mt-16 flex justify-center">
<Button variant={'text'} size={'lg'} onClick={() => reset()}>
Try again
<i className="fi fi-rr-spinner" />
</Button>
</div>
</main>
Expand Down
25 changes: 11 additions & 14 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import Footer from '@shared/components/common/footer'
import { Toaster } from '@shared/components/ui/toast'
import { CenteredLayout } from '@shared/components/common/centered-layout'
import { PosthogProvider } from '@shared/providers/posthog-provider'
import { QueryProvider } from '@shared/providers/query-provider'
import * as fonts from '@shared/fonts'

export const metadata: Metadata = {
Expand Down Expand Up @@ -47,7 +46,7 @@ export default function RootLayout({
<html
lang="en"
suppressHydrationWarning
className={`${fonts.inter.variable} ${fonts.dmMono.variable}`}
className={`${fonts.inter.variable}`}
>
<PosthogProvider>
<body suppressHydrationWarning>
Expand All @@ -57,19 +56,17 @@ export default function RootLayout({
enableSystem={true}
disableTransitionOnChange
>
<QueryProvider>
<AnimationProvider>
<CenteredLayout>
<Header />
<main className="min-h-screen py-20 tablet:pb-56">
{children}
</main>
<Footer />
</CenteredLayout>
<AnimationProvider>
<CenteredLayout>
<Header />
<main className="min-h-screen py-20 tablet:pb-56">
{children}
</main>
<Footer />
</CenteredLayout>

<Toaster />
</AnimationProvider>
</QueryProvider>
<Toaster />
</AnimationProvider>
</ThemeProvider>

<VercelAnalytics />
Expand Down
2 changes: 1 addition & 1 deletion src/app/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function NotFound(): React.ReactElement {
className="transition-all hover:scale-95"
>
<Link href={'/'}>
Bring me back <i className="fi fi-rr-arrow-right" />
Bring me back <i className="fi fi-rr-paper-plane" />
</Link>
</Button>
</div>
Expand Down
49 changes: 49 additions & 0 deletions src/app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import config from '@shared/libs/config'
import { MetadataRoute } from 'next'

const BASE_URL = config.app.host

export default function sitemap(): MetadataRoute.Sitemap {
return [
{
url: `${BASE_URL}`,
lastModified: new Date().toISOString(),
},
{
url: `${BASE_URL}/contact`,
lastModified: new Date().toISOString(),
},
{
url: `${BASE_URL}/about`,
lastModified: new Date().toISOString(),
},
{
url: `${BASE_URL}/terms`,
lastModified: new Date().toISOString(),
},
{
url: `${BASE_URL}/privacy`,
lastModified: new Date().toISOString(),
},
{
url: `${BASE_URL}/crafts`,
lastModified: new Date().toISOString(),
},
{
url: `${BASE_URL}/journeys`,
lastModified: new Date().toISOString(),
},
{
url: `${BASE_URL}/stories`,
lastModified: new Date().toISOString(),
},
{
url: `${BASE_URL}/terms`,
lastModified: new Date().toISOString(),
},
{
url: `${BASE_URL}/works`,
lastModified: new Date().toISOString(),
},
]
}
51 changes: 0 additions & 51 deletions src/app/works/[slug]/page.tsx

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion src/features/contact/contact-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function ContactItem({ contact, children }: ContactItemProps) {
asChild={!isEmail}
variant={'outline'}
size={'lg'}
className="transition-all duration-500 hover:-translate-y-1 bg-ambient"
className="transition-all duration-500 hover:-translate-y-1 bg-surface"
onClick={() => {
if (isEmail) {
copyEmailToClipboard()
Expand Down
6 changes: 3 additions & 3 deletions src/features/contact/contact-list.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from 'react'
import { ContactItem } from './contact-item'
import * as contactService from './contact-service'
import { ContactItem, ContactItemData } from './contact-item'
import contactData from './contact-data.json'

const contacts = await contactService.getContacts()
const contacts = contactData.contacts as ContactItemData[]

export function ContactList() {
return (
Expand Down
Loading

0 comments on commit ffdafef

Please sign in to comment.