Optional file-backed color themes for ShariX Open with light/dark modes and installation-local overrides.
Опциональный модуль цветовых тем ShariX Open с поддержкой светлого и тёмного режимов и локальных тем конкретной инсталляции.
|
|
11 hours ago | |
|---|---|---|
| docs | 1 month ago | |
| locale | 11 hours ago | |
| management | 1 month ago | |
| static | 11 hours ago | |
| templates | 11 hours ago | |
| templatetags | 1 month ago | |
| .gitignore | 1 month ago | |
| CODING_POLICY.md | 11 hours ago | |
| LICENSE | 1 month ago | |
| README.md | 11 hours ago | |
| RELEASE_POLICY.md | 1 month ago | |
| __init__.py | 3 years ago | |
| admin.py | 1 year ago | |
| apps.py | 1 month ago | |
| checks.py | 1 month ago | |
| context_processors.py | 1 year ago | |
| form_validation.py | 1 month ago | |
| forms.py | 1 month ago | |
| license ru.md | 3 years ago | |
| license.md | 3 years ago | |
| localization_audit.py | 1 month ago | |
| models.py | 3 years ago | |
| sharix_health.py | 1 month ago | |
| test_ui_actions.py | 1 month ago | |
| tests.py | 14 hours ago | |
| theme_storage.py | 1 month ago | |
| ui_actions.py | 1 month ago | |
| ui_reliability_audit.py | 1 month ago | |
| urls.py | 1 month ago | |
| utils.py | 1 year ago | |
| views.py | 1 month ago |
Shared presentation package for ShariX Open and ShariX Platform. Theme selection
is optional and falls back to sharix_admin/css/base_colors.css; the repository
also owns product-neutral UI primitives that must be visually identical in both
assemblies.
static/design_template/password_input.css and password_input.js provide the
canonical eye control for password fields. Canonical Open and Platform shells
load these assets once; the script automatically enhances password inputs, so
individual forms must not implement a second toggle or require per-field opt-in.
The same assets are loaded by the shared Django admin/registration shells.
Each theme is one theme.css file containing both modes:
:root {
--primary: #318ce7;
}
body.dark-theme {
--primary: #5aa8ff;
}
A theme may omit values. Missing custom properties continue to come from
webapp_base's base_colors.css.
Built-in themes are versioned with this repository:
static/design_template/themes/<code>/theme.css
Installation-local editable themes are stored outside source repositories:
<webapp-root>/design-template-real/themes/<code>/theme.css
design-template-real is ignored by the main webapp repository and may be a
symlink or its own Git repository, similarly to conf-real.
In the webapp .env:
DESIGN_TEMPLATE=builtin/classic-blue
or:
DESIGN_TEMPLATE=local/customer-theme
An empty value uses only base_colors.css. The historical default and
dark values remain temporary aliases for builtin/classic-blue and
builtin/graphite.
After changing .env.example, normalize the real .env:
python3 conf/utils/normalize_env.py --only-root --diff
python3 conf/utils/normalize_env.py --only-root --write
python3 conf/utils/normalize_env.py --only-root --check
List themes:
./venv/bin/python manage.py design_theme_list
Validate themes:
./venv/bin/python manage.py design_theme_check --all
./venv/bin/python manage.py design_theme_check builtin/classic-blue
Create a local editable copy:
./venv/bin/python manage.py design_theme_clone \
builtin/classic-blue \
customer-theme
Then run collectstatic, set DESIGN_TEMPLATE=local/customer-theme, and
restart the service.
Theme editing manages colors only. The package additionally owns neutral shared UI primitives whose behavior and geometry must remain product-neutral across Open and Platform. Existing logo and favicon handling remains unchanged. The old positional color editor was removed; a structured theme editor will be implemented separately.
Stage 3 adds a superuser-only file editor at:
/design/themes/
It is also linked from Django admin and from the VisualSettings change list.
The editor:
base_colors.css;theme.css atomically and retains the latest 20 backups in .backups;STATIC_ROOT without a full collectstatic;DESIGN_TEMPLATE in the real .env, preserving
a timestamped backup and optionally scheduling the Django service restart.Built-in themes remain read-only. The logo and favicon part of VisualSettings
is unchanged.
design_template/components/copy_control.html is a presentation-only control.
Pass a unique target_id for an already authorized, visible text input/textarea
and optionally button_class. Load design_template/copy_value.css and
design_template/copy_value.js once on the page. The button never submits a form.
It copies only after a user action; if clipboard access is unavailable it selects
the text and explains manual copying. Without JavaScript the original input
remains usable and the inactive copy button stays hidden. Password/hidden inputs
and invisible or disabled controls are not copied. The component does not fetch,
log or persist values, infer permissions, or contain Open/Platform business logic.