Skip to content
BenjaminOddouPublic

About

πŸ“Έ My personal website dedicated to photography

Topics

Resources

Stars

102 stars

Watchers

2 watching

Forks

Latest commit

Β 

History

128 Commits

Folders and files

Repository files navigation

Netlify Status made with heart by Benjamin Oddou saythanks

Welcome to the repository of my personal website dedicated to Photography πŸ“Έ

🦾 Main Technologies

✨ Code Usage

The project is open source so you can use part of the code but not entirely. Also, don't use the style (CSS and assets) as it is personal and makes this website unique.

This code is under MIT Licence βš–οΈ

πŸ› οΈ Setup

  1. Install the current LTS version of Node.js (for example with nvm : nvm install --lts).

  2. Install pnpm. The version used by the project is pinned in the packageManager field of package.json (pnpm switches to it automatically).

  3. Create your .env file from the template, then fill in the keys (each one is documented in the file) :

    cp .env.example .env
  4. Install the dependencies :

    pnpm install

pnpm settings (supply-chain protections, packages allowed to run install scripts…) live in pnpm-workspace.yaml.

πŸ“œ Scripts

Command Description
pnpm dev Development server (also reachable from your local network)
pnpm build Production build (server-side rendering)
pnpm generate Pre-render every page into static HTML files
pnpm preview Preview the production build on port 8000
pnpm lint Check the code with ESLint
pnpm lint:fix Fix the code style automatically
pnpm update-deps Update every dependency to its latest version

πŸ—οΈ Structure

.
β”œβ”€β”€ app
β”‚   β”œβ”€β”€ app.vue              # Shell : SEO, preloader, menu, cursor and page transitions
β”‚   β”œβ”€β”€ error.vue            # Error page (404, 500…)
β”‚   β”œβ”€β”€ assets
β”‚   β”‚   β”œβ”€β”€ css/main.css     # Tailwind configuration (colors, breakpoints, easings) + reveal animations
β”‚   β”‚   └── svg/             # Checkbox checkmark
β”‚   β”œβ”€β”€ components
β”‚   β”‚   β”œβ”€β”€ icon/            # Static icons (logo, arrow)
β”‚   β”‚   β”œβ”€β”€ menu/            # Menu links, draggable photos and animated social icons
β”‚   β”‚   β”œβ”€β”€ MasonryWall.vue  # Home-made masonry grid (gallery)
β”‚   β”‚   β”œβ”€β”€ SplitText.vue    # Splits a text into chars / words / lines to animate them
β”‚   β”‚   └── …
β”‚   β”œβ”€β”€ composables          # Smooth scroll, page intro, wave transition, alerts, drag & throw…
β”‚   β”œβ”€β”€ pages                # index (home), gallery, about
β”‚   β”œβ”€β”€ plugins              # Lenis instance + `v-reveal` directive
β”‚   β”œβ”€β”€ types                # Extra typings (page meta)
β”‚   └── utils                # Animation helpers (easings, tweens, SVG morphing / drawing)
β”œβ”€β”€ public                   # Static files (icons, manifest, Baron Neue font…)
β”œβ”€β”€ server
β”‚   β”œβ”€β”€ api/images.get.ts    # GET /api/images?folder=… (ImageKit proxy, cached 10 min)
β”‚   β”œβ”€β”€ routes/sitemap.xml.ts
β”‚   └── utils/imagekit.ts
β”œβ”€β”€ shared                   # Code shared by the app and the server (site info, types)
β”œβ”€β”€ .env.example             # Template of the environment variables (copy it to .env)
β”œβ”€β”€ netlify.toml             # Netlify configuration
β”œβ”€β”€ nuxt.config.ts           # Nuxt configuration
└── pnpm-workspace.yaml      # pnpm settings

🎬 How the animations work

  • Reveal animations are plain CSS transitions. An element with a reveal-* class (reveal-up, reveal-fade, reveal-scale…, see main.css) reaches its final state when it, or one of its parents, gets the is-revealed class. Durations and delays are tuned per element with CSS variables ([--delay:0.8s], [--stagger:70ms]…).
  • is-revealed is added either by the v-reveal directive (when the element scrolls into view) or by usePageIntro() (when the page becomes visible, after the preloader or the page transition).
  • <SplitText> splits a text into chars, words or lines so that each piece slides up one after the other.
  • Effects that follow the scroll (parallax, rotating star, drawn line…) use useScrollFrame().
  • The few JavaScript animations (wave, SVG morphing of the menu icons, drag & throw) rely on the small helpers of app/utils/motion.ts.

πŸš€ Deploy

The website is hosted on Netlify, connected to this repository. Nitro detects Netlify automatically.

  • Build command : pnpm build (Netlify detects pnpm from pnpm-lock.yaml and installs the version pinned in package.json)
  • Environment variables : the three keys of .env.example (or their runtime equivalent NUXT_IMAGEKIT_API, NUXT_PUBLIC_FORM_SPARK_ACTION_URL, NUXT_PUBLIC_BOTPOISON_PK).

In production, pages and the images API are cached for 10 minutes (stale-while-revalidate), so ImageKit is not called on every visit.

πŸ™ Credits

  • Baron Neue font by Frank Hemmekam (free for personal use, contact the designer for commercial use).
  • Roboto font by Google (self-hosted at build time by Nuxt Fonts).

βš–οΈ License

MIT License Β© Benjamin Oddou

About

πŸ“Έ My personal website dedicated to photography

Topics

Resources

Stars

102 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages