diff --git a/music_storage/static/css/pagination.css b/music_storage/static/css/pagination.css new file mode 100644 index 0000000..6bb14c2 --- /dev/null +++ b/music_storage/static/css/pagination.css @@ -0,0 +1,52 @@ +.pagination { + display: flex; + justify-content: center; + gap: 8px; + margin: 30px 0; + font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif; +} + +.page-btn { + min-width: 38px; + height: 38px; + padding: 0 12px; + + display: inline-flex; + align-items: center; + justify-content: center; + + background: #ffffff; + color: #4a4a5a; + + border: 1px solid #c7cad8; + border-radius: 8px; + + text-decoration: none; + font-size: 14px; + font-weight: 500; + + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); + transition: all 0.2s ease; +} + +.page-btn:hover { + background: #f1f2f7; + border-color: #bab5c0; + color: #2f2f3a; +} + +.page-btn.active { + background: linear-gradient(135deg, #bbc0d4 0%, #bab5c0 100%); + color: #ffffff; + border-color: transparent; + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12); + cursor: default; +} + +.page-btn.disabled { + background: #f5f6fa; + color: #9a9db0; + border-color: #e0e2ec; + box-shadow: none; + pointer-events: none; +} diff --git a/music_storage/templates/components/pagination.html b/music_storage/templates/components/pagination.html index 087f9bf..70af7dc 100644 --- a/music_storage/templates/components/pagination.html +++ b/music_storage/templates/components/pagination.html @@ -1,11 +1,38 @@ -{% if page_obj.has_previous %} - ← Назад -{% endif %} +{% load static %} - - Страница {{ page_obj.number }} из {{ page_obj.paginator.num_pages }} - + + + -{% if page_obj.has_next %} - Вперёд → -{% endif %} \ No newline at end of file