Skip to content

Commit c02ab0f

Browse files
committed
refactor: reorganize component structure and update formatting scripts
1 parent 9c52ea6 commit c02ab0f

File tree

9 files changed

+18
-74
lines changed

9 files changed

+18
-74
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ This guide is for developers maintaining or contributing to this project.
5353
- `pnpm build`: Creates a production-ready build.
5454
- `pnpm start`: Starts the production server (requires `pnpm build` first).
5555
- `pnpm lint`: Runs ESLint to find code quality issues.
56-
- `pnpm prettier --write .`: Formats all files. It's recommended to use the [Prettier VSCode extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for format-on-save.
56+
- `pnpm format`: Formats all files. It's recommended to use the [Prettier VSCode extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for format-on-save.
5757
5858
## Project Structure
5959
@@ -62,11 +62,11 @@ This guide is for developers maintaining or contributing to this project.
6262
├── src/
6363
│ ├── app/ # Next.js App Router pages and layouts.
6464
│ ├── components/
65-
│ │ ├── features/ # Self-contained features (e.g., theme toggle).
66-
│ │ ├── layout/ # Global layout components (Header, Footer).
67-
│ │ ── sections/ # Reusable page sections (e.g., Hero, WhoWeAre).
68-
│ └── ui/ # Base UI components from shadcn/ui.
69-
│ └── lib/ # Utilities (cn function) and site configuration.
65+
│ │ ├── sections/ # Reusable large components.
66+
│ │ ├── primitives/ # Reusable small components.
67+
│ │ ── ui/ # Unmodified shadcn/ui components.
68+
── lib/ # Utilities and site configuration.
69+
│ └── providers/ # App-wide context and state providers.
7070
├── public/ # Static assets (images, icons).
7171
```
7272

src/app/join-us/page.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import { buildPageMetadata } from "@/lib/config";
33
import { AnimatedFillButton } from "@/components/primitives/animated-fill-button";
44
import { siteConfig } from "@/lib/config";
55

6-
const description =
7-
"Join The Team at ALPHA University Chapter at HKU, an initiative with great potential.";
6+
const description = "Join The Team at ALPHA University Chapter at HKU, an initiative with great potential.";
87
export const metadata: Metadata = buildPageMetadata("/join-us", { description });
98

109
export default function JoinUs() {
@@ -13,9 +12,7 @@ export default function JoinUs() {
1312
<h1 className="max-w-4xl text-2xl font-bold tracking-tight md:text-4xl">
1413
Join The Team at ALPHA University Chapter at HKU, an initiative with great potential.
1514
</h1>
16-
<p className="text-base text-muted-foreground md:text-lg">
17-
We provide opportunities for:
18-
</p>
15+
<p className="text-base text-muted-foreground md:text-lg">We provide opportunities for:</p>
1916
<div className="flex flex-wrap items-center justify-center gap-4 pt-2">
2017
{[
2118
{ label: "Full Membership", href: "" },

src/app/layout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { siteConfig } from "@/lib/config";
22
import type { Metadata } from "next";
33
import { GeistSans } from "geist/font/sans";
44
import "./globals.css";
5-
import { ThemeProvider } from "@/components/features/theme/theme-provider";
6-
import { Header } from "@/components/layout/header";
7-
import { Footer } from "@/components/layout/footer";
5+
import { ThemeProvider } from "@/providers/theme-provider";
6+
import { Header } from "@/components/sections/header";
7+
import { Footer } from "@/components/sections/footer";
88
import { Analytics } from "@vercel/analytics/next";
99
import { SpeedInsights } from "@vercel/speed-insights/next";
1010

src/components/primitives/animated-fill-button.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ export function AnimatedFillButton({ href, children }: AnimatedFillButtonProps)
1414
size="lg"
1515
className="rounded-full bg-gradient-to-r from-primary to-primary bg-no-repeat bg-[length:0%_100%] text-primary transition-[background-size,color] duration-300 hover:bg-[length:100%_100%] hover:text-primary-foreground"
1616
>
17-
<a href={href} target="_blank" rel="noopener">
17+
<a
18+
href={href}
19+
target="_blank"
20+
rel="noopener"
21+
>
1822
{children}
1923
</a>
2024
</Button>
File renamed without changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
NavigationMenuLink,
99
NavigationMenuList,
1010
} from "@/components/ui/navigation-menu";
11-
import { ModeToggle } from "@/components/features/theme/mode-toggle";
11+
import { ModeToggle } from "@/components/primitives/mode-toggle";
1212
import { Menu, Mail } from "lucide-react";
1313
import { FaLinkedin } from "react-icons/fa";
1414
import { SiGithub, SiInstagram } from "@icons-pack/react-simple-icons";
@@ -28,7 +28,7 @@ export function Header() {
2828
onOpenChange={setIsOpen}
2929
>
3030
<div className="sticky top-0 z-[var(--z-header)]">
31-
<header className="w-full border-b border-border/40 bg-background/60 backdrop-blur supports-[backdrop-filter]:bg-background/40">
31+
<header className="w-full border-b border-border/40 bg-background/80 backdrop-blur supports-[backdrop-filter]:bg-background/60">
3232
<div className="container flex h-16 max-w-full items-center justify-between px-4 lg:px-6">
3333
<div className="flex items-center gap-6">
3434
<Link

src/components/sections/image-banner.tsx

Lines changed: 0 additions & 57 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)