Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Доработан шаблон #25

Merged
merged 2 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
3 changes: 2 additions & 1 deletion adaptive_hockey_federation/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
<script src="https://cdn.tailwindcss.com"></script>
<title>
{% block title %}
Тут будет заголовок
Expand All @@ -15,7 +16,7 @@
<header>
{% include 'includes/header.html' %}
</header>
<main>
<main class="container py-5 text-center text-2xl">
{% block content %}
Основной текст
{% endblock %}
Expand Down
12 changes: 7 additions & 5 deletions adaptive_hockey_federation/templates/includes/button.html
Original file line number Diff line number Diff line change
@@ -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>
{% with request.path as current_url_name %}
<a href="{{ url_name }}"
class="nav-link border border-2 border-white hover:bg-[#340061] text-white p-2 mx-1 w-44 text-left
{% if current_url_name == url_name %}bg-[#340061]{% else %}bg-[#64c2d1]{% endif %}">
{{ name }}
</a>
{% endwith %}
58 changes: 39 additions & 19 deletions adaptive_hockey_federation/templates/includes/drawer.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,41 @@
<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" style="background-color: #340061;" 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>
<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-fill fs-3" style="color: white;"></i>
</button>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше наверное оставить одну кнопку т.к. вторая по сути бессмысленная (закрыть сайдбар можно только из сайдбара, а открыть только из футера)

</div>
</div>
14 changes: 11 additions & 3 deletions adaptive_hockey_federation/templates/includes/dropdown_button.html
Original file line number Diff line number Diff line change
@@ -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 place-self-center p-0">
<a class="nav-link dropdown-toggle border border-primary bg-white w-44 text-slate-400 p-1.5 text-end" 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>
Expand All @@ -9,3 +16,4 @@
<li><a class="dropdown-item" href="#">...</a></li>
</ul>
</li>
{% endwith %}
37 changes: 21 additions & 16 deletions adaptive_hockey_federation/templates/includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
<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">
<nav class="navbar navbar-light" style="background-color: #64c2d1;">
<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" data-bs-toggle="offcanvas" data-bs-target="#staticBackdrop"
aria-controls="staticBackdrop">
<i class="bi bi-caret-right-fill fs-3" style="color: white;"></i>
</button>
<nav aria-label="Page navigation example">
<ul class="pagination">
<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 class="page-link bg-[#64c2d1] me-1" href="#" aria-label="Previous">
<i class="bi bi-caret-left-fill" style="color: #340061;"></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 bg-[#64c2d1] me-1" style="color: #340061;" href="#">1</a></li>
<li class="page-item"><a class="page-link bg-[#64c2d1] me-1" style="color: #340061;" href="#">2</a></li>
<li class="page-item"><a class="page-link bg-[#64c2d1] me-1" style="color: #340061;" href="#">3</a></li>
<li class="page-item">
<a class="page-link" href="#" aria-label="Next">
<i class="bi bi-caret-right-fill"></i>
<a class="page-link bg-[#64c2d1]" href="#" aria-label="Next">
<i class="bi bi-caret-right-fill" style="color: #340061;"></i>
</a>
</li>
</ul>
</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>
Expand Down
28 changes: 15 additions & 13 deletions adaptive_hockey_federation/templates/includes/header.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
<nav class="navbar navbar-light" style="background-color: #0dcaf0">
<div class="container py-2">
<nav class="navbar navbar-light" style="background-color: #64c2d1;">

<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-3" style="color: red;"></i>
<b class="text-xl" style="color: #340061;">Username</b>
</div>
</ul>
<ul class="nav d-flex justify-content-end">
{% include "includes/dropdown_button.html" with name="Роль" %}
<li class="nav-item">
<a class="nav-link" href="##">
<i class="bi bi-search"></i>

<ul class="nav justify-content-end">
<li class="nav-item d-flex">
{% include "includes/dropdown_button.html" %}
<a class="nav-link border border-primary place-self-center bg-white p-0.5" href="##">
<i class="bi bi-search fs-5 p-1 bg-white" style="color: grey;"></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="##">
<i class="bi bi-box-arrow-right"></i>
<li class="nav-item ms-16">
<a class="nav-link p-0" href="##">
<i class="bi bi-box-arrow-right fs-1" style="color: white;"></i>
</a>
</li>
</ul>
Expand Down
Loading