diff --git a/src/settings/base.py b/src/settings/base.py index 18af8a3..28e0348 100644 --- a/src/settings/base.py +++ b/src/settings/base.py @@ -71,7 +71,7 @@ JAZZMIN_SETTINGS = { # User menu "topmenu_links": [ {"name": "Главная", "url": "admin:index", "permissions": ["auth.view_user"]}, - {"name": "API Docs", "url": "/api/docs/", "new_window": True}, + {"name": "API Docs", "url": "schema-swagger-ui", "new_window": True}, {"model": "user.User"}, ], # Side menu diff --git a/src/static/admin/css/mostovik-admin-theme.css b/src/static/admin/css/mostovik-admin-theme.css index b935fd3..3de1f41 100644 --- a/src/static/admin/css/mostovik-admin-theme.css +++ b/src/static/admin/css/mostovik-admin-theme.css @@ -181,7 +181,7 @@ fieldset.module, .selector, .login-card-body, fieldset.module { - border-radius: 20px; + border-radius: 14px; } .card, @@ -212,7 +212,7 @@ fieldset.module, .module h2, .module caption, .inline-group h2 { - border-radius: 18px 18px 0 0; + border-radius: 12px 12px 0 0; } a, @@ -298,7 +298,7 @@ textarea, .select2-container--default .select2-selection--multiple { background: rgba(4, 14, 18, 0.92); border: 1px solid rgba(73, 208, 200, 0.14); - border-radius: 14px; + border-radius: 10px; color: var(--mx-text); min-height: 2.7rem; } @@ -341,7 +341,7 @@ small, .object-tools, .actions, .paginator { - border-radius: 18px; + border-radius: 12px; } .button, @@ -353,7 +353,7 @@ input[type="button"], a.button { background: linear-gradient(135deg, rgba(23, 97, 100, 0.62), rgba(42, 72, 133, 0.46)); border: 1px solid rgba(73, 208, 200, 0.18); - border-radius: 14px; + border-radius: 10px; color: #f5fbff; font-weight: 700; letter-spacing: 0.02em; @@ -390,7 +390,7 @@ a.button:hover, .errornote, .success, .warning { - border-radius: 16px; + border-radius: 12px; padding: 0.95rem 1.1rem; } @@ -443,7 +443,7 @@ code { .login-box .card, .login-card-body { - border-radius: 24px; + border-radius: 16px; } .login-logo a { @@ -488,3 +488,76 @@ code { border: 2px solid rgba(3, 12, 15, 0.92); border-radius: 999px; } + +.dashboard .admin-dashboard-grid > [class*="col-"], +.dashboard .admin-dashboard-grid .row > [class*="col-"], +.dashboard .card, +.dashboard .card-header, +.dashboard .card-body, +#content-related, +#recent-actions-module, +.timeline, +.timeline-item, +.content-wrapper .content, +.content-wrapper .container-fluid { + min-width: 0; +} + +.dashboard .admin-dashboard-grid { + row-gap: 1rem; +} + +.dashboard .card, +.dashboard .module, +#recent-actions-module { + overflow: hidden; +} + +.dashboard .card-header h5, +.dashboard .timeline-item, +.dashboard .timeline-header, +.dashboard .table td, +.dashboard .table th { + overflow-wrap: anywhere; +} + +.main-header .navbar-nav, +.main-header .form-inline, +.main-header .input-group { + min-width: 0; +} + +.main-header .form-inline { + flex: 0 1 auto; +} + +.main-header .form-control-navbar { + width: clamp(8rem, 12vw, 12rem); +} + +@media (max-width: 1360px) { + .main-header .form-inline.ml-3 { + margin-left: 0.5rem !important; + } + + .main-header .form-control-navbar { + width: clamp(7rem, 10vw, 10rem); + } +} + +@media (max-width: 991.98px) { + .main-header.navbar { + flex-wrap: wrap; + row-gap: 0.5rem; + } + + .main-header .form-inline { + width: 100%; + margin-left: 0 !important; + } + + .main-header .input-group, + .main-header .form-control-navbar { + width: 100%; + } +} diff --git a/src/templates/admin/index.html b/src/templates/admin/index.html new file mode 100644 index 0000000..6ffc3a7 --- /dev/null +++ b/src/templates/admin/index.html @@ -0,0 +1,133 @@ +{% extends "admin/base_site.html" %} +{% load i18n static jazzmin %} +{% get_jazzmin_ui_tweaks as jazzmin_ui %} + +{% block bodyclass %}{{ block.super }} dashboard{% endblock %} + +{% block content_title %} {% trans 'Dashboard' %} {% endblock %} + +{% block breadcrumbs %} +
+{% endblock %} + +{% block content %} + {% get_side_menu using="app_list" as dashboard_list %} + {% if dashboard_list %} + {% widthratio dashboard_list|length 2 1 as middle %} + {% endif %} + +| + {% if model.url %}{{ model.name }}{% else %}{{ model.name }}{% endif %} + | +
+
+ {% if model.add_url %}
+ {% trans 'Add' %}
+ {% endif %}
+ {% if model.url %}
+ {% if model.view_only %}
+ {% trans 'View' %}
+ {% else %}
+ {% if model.custom %}{% trans 'Go' %}{% else %}{% trans 'Change' %}{% endif %}
+ {% endif %}
+ {% endif %}
+
+ |
+