Multi-page site for Rasoi Hotel & Restaurant, Jhorna, Purba Bardhaman. React + Vite + Tailwind v4, with Vanta.js for the background and Spline for the 3D object in the hero.
npm install
npm run dev # http://localhost:5173
npm run build # -> dist/
npm run preview # serve the built sitePush the folder to a repo and import it. vercel.json already sets the
framework, the build command, and — importantly — the SPA rewrite, without
which a hard refresh on /kitchen would 404.
| Route | File |
|---|---|
/ |
src/pages/Home.jsx |
/kitchen |
src/pages/Kitchen.jsx |
/after-dark |
src/pages/AfterDark.jsx |
/cafe |
src/pages/Cafe.jsx |
/functions |
src/pages/Functions.jsx |
/visit |
src/pages/Visit.jsx |
| anything else | src/pages/NotFound.jsx |
Page order lives in pages in src/data/site.js. The "Next" link at the foot
of each page, the hamburger menu, the desktop nav, the footer nav and the five
cards on the home page all read from that one array — reorder it and everything
follows.
Everything the site says is in src/data/site.js. Phone numbers, hours, the
address, every dish and price, every photo caption and alt text. You should not
need to open a .jsx file to change wording.
Photos live in public/images/. To swap one, drop the new file in and change
the filename in site.js.
public/images/logo.png is your artwork, cropped square, with the blurred
photograph behind it flattened to one flat cream. It is used in the top bar, as
the hero on the front page, and in the footer, all through
src/components/Logo.jsx.
Because the artwork is printed on cream, Logo always sets it on a paper plate
(.plate in index.css) rather than knocking it out onto the background. On
the day theme that plate matches the page and vanishes; at night it reads as an
enamel sign on a dark wall. To swap the logo, replace the PNG at the same path.
public/favicon.png is cut from the same file.
src/components/Slideshow.jsx crossfades, advances itself, and stops the moment
you hover, focus, drag, or scroll it out of view. Swipe works, so do arrow keys.
It runs on the front page (the showcase list in site.js) and, through
src/components/Gallery.jsx, behind a Grid / Slideshow toggle on the After dark
and Functions pages.
Colour. Every value is sampled out of the logo: brick red #9E241A, ochre
#D9822F, maroon #2A140F, and the cream #F7F1E4 the artwork is printed on.
Day is the logo on paper. Night is the same inks on a roasted, near-black clay,
where the ochre steps forward as the accent because red does not hold up on a
dark ground. The building's own magenta neon stays where it belongs — in the
photographs.
Type. Fraunces for display, at weight 600 so the strokes hold on cream — this was the light-mode legibility problem, a hairline didone plus a pale gold wordmark. Tiro Bangla for Bengali, Karla for body, IBM Plex Mono for labels.
The light switch in the top bar is the signature. Flipping it tweens the
Vanta fog from embers to paper over 750ms. The choice is remembered in localStorage, and set
before first paint by a small inline script in index.html so returning
visitors never see the wrong theme flash.
Liquid glass is .lg in src/index.css, built from three parts: a blurred
and lightly saturated backdrop, a bright top rule and dark bottom rule for
thickness, and a slow low-contrast sheen. .lg-brass adds the thali-rim
hairline; .lg-press gives it a physical push.
Depth. Pointer tilt on desktop, scroll-driven tilt on touch, so phones get real depth rather than nothing. Cards swing in on a hinge as they enter view. There is no 3D object in the hero any more — the logo does that job.
- Every animation is disabled under
prefers-reduced-motion, including Vanta, which then never loads three.js at all. - Keyboard focus is visible throughout; the menu closes on Escape.
- Vanta pulls three.js (~153 KB gzipped) on first paint for motion-enabled
visitors. That is the cost of the animated background. To drop it, delete the
<VantaBackground />line insrc/components/Layout.jsx— the painted gradient underneath is already there and the site looks fine without it.
This was built without a browser available, so the build is verified but the
pixels are not. Run npm run dev and look at it before you ship.