Skip to content
angiez23Public

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

website-revamp (Next.js)

Angie Zhang's portfolio -- Next.js App Router + TypeScript + Framer Motion.

Run it

npm install
npm run dev

Then open http://localhost:3000.

npm run build produces a production build. npm run start serves it.

Structure

app/
  layout.tsx            root layout -- loads fonts via next/font/google,
                         wraps everything in ThemeProvider, renders Nav + Footer
  globals.css            the ONE stylesheet: tokens, theme, and every
                         page/component's styles, imported once here
  page.tsx                Home ("/")
  projects/
    page.tsx               full project list
    [slug]/page.tsx         placeholder case-study page
  gallery/
    page.tsx                masonry grid, singles open a lightbox,
                            stacks link to their collection page
    [slug]/page.tsx          placeholder full-collection page
  blog/
    page.tsx                 simple post list
    [slug]/page.tsx           placeholder full post page

components/
  Nav.tsx                 "use client" -- uses usePathname for active links
  Footer.tsx                "use client" -- Framer Motion scroll reveal + wordmark
  ProjectCard.tsx            shared by Home (featured) and the Projects page
  Lightbox.tsx               "use client" -- Framer Motion AnimatePresence
  ThemeProvider.tsx          "use client" -- calls useTimeTheme() inside the
                             (server) root layout

data/                    edit these to change actual site content
  projects.ts
  gallery.ts
  blog.ts

hooks/useTimeTheme.ts    sets data-theme on <html> based on local hour
types/index.ts           shared TypeScript types

public/
  images/                drop real photos here (see images/README.md)
  resume.pdf              add your actual resume here

Editing content

Edit the arrays in data/projects.ts, gallery.ts, and blog.ts -- every card/list on every page is generated from those, not hand-duplicated.

  • A project's readMoreUrl and externalUrl are both optional -- omit either one and that button just won't render (the remaining button automatically becomes styled as primary via .btn-row .btn:only-child in globals.css).
  • A gallery item's type is either "single" (opens a lightbox) or "stack" (links to /gallery/[slug]) -- see types/index.ts.

Editing the look

Everything visual lives in app/globals.css (one file, per preference, not CSS Modules):

  • Colors -- edit the base palette block, or the four [data-theme="..."] blocks to change what each time-of-day theme maps to.
  • Fonts -- loaded via next/font/google in app/layout.tsx (Xanh Mono / Newsreader / Geologica), exposed as CSS variables that globals.css points --font-display/body/mono at. Swap the font import in layout.tsx if you change these -- no <link> tags needed, Next self-hosts them automatically.
  • Corner radius -- --radius-sm/md/lg/pill, currently all 0px for the sharp/blocky look.
  • Spacing -- --space-1 through --space-8.

Time-of-day theming

ThemeProvider (rendered in app/layout.tsx) calls useTimeTheme(), which sets data-theme on <html> based on the visitor's local hour and re-checks every 10 minutes. Import setManualTheme from hooks/useTimeTheme.ts if you ever add a manual toggle button -- it locks the theme for the session so the automatic check stops overriding it.

Notes on this migration

  • Every interactive piece (Framer Motion, usePathname, useState) is marked "use client"; everything else is a plain server component.
  • Dynamic routes ([slug]) use generateStaticParams so they're statically generated at build time from the data files, and call notFound() for anything not in the list.
  • All CSS lives in one globals.css imported once in the root layout -- matches the global-CSS-over-modules approach from the original site, and avoids Next's CSS Modules requirement for anything imported outside the root layout.

Known placeholders

  • All images point at files that don't exist yet -- see public/images/README.md.
  • [slug] pages under projects/gallery/blog are minimal placeholder layouts, not the real case-study/post/collection design -- flesh these out whenever you're ready to work on them.

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages