Welcome to the repository of my personal website dedicated to Photography πΈ
- Design :
Figma,
Adobe Photoshop - Framework :
Nuxt 4 with Nuxt Fonts, Nuxt Image and Color Mode - Style :
Tailwind CSS 4 - Images :
ImageKit CDN and
PhotoSwipe (lightbox) - Smooth scrolling : Lenis
- Animations : home-made, with CSS transitions and a tiny animation helper (no animation library)
- Contact form :
Formspark and
Botpoison - Hosting :
GitHub +
Netlify
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 βοΈ
-
Install the current LTS version of Node.js (for example with nvm :
nvm install --lts). -
Install pnpm. The version used by the project is pinned in the
packageManagerfield ofpackage.json(pnpm switches to it automatically). -
Create your
.envfile from the template, then fill in the keys (each one is documented in the file) :cp .env.example .env
-
Install the dependencies :
pnpm install
pnpm settings (supply-chain protections, packages allowed to run install scriptsβ¦) live in
pnpm-workspace.yaml.
| 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 |
.
βββ 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- Reveal animations are plain CSS transitions. An element with a
reveal-*class (reveal-up,reveal-fade,reveal-scaleβ¦, seemain.css) reaches its final state when it, or one of its parents, gets theis-revealedclass. Durations and delays are tuned per element with CSS variables ([--delay:0.8s],[--stagger:70ms]β¦). is-revealedis added either by thev-revealdirective (when the element scrolls into view) or byusePageIntro()(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.
The website is hosted on
Netlify, connected to this repository. Nitro detects Netlify automatically.
- Build command :
pnpm build(Netlify detects pnpm frompnpm-lock.yamland installs the version pinned inpackage.json) - Environment variables : the three keys of
.env.example(or their runtime equivalentNUXT_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.
- 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).
MIT License Β© Benjamin Oddou
