Site design: separate booking page and basket page
The header button, the basket indicator, the shop's "view basket" links, hero buttons and the payment return page all pointed at a hard-coded /book. Site design now has a Booking page (where the CTA leads) and a Basket page (where the basket leads; empty = the booking page), and warns when the page picked is unpublished or lacks its Shop / Checkout block. On a basket page of its own, an empty basket links to the booking page instead of saying "pick a service above". Sites saved before this keep their links: the booking page falls back to the CTA's old address, then /book. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
This commit is contained in:
parent
76b297153e
commit
c3c10229b0
12 changed files with 105 additions and 28 deletions
|
|
@ -154,6 +154,7 @@ To add an email block type: add to `EmailBlockType` in `packages/shared/src/type
|
|||
### Routing
|
||||
- **Admin app** (`app-admin`): All routes except `/login` are auth-guarded in `hooks.server.ts` (which also refreshes the token per request and sets the cookie's `Secure` flag from the real scheme). The root layout renders the admin shell (grouped sidebar) except on `/login` and `/preview`. The `/preview` route reads `sessionStorage` set by the page editor (same-origin, so it works).
|
||||
- **Public app** (`app-public`): No auth guard. The root layout always renders Header/Footer. `+layout.server.ts` fetches header/footer/colors globals + basket/items/slots for every page.
|
||||
- **Booking and basket pages** are picked in Site design (`header.bookingPage`, `header.basketPage`; '' = the booking page). Links to them come from `shopLinks(header)` in `packages/shared/src/types.ts` (blocks read `page.data.header`) — never hard-code `/book`.
|
||||
- `+page.server.ts` for home fetches `slug = "home" && published = true`
|
||||
- `[slug]/+page.server.ts` fetches by dynamic slug
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue