### Custom Button System Implementation Created modern button system to replace Bootstrap buttons: - ✅ Created core/_buttons-custom.scss (550+ lines) - ✅ CSS Custom Properties for easy customization - ✅ 8 color variants (primary, secondary, success, danger, warning, info, light, dark) - ✅ Outline and Ghost variants - ✅ 4 sizes (sm, md, lg, xl) - ✅ Special variants (block, icon, circle, link) - ✅ Loading state with spinner animation - ✅ Button groups support - ✅ Modern animations (hover, active, focus) ### Template Migration Migrated 65 HTML templates using automated Python script: - Replaced .btn → .button - Replaced .btn-primary → .button--primary - Replaced .btn-outline-* → .button--outline button--* - Replaced size classes .btn-sm → .button--sm - Total changes: 354 → 347 button usages ### Results - app.css: 137 KB → 148 KB (+11 KB for custom buttons) - Templates changed: 65 files - Remaining .btn classes: 133 (mostly btn-close for modals) - New .button classes: 347 ### Backward Compatibility Kept @extend rules in _buttons-custom.scss for gradual migration. Can be removed after complete migration. Next step: Remove Bootstrap button imports from custom-bootstrap.scss
19 lines
697 B
HTML
19 lines
697 B
HTML
{% extends "base.html" %}
|
|
{% load django_bootstrap5 %}
|
|
|
|
{% block title %}{% if object %}Правка навыка{% else %}Новый навык{% endif %}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container" style="max-width:720px;">
|
|
<h3 class="mb-4">{% if object %}Правка навыка{% else %}Новый навык{% endif %}</h3>
|
|
<form method="post">
|
|
{% csrf_token %}
|
|
{% bootstrap_form form %}
|
|
<div class="d-flex gap-2">
|
|
<button type="submit" class="button button--primary">Сохранить</button>
|
|
<a href="{% url 'employees:skill_list' %}" class="button button--outline button--secondary">Отмена</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|