# va-themes/florial

Florial — flower-subscription product theme. Covers the three Florial client
environments (`savitarna`, `pardavimai`, `operacijos`) and is switch-ready for
the public `web` env (Protera stays the web default until Phase 6).

- **Namespace:** `ViartasThemes\Florial\`
- **Provider:** `FlorialThemeServiceProvider` (extends `BaseThemeServiceProvider`)
- **Brand tokens:** `Resources/assets/css/variables.css` (CSS custom properties only)
- **Fonts:** Playfair Display, self-hosted variable woff2 (`Resources/assets/fonts/`)
- **Layout:** `theme::layouts.app` (`Resources/views/layouts/app.blade.php`)
- **DB rows:** seeded by `FlorialThemeSeeder` (savitarna/pardavimai/operacijos =
  default; web = switch-ready, `is_default=false`).

## Build (per-package Vite)

Node 18+ required.

```bash
cd packages/va-themes/florial
npm ci
npm run build          # → public/build/assets/florial.{css,js} + woff2 (tracked)
cd -
php artisan themes:publish-assets   # copies public/build → public/vendor/va-themes/florial/build (gitignored)
```

The `florial.{css,js}` bundle is emitted for the `savitarna.*` / `pardavimai.*` /
`operacijos.*` route patterns via the host `@assets` directive.

## Public marketing site — CMS Pages, not theme routes

Since **PackageStructure/task-16** the four landings (`/`, `/imonems`, `/erdvems`,
`/privatiems`) are `va-modules/pages` rows, not routes owned by this theme. What the
theme contributes is the presentation half:

| Piece | Where |
|---|---|
| Page templates (`florial-*`) | `Resources/views/pages/web/florial-{index,imonems,erdvems,privatiems}.blade.php` |
| The `/` homepage | `Resources/views/pages/home.blade.php` (`theme::pages.home` — resolves only while Florial is the active WEB theme, which is the gate that replaced the old route condition) |
| The data each template reads | `src/Support/LandingData.php`, handed over by a view composer |
| Landing URLs for the chrome | `src/Support/LandingLinks.php` — resolved from the page row by TEMPLATE, so an admin's slug rename moves every link |
| Template options + text slots | `webPageTemplates()` / `templateSlots()` on the provider |

The rows themselves are seeded by `va-florial/core`'s `FlorialLandingPagesSeeder`
(baseline, so `florial:upgrade --force` creates them).

⚠️ `Resources/views/pages` is prepended to the `pages` view namespace
**unconditionally** — the same call `va-themes/seglo` makes, and for the same reason:
a theme reaches that namespace only while it is the active WEB theme, and the landings
must render on a host where another theme owns `web`. Only `florial-*` names live
there, never `pages::web.default`, so nothing else is shadowed.

## Notes

- Brand tokens are **reconstructed** from the task spec because the design source
  `packages/viartas-design/ofisai/` is currently absent. Token NAMES are the
  stable contract — sync values 1:1 when the source returns.
- Flat radius (`--bs-border-radius: 0`) — magazine/editorial look.
