diff --git a/Dockerfile b/Dockerfile index fc9befcb..f2c48bdc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,4 @@ FROM python:3.11-slim-bullseye COPY --from=builder /app /app COPY adaptive_hockey_federation/ ./ -CMD ["gunicorn", "adaptive_hockey_federation.wsgi:application", "--bind", "0:8000" ] +CMD ["/app/.venv/bin/gunicorn", "adaptive_hockey_federation.wsgi:application", "--bind", "0:8000" ] diff --git a/adaptive_hockey_federation/templates/base.html b/adaptive_hockey_federation/templates/base.html index abf55399..178b5dd4 100644 --- a/adaptive_hockey_federation/templates/base.html +++ b/adaptive_hockey_federation/templates/base.html @@ -5,6 +5,7 @@ + {% block title %} Тут будет заголовок diff --git a/adaptive_hockey_federation/templates/includes/button.html b/adaptive_hockey_federation/templates/includes/button.html index 9eafa201..e4fe1c34 100644 --- a/adaptive_hockey_federation/templates/includes/button.html +++ b/adaptive_hockey_federation/templates/includes/button.html @@ -1,5 +1,7 @@ -<a href="#"> - <button type="button" class="btn btn-info border border-white" role="button" data-bs-toggle="button"> - {{ name }} - </button> -</a> \ No newline at end of file +{% with request.path as current_url_name %} + <a href="{{ url_name }}" + class="nav-link border border-white bg-cyan-300 hover:bg-violet-950 text-white p-2 w-44 text-left + {% if current_url_name == url_name %}bg-violet-950{% endif %}"> + {{ name }} + </a> +{% endwith %} \ No newline at end of file diff --git a/adaptive_hockey_federation/templates/includes/drawer.html b/adaptive_hockey_federation/templates/includes/drawer.html index 3d7cdff8..20e8c33b 100644 --- a/adaptive_hockey_federation/templates/includes/drawer.html +++ b/adaptive_hockey_federation/templates/includes/drawer.html @@ -1,21 +1,44 @@ - <div class="offcanvas offcanvas-start" style="background-color: #6f42c1" data-bs-backdrop="static" tabindex="-1" id="staticBackdrop" aria-labelledby="staticBackdropLabel"> - - <div class="offcanvas-body"> - <ul class="nav-list" style="list-style-type:none"> - <div class="logo-img p-5"> - <img src="https://paraicehockey.ru/wp-content/uploads/2022/02/FAH_q.png" width="150" height="150"> +<div class="offcanvas offcanvas-start bg-violet-950" data-bs-backdrop="static" tabindex="-1" +id="staticBackdrop" aria-labelledby="staticBackdropLabel"> + + <div class="offcanvas-body mx-auto"> + <ul class="nav-list" style="list-style-type:none"> + <div class="container py-5"> + <div class="row"> + <div class="col-4 flex justify-end"> + <span class="logo-img"> + <img src="https://paraicehockey.ru/wp-content/uploads/2022/02/FAH_q.png" width="100" height="100"> + </span> + </div> + <div class="col text-white flex justify-start"> + Мир хокея<br>для особенных<br>детей + </div> </div> - <li>{% include "includes/button.html" with name="Пользователи" %}</li> - <li>{% include "includes/button.html" with name="Команды" %}</li> - <li>{% include "includes/button.html" with name="Соревнования" %}</li> - <li>{% include "includes/button.html" with name="Аналитика" %}</li> - <li>{% include "includes/button.html" with name="Выгрузки" %}</li> - </ul> - </div> + </div> + <li class="nav-item py-2"> + {% url 'main:users' as url_name %}{% include "includes/button.html" with name="Пользователи" %} + </li> + <li class="nav-item py-2"> + {% url 'main:teams' as url_name %}{% include "includes/button.html" with name="Команды" %} + </li> + <li class="nav-item py-2"> + {% url 'main:competitions' as url_name %}{% include "includes/button.html" with name="Соревнования" %} + </li> + <li class="nav-item py-2"> + {% url 'main:analytics' as url_name %}{% include "includes/button.html" with name="Аналитика" %} + </li> + <li class="nav-item py-2"> + {% url 'main:unloads' as url_name %}{% include "includes/button.html" with name="Выгрузки" %} + </li> + </ul> + </div> - <div class="offcanvas-footer p-5"> - <button type="button" class="btn" data-bs-dismiss="offcanvas" aria-label="Close"> - <i class="bi bi-caret-left-fill"></i> - </button> - </div> - </div> \ No newline at end of file + <div class="offcanvas-footer pb-5"> + <button type="button" class="btn ps-16" data-bs-dismiss="offcanvas" aria-label="Close"> + <i class="bi bi-caret-left fs-3" style="color: white;"></i> + </button> + <button type="button" class="btn"> + <i class="bi bi-caret-right-fill fs-3" style="color: white;"></i> + </button> + </div> +</div> \ No newline at end of file diff --git a/adaptive_hockey_federation/templates/includes/dropdown_button.html b/adaptive_hockey_federation/templates/includes/dropdown_button.html index 1a1bd603..427be9c0 100644 --- a/adaptive_hockey_federation/templates/includes/dropdown_button.html +++ b/adaptive_hockey_federation/templates/includes/dropdown_button.html @@ -1,6 +1,13 @@ -<li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle border border-primary" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false"> - {{ name }} +{% with request.resolver_match.view_name as view_name %} + + <li class="nav-item dropdown mt-3"> + <a class="nav-link dropdown-toggle border border-primary bg-white w-auto text-slate-400" href="#" + role="button" data-bs-toggle="dropdown" aria-expanded="false"> + {% if view_name == 'main:users' %}Роль{% endif %} + {% if view_name == 'main:teams' %}Команда{% endif %} + {% if view_name == 'main:competitions' %}Соревнование{% endif %} + {% if view_name == 'main:analytics' %}Аналитика{% endif %} + {% if view_name == 'main:unloads' %}Выгрузка{% endif %} </a> <ul class="dropdown-menu"> <li><a class="dropdown-item" href="#">1</a></li> @@ -9,3 +16,4 @@ <li><a class="dropdown-item" href="#">...</a></li> </ul> </li> +{% endwith %} \ No newline at end of file diff --git a/adaptive_hockey_federation/templates/includes/footer.html b/adaptive_hockey_federation/templates/includes/footer.html index 36297849..c370974a 100644 --- a/adaptive_hockey_federation/templates/includes/footer.html +++ b/adaptive_hockey_federation/templates/includes/footer.html @@ -1,20 +1,24 @@ -<div class="footer-copyright text-center py-3"> - <nav class="navbar navbar-light" style="background-color: #0dcaf0"> - <div class="container py-2"> +<div class="footer-copyright py-3"> + <nav class="navbar navbar-light bg-cyan-300"> + <div class="container"> <div class="nav nav-pills justify-content-start"> - <button class="btn" type="button" data-bs-toggle="offcanvas" data-bs-target="#staticBackdrop" aria-controls="staticBackdrop"> - <i class="bi bi-caret-right-fill"></i> + <button class="btn" type="button"> + <i class="bi bi-caret-left-fill fs-3" style="color: white;"></i> </button> - <nav aria-label="Page navigation example"> - <ul class="pagination"> + <button class="btn" type="button" data-bs-toggle="offcanvas" data-bs-target="#staticBackdrop" + aria-controls="staticBackdrop"> + <i class="bi bi-caret-right fs-3" style="color: white;"></i> + </button> + <nav aria-label="Page navigation example" class="p-2"> + <ul class="pagination ps-8"> <li class="page-item"> <a class="page-link" href="#" aria-label="Previous"> <i class="bi bi-caret-left-fill"></i> </a> </li> - <li class="page-item"><a class="page-link" href="#">1</a></li> - <li class="page-item"><a class="page-link" href="#">2</a></li> - <li class="page-item"><a class="page-link" href="#">3</a></li> + <li class="page-item"><a class="page-link hover:text-black" href="#">1</a></li> + <li class="page-item"><a class="page-link hover:text-black" href="#">2</a></li> + <li class="page-item"><a class="page-link hover:text-black" href="#">3</a></li> <li class="page-item"> <a class="page-link" href="#" aria-label="Next"> <i class="bi bi-caret-right-fill"></i> @@ -24,8 +28,12 @@ </nav> </div> <ul class="nav nav-pills justify-content-end"> - {% include "includes/button.html" with name="+ Пользователь" %} - {% include "includes/button.html" with name="Выгрузить" %} + {% with request.resolver_match.view_name as view_name %} + {% if view_name == 'main:users' %}{% include "includes/button.html" with name="+ Пользователь" %}{% endif %} + {% if view_name == 'main:teams' %}{% include "includes/button.html" with name="+ Команда" %}{% endif %} + {% if view_name == 'main:competitions' %}{% include "includes/button.html" with name="+ Соревнование" %}{% endif %} + {% if view_name != 'main:unloads' %}{% include "includes/button.html" with name="Выгрузить" %}{% endif %} + {% endwith %} </ul> </div> </nav> diff --git a/adaptive_hockey_federation/templates/includes/header.html b/adaptive_hockey_federation/templates/includes/header.html index a47cc068..5a734376 100644 --- a/adaptive_hockey_federation/templates/includes/header.html +++ b/adaptive_hockey_federation/templates/includes/header.html @@ -1,21 +1,23 @@ -<nav class="navbar navbar-light" style="background-color: #0dcaf0"> - <div class="container py-2"> +<nav class="navbar navbar-light bg-cyan-300"> + + <div class="container"> <ul class="nav d-flex justify-content-start"> - - <div class="border border-white"> - Username + <div class="border border-white rounded px-2"> + <i class="bi bi-circle-fill fs-2" style="color: red;"></i> + <b class="text-xl">Username</b> </div> </ul> - <ul class="nav d-flex justify-content-end"> - {% include "includes/dropdown_button.html" with name="Роль" %} + + <ul class="nav justify-content-end"> <li class="nav-item"> - <a class="nav-link" href="##"> - <i class="bi bi-search"></i> + {% include "includes/dropdown_button.html" %} + <a class="nav-link border border-primary mt-3 mb-4 bg-white p-0.5" href="##"> + <i class="bi bi-search fs-4 bg-white" style="color: black;"></i> </a> </li> - <li class="nav-item"> + <li class="nav-item ms-16"> <a class="nav-link" href="##"> - <i class="bi bi-box-arrow-right"></i> + <i class="bi bi-box-arrow-right fs-1" style="color: white;"></i> </a> </li> </ul>