Move the cart drawer component from ThemeLive.PreviewPages to the
shared ShopComponents module. The component now supports:
- mode attribute (:live for real stores, :preview for theme editor)
- subtotal attribute (default nil shows "£0.00")
- cart_items attribute (default empty list)
In preview mode, "View basket" navigates via LiveView JS commands.
In live mode, it links directly to /cart.
Preview pages now explicitly pass demo values:
<.cart_drawer cart_items={...} subtotal="£72.00" mode={:preview} />
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
||
|---|---|---|
| assets | ||
| config | ||
| lib | ||
| priv | ||
| test | ||
| .env | ||
| .formatter.exs | ||
| .gitignore | ||
| AGENTS.md | ||
| mix.exs | ||
| mix.lock | ||
| PHASE_9_PLAN.md | ||
| PHASE_9_PROGRESS.md | ||
| PLAN.md | ||
| README.md | ||
| RECENT_CHANGES.md | ||
| SAMPLE_CONTENT_PLAN.md | ||
| simpleshop-typography.md | ||
| simpleshop-ux-component-patterns.md | ||
| SPEC.md | ||
SimpleshopTheme
To start your Phoenix server:
- Run
mix setupto install and setup dependencies - Start Phoenix endpoint with
mix phx.serveror inside IEx withiex -S mix phx.server
Now you can visit localhost:4000 from your browser.
Ready to run in production? Please check our deployment guides.
Learn more
- Official website: https://www.phoenixframework.org/
- Guides: https://hexdocs.pm/phoenix/overview.html
- Docs: https://hexdocs.pm/phoenix
- Forum: https://elixirforum.com/c/phoenix-forum
- Source: https://github.com/phoenixframework/phoenix