# Shanghai Deco (`shanghai-deco`)

> The site of a 1934 hotel on the Bund in black lacquer, ivory and brass: large night photographs in stepped frames, a brass floor dial in the header that follows you upstairs, and the room rates on the front-desk key fobs.

This is a worked example: one concept, built for one fictional client. Study how its concept turned into decisions and borrow the craft. Do not ship its surface (palette, motifs, component looks) for a different client unless your own concept, drawn from that client's world, leads to the same place.

- Chinese name: 海派装饰艺术. 外滩一间 1934 年老饭店的网站：黑漆、象牙白和黄铜，阶梯拱框里的大幅夜景照片，页眉一只黄铜楼层表盘跟着你上楼，房价挂在前台的钥匙牌上。
- Category: Retro. Tags: Nostalgic, Premium, Ornamental, Geometric, Dark, High contrast, Photography, Micro-interactions.
- Live page: [English](/en/sites/shanghai-deco/full/) · [Chinese](/sites/shanghai-deco/full/) · [viewer with desktop and mobile views](/en/sites/shanghai-deco/)
- Built with Astro, React, TypeScript and Tailwind CSS 4, plus Motion, React Bits.

## Where the concept came from

From the hotel's own things: the 1934 brass lift and the floor dial over its doors, the room keys hanging at the front desk, and the sixth-floor ballroom turned bar with its brass sunburst wall. The dial and the key board are the hotel's real objects; the music, hours, cocktails and booking are written the way a good hotel site writes them.

## When it fits

Good for:
- Boutique hotels in old buildings: they have their own floors and fittings, and guests come for the history.
- Bars, restaurants and ballrooms with live music: programmes, menus and table bookings all need to read at a glance.
- Old department stores and theatres with floors and a long history: floor-by-floor navigation is already their language.

Avoid when:
- Single-storey shops or brands with no building to speak of: the lift metaphor falls apart.
- Bright, youthful brands that want energy: black lacquer and brass read as too formal.
- Catalogue shops that sell through filters: each section holds one thing and cannot carry long product lists.

Industry fit (1-5): Hotel & homestay 5, Restaurant 4, Attraction 3, Creative brand 3, Tour guide 2, Artisan 2, Export factory 1, Education 1, Farm produce 1.

## Adapting it to another client

Keep:
- Let only two things be real objects, the signature dial (the floor indicator) and the key board (the rates), and set the navigation, music, hours, cocktails and booking as plain, well-made links, tables, lists and a short form, not props.
- Find one navigation metaphor in the building itself (here, the floors of the lift) and let the signature dial track it and open the menu, but never as the only way in: plain text links flank it on desktop, a tab reading Menu hangs from it on phones, and no instructions are written on the page.
- Spend the ornament on the photographs and the marks: ziggurat, notched and arched frames, one sunburst behind the hero and a fret band in the footer, with no rules or flourishes on the text blocks. Buttons take the darkest or lightest tone of their ground.

Change:
- Lacquer, ivory and brass are this hotel's materials; find the next client's colours in its own, and keep an accent like the jade for the lamps that light up.
- The floor dial only fits places with floors, such as hotels, department stores and office buildings; other clients need their own instrument, such as a ship's engine telegraph or a station's split-flap board.
- Sunbursts, stepped arches and the fret band are 1930s Shanghai Deco; swap in the architecture of the client's own place.

## Essentials

- **Color.** Lacquer #14110d and ivory #efe6d2 alternate as grounds with the same roles inverted. Buttons carry no colour: on lacquer the primary is ivory with lacquer text, on ivory it is lacquer with ivory text, each with a fine engraved keyline inside, and secondary buttons are outlines. Brass #c2a06a draws only the photo frames, the dial, the key fobs and small text on lacquer (bronze #7a5a2e for labels on ivory). Jade #1f5a48 appears only in the lit floor lamp on the dial, with its light tint #74b99a in the chosen key’s lamp.
- **Type.** The hero headline is the name: 玉兰饭店 in Noto Serif SC 600 at 0.06em, one line of about 70px on phones and two lines (玉兰 / 饭店) up to 144px on desktop, over 外滩精品酒店 in Song 400 at 0.4em. The Latin name and headings are Poiret One (400 only), the name about 64px on phones and 100px on desktop. Section headings are nouns (客房, 铜管酒吧, 酒单, 预订), 36–64px Song 600 in Chinese. Header links are Song 600 at 15px and 0.2em in Chinese, and Josefin Sans 600 capitals at 12px and 0.2em in English (11px and 0.15em from 1024 to 1279px). Body text, prices and times are Josefin Sans Variable; Chinese body text is Noto Serif SC 400 at 16–17px and 1.85, self-hosted as unicode-range slices.
- **Layout.** The header is centred on the dial: on desktop two text links sit on each side of it (Rooms, The Brass Room | Cocktails, Reservations), the name at the far left and Book and the language at the far right; on phones only the name, the dial and the language remain, with a Menu tab under the dial that opens the sections by floor. Designed at 390px first: the first screen is the lift doors right under the dial, then the name, the category, two short sentences (one per line), a book button and a link to the music; on desktop it is a symmetrical triptych with the name on the left, the doors in the middle and the sentences and buttons on the right. Rooms open with the heading and the key board, then the chosen room’s photo beside its rates; the bar opens with a large photograph of the bandstand (a portrait crop on phones, full width on desktop), then the programme, hours and tables; the cocktails are an ivory card over the photo of the glass; booking holds the contacts, a short form and the roof terrace. No numbers or labels above headings; hairlines only between the programme rows, above the rates and under the form fields. On phones a bar with two actions, call and book, appears once the hero scrolls away.
- **Imagery.** Restored 1930s Deco interiors at night: warm 2700K tungsten, deep warm blacks and brass highlights, black lacquer and ivory with a single touch of jade. A medium-format film feel at eye level, with no people, lettering or landmarks. The photographs run large, the bandstand across the full width on desktop, each in a brass hairline frame 10px from the picture.
- **Motion.** One signature motion: the needle of the header's brass dial springs (stiffness 140, damping 13) to the floor on screen and follows the chosen key. Everything else is small: a glint across a key fob as the chosen one drops 6px, a 300ms panel shutter and the room details fading in. With reduced motion the needle jumps.

## Common mistakes

- Gold everywhere: brass only draws lines, and large gold gradients or gold lettering turn it into a cheap Gatsby-party theme.
- Making the dial the only navigation: plain text links flank it on desktop, and on phones it carries a visible Menu label and its panel names the sections in words, not floor numbers or room types alone. It still needs no instructions such as "tap to choose a floor".
- Poiret One for body text, Chinese or bold: it has a single hairline weight, so keep it for large Latin type, give Chinese headings to a Song serif at 600 and turn off font-synthesis.
- Every block a prop: a programme with dotted leaders, a menu with flourishes, a numbered booking slip and a lit "open now" sign read as an AI showing off. Only the dial and the key board are objects; the rest are plain tables and lists.
- Coloured buttons: primary buttons are ivory or lacquer, and the jade is kept for the lamps that light up.

## Design tokens

| Token | Value | Role |
| --- | --- | --- |
| `--color-lacquer` | `#14110d` | Lacquer ground, primary buttons on ivory |
| `--color-lacquer-raised` | `#1f1a15` | Supporting |
| `--color-ivory` | `#efe6d2` | Ivory ground, primary buttons on lacquer |
| `--color-paper` | `#f7f1e3` | Supporting |
| `--color-brass` | `#c2a06a` | Photo frames, the dial, the key fobs |
| `--color-brass-light` | `#e6cf9c` | Supporting |
| `--color-bronze` | `#7a5a2e` | Labels on ivory |
| `--color-jade` | `#1f5a48` | The lit floor lamp on the dial |
| `--color-jade-lit` | `#74b99a` | Supporting |
| `--color-smoke` | `#5c5245` | Secondary text on ivory |
| `--color-mist` | `#b5aa95` | Supporting |

Semantic colors with shadcn/ui names, ready for `globals.css`:

```css
:root {
  --background: #14110d;
  --foreground: #efe6d2;
  --card: #f7f1e3;
  --card-foreground: #14110d;
  --primary: #efe6d2;
  --primary-foreground: #14110d;
  --muted: #1f1a15;
  --muted-foreground: #b5aa95;
  --accent: #c2a06a;
  --accent-foreground: #14110d;
  --border: #c2a06a;
  --ring: #c2a06a;
}
```

Fonts. The stacks use Fontsource family names; with Google Fonts or `next/font`, drop the " Variable" suffix. Each npm package holds the CSS and its unicode-range sliced font files. The jsDelivr links are for prototypes only: Google Fonts is blocked in mainland China and jsDelivr is unreliable there, so a production site for mainland visitors bundles the packages, or copies each CSS file with its `files/` folder to its own server or object storage and links that. A Chinese family costs about 100 KB of render-blocking CSS per weight (31 KB gzipped, about 100 slices); browsers then download only the slices for the characters on the page, so link only the weights you use.

- `--font-display`: "Poiret One", "Noto Serif SC", "Songti SC", serif
- `--font-sans`: "Josefin Sans Variable", "Noto Serif SC", "PingFang SC", sans-serif
- `--font-song`: "Noto Serif SC", "Songti SC", "STSong", serif
- Poiret One: `npm install @fontsource/poiret-one`, then `import '@fontsource/poiret-one/400.css'`. Plain-HTML prototype: `<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource/poiret-one@5.3.0/400.css">`
- Josefin Sans Variable: `npm install @fontsource-variable/josefin-sans`, then `import '@fontsource-variable/josefin-sans/wght.css'`. Plain-HTML prototype: `<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/josefin-sans@5.3.0/wght.css">`
- Noto Serif SC: `npm install @fontsource/noto-serif-sc`, then `import '@fontsource/noto-serif-sc/400.css'` and `import '@fontsource/noto-serif-sc/600.css'`. Plain-HTML prototype: `<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource/noto-serif-sc@5.3.1/400.css">` `<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource/noto-serif-sc@5.3.1/600.css">`

Easing:

- `--ease-lift`: `cubic-bezier(0.32, 0.72, 0, 1)`
- `--ease-settle`: `cubic-bezier(0.22, 1, 0.36, 1)`

All tokens: [tokens.css](/styles/shanghai-deco/tokens.css) · [tokens.json](/styles/shanghai-deco/tokens.json)

## Page structure

Screenshots are 1440 × 900 (desktop) and 390 × 844 (mobile) viewports, on the Chinese page unless marked English. Sections taller than the screen, such as pinned scroll chapters, are captured part-way through.

1. **Header** (`:is(body, main) > header`): [components/Header.astro](/sources/shanghai-deco/components/Header.astro.txt). Visible in the Hero screenshots
2. **Hero** (`#lobby`): [components/Hero.astro](/sources/shanghai-deco/components/Hero.astro.txt). Screenshots: [desktop](/shots/shanghai-deco/lobby-desktop.jpg) · [mobile](/shots/shanghai-deco/lobby-mobile.jpg) · [desktop, English](/shots/shanghai-deco/lobby-desktop-en.jpg) · [mobile, English](/shots/shanghai-deco/lobby-mobile-en.jpg)
3. **Rooms** (`#rooms`): [components/Rooms.astro](/sources/shanghai-deco/components/Rooms.astro.txt). Screenshots: [desktop](/shots/shanghai-deco/rooms-desktop.jpg) · [mobile](/shots/shanghai-deco/rooms-mobile.jpg) · [desktop, English](/shots/shanghai-deco/rooms-desktop-en.jpg) · [mobile, English](/shots/shanghai-deco/rooms-mobile-en.jpg)
4. **Bar** (`#bar`): [components/Bar.astro](/sources/shanghai-deco/components/Bar.astro.txt). Screenshots: [desktop](/shots/shanghai-deco/bar-desktop.jpg) · [mobile](/shots/shanghai-deco/bar-mobile.jpg) · [desktop, English](/shots/shanghai-deco/bar-desktop-en.jpg) · [mobile, English](/shots/shanghai-deco/bar-mobile-en.jpg)
5. **Cocktails** (`#cocktails`): [components/Cocktails.astro](/sources/shanghai-deco/components/Cocktails.astro.txt). Screenshots: [desktop](/shots/shanghai-deco/cocktails-desktop.jpg) · [mobile](/shots/shanghai-deco/cocktails-mobile.jpg) · [desktop, English](/shots/shanghai-deco/cocktails-desktop-en.jpg) · [mobile, English](/shots/shanghai-deco/cocktails-mobile-en.jpg)
6. **Booking** (`#book`): [components/Booking.astro](/sources/shanghai-deco/components/Booking.astro.txt). Screenshots: [desktop](/shots/shanghai-deco/book-desktop.jpg) · [mobile](/shots/shanghai-deco/book-mobile.jpg) · [desktop, English](/shots/shanghai-deco/book-desktop-en.jpg) · [mobile, English](/shots/shanghai-deco/book-mobile-en.jpg)
7. **Footer** (`:is(body, main) > footer`): [components/Footer.astro](/sources/shanghai-deco/components/Footer.astro.txt). Screenshots: [desktop](/shots/shanghai-deco/footer-desktop.jpg) · [mobile](/shots/shanghai-deco/footer-mobile.jpg) · [desktop, English](/shots/shanghai-deco/footer-desktop-en.jpg) · [mobile, English](/shots/shanghai-deco/footer-mobile-en.jpg)
8. **BookBar** (`#book-bar`): [components/BookBar.astro](/sources/shanghai-deco/components/BookBar.astro.txt). Visible in the Footer screenshots

## Key components

### FloorDial

The brass floor dial at the centre of the header: a Motion spring swings the needle to the floor of the section on screen, and in the rooms it follows the chosen key. Tap it to open the lift’s button panel (a native popover that works before hydration), which names each section beside its floor: R Reservations, 6 Cocktails and The Brass Room, 2–5 Rooms, L Lobby. On desktop two plain links sit on each side of it; on phones a Menu tab hangs beneath it.

- Source: [components/FloorDial.tsx](/sources/shanghai-deco/components/FloorDial.tsx.txt) (Motion)
- Also needs: [components/Header.astro](/sources/shanghai-deco/components/Header.astro.txt)
- Appears in: Header (`header`)

### Lift-door hero

The lift doors sit right under the dial in a ziggurat frame, with sunburst rays fanning out from beneath the dial so it reads as the floor indicator over the doors. On desktop the name and the introduction flank the photo in a symmetrical triptych; on phones the photo comes first and the name fills one line beneath it.

- Source: [components/Hero.astro](/sources/shanghai-deco/components/Hero.astro.txt)
- Also needs: [components/Sunburst.astro](/sources/shanghai-deco/components/Sunburst.astro.txt)
- Appears in: Hero (`lobby`)

### RoomKeys

The front-desk key board, the one practical block that copies a real object: four brass fobs form a radio group engraved with room numbers over the room type and weekday rate. The chosen fob drops and lights a jade lamp, and GlareHover sweeps a glint on hover or tap. The room photo, size and rates switch with CSS :has(), without JS.

- Source: [components/RoomKeys.tsx](/sources/shanghai-deco/components/RoomKeys.tsx.txt) (React Bits)
- Also needs: [components/Rooms.astro](/sources/shanghai-deco/components/Rooms.astro.txt), [components/ui/GlareHover.tsx](/sources/shanghai-deco/components/ui/GlareHover.tsx.txt)
- Built on React Bits `GlareHover` ([components/ui/GlareHover.tsx](/sources/shanghai-deco/components/ui/GlareHover.tsx.txt), restyled): `npx shadcn@latest add https://reactbits.dev/r/GlareHover-TS-TW.json`
- Appears in: Rooms (`rooms`)

### Stepped frames

Ziggurat, notched and round-arch frames drawn with clip-path, with a brass hairline traced at an even gap around each photograph; the cocktail card and the booking form borrow only the notched silhouette, without the line.

- Source: [styles.css](/sources/shanghai-deco/styles.css.txt)
- Also needs: [components/Cocktails.astro](/sources/shanghai-deco/components/Cocktails.astro.txt)

### BookingForm

A short form for rooms and tables: pick the date, room, nights and guests and it writes the message for the front desk, to paste into WeChat or send as a text. The room follows the key chosen above.

- Source: [components/BookingForm.tsx](/sources/shanghai-deco/components/BookingForm.tsx.txt)
- Also needs: [clipboard.ts](/sources/shanghai-deco/clipboard.ts.txt), [components/Booking.astro](/sources/shanghai-deco/components/Booking.astro.txt)
- Appears in: Booking (`book`)

## Dependencies

`npm install motion`

## Source files

Read only what you need:

- [Site.astro](/sources/shanghai-deco/Site.astro.txt): the whole page, with fonts, sections and scripts
- [styles.css](/sources/shanghai-deco/styles.css.txt): tokens and component classes
- [i18n.ts](/sources/shanghai-deco/i18n.ts.txt): all copy, in Chinese and English
- [meta.ts](/sources/shanghai-deco/meta.ts.txt): this guide as data
- [components/Header.astro](/sources/shanghai-deco/components/Header.astro.txt): section
- [components/Hero.astro](/sources/shanghai-deco/components/Hero.astro.txt): section
- [components/Rooms.astro](/sources/shanghai-deco/components/Rooms.astro.txt): section
- [components/Bar.astro](/sources/shanghai-deco/components/Bar.astro.txt): section
- [components/Cocktails.astro](/sources/shanghai-deco/components/Cocktails.astro.txt): section
- [components/Booking.astro](/sources/shanghai-deco/components/Booking.astro.txt): section
- [components/Footer.astro](/sources/shanghai-deco/components/Footer.astro.txt): section
- [components/BookBar.astro](/sources/shanghai-deco/components/BookBar.astro.txt): section
- [clipboard.ts](/sources/shanghai-deco/clipboard.ts.txt)
- [components/BookingForm.tsx](/sources/shanghai-deco/components/BookingForm.tsx.txt)
- [components/FloorDial.tsx](/sources/shanghai-deco/components/FloorDial.tsx.txt)
- [components/Monogram.astro](/sources/shanghai-deco/components/Monogram.astro.txt)
- [components/RoomKeys.tsx](/sources/shanghai-deco/components/RoomKeys.tsx.txt)
- [components/Sunburst.astro](/sources/shanghai-deco/components/Sunburst.astro.txt)
- [house.ts](/sources/shanghai-deco/house.ts.txt)
- [typography.ts](/sources/shanghai-deco/typography.ts.txt)
- [components/ui/GlareHover.tsx](/sources/shanghai-deco/components/ui/GlareHover.tsx.txt): React Bits `GlareHover`, restyled

Everything in one file: [/sources/shanghai-deco.txt](/sources/shanghai-deco.txt) (about 29K tokens).

Before building, read the [design guide](/guide.md): the process and rules that apply to every site.
