From 9abf87c34d17356135f01cf9f473f2acb6a0719f Mon Sep 17 00:00:00 2001 From: Josef Rokos Date: Mon, 12 Oct 2026 10:45:50 +0200 Subject: [PATCH] Fixed styling guidance in CLAUDE.md and frontend rules. Co-Authored-By: Claude Opus 5.5 --- .claude/rules/frontend.md | 3 ++- CLAUDE.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.claude/rules/frontend.md b/.claude/rules/frontend.md index c563337..7d0c510 100644 --- a/.claude/rules/frontend.md +++ b/.claude/rules/frontend.md @@ -6,6 +6,7 @@ paths: - "src/app.rs" - "src/validator.rs" - "style/**" + - "assets/css/**" --- # Frontend rules @@ -44,6 +45,6 @@ paths: ## Styling - UI is the Bootstrap-based admin template in `assets/vendor/` plus Boxicons (``). Reuse its classes (`card`, `table`, `btn btn-primary`, `form-control`, `row`/`col`) before writing CSS. -- Custom styles go to `style/main.scss`. Never edit `assets/vendor/`. +- Custom styles go to a CSS file in `assets/css/` and must be linked with `` in `src/components/header.rs` (order matters: after the vendor files to override them). `style/main.scss` is not linked anywhere and has no effect. Never edit `assets/vendor/` (the one app-owned file there is `assets/vendor/css/control.css`). - The public page banner style is `assets/data/banner.css`, rewritten at runtime by the appearance upload (`/*bg-img*/` marker) — keep that marker / the `background-image: url('...')` form intact. - Stylesheets and meta tags are declared in `src/components/header.rs`. diff --git a/CLAUDE.md b/CLAUDE.md index 32a14f1..cfb57c3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -41,7 +41,8 @@ Unit tests are `#[cfg(test)] mod tests` at the bottom of the file they test (`#[ - `src/pages/` — page and dialog components; `src/components/` — reusable pieces (`DataForm`, `QuestionDialog`, `ModalDialog`, `ServerErr`, `ValidationErr`, `AdminPortal`). - `src/locales/` — `trl()` and the translation catalogue. - `src/error.rs` — `AppError`; `src/config.rs` — `config.toml` structs (ssr only); `src/validator.rs` — client-side form validation helper. -- `assets/vendor/` — third-party admin template (Bootstrap based). Don't edit or reformat it; app styles go to `style/main.scss`. +- `assets/vendor/` — third-party admin template (Bootstrap based). Don't edit or reformat it. App styles are plain CSS files in `assets/css/`, linked in `src/components/header.rs`. +- `style/main.scss` is compiled to `/pkg/rezervator.css`, but nothing links that file, so styles written there have no effect. Routes: `/` public booking form, `/login`, `/admin`, `/admin/settings`, `/admin/mail_settings`, `/admin/bookings`, `/admin/customers`, `/admin/appearance`.