Skip to content

Commit

Permalink
Merge branch 'dev' into feature/xlsx_parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav-Gutnikov authored Oct 30, 2023
2 parents f8c9a23 + e38a254 commit 0231f00
Show file tree
Hide file tree
Showing 10 changed files with 112 additions and 27 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,5 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

static/
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.2/ref/settings/
"""
import os

from pathlib import Path

Expand Down Expand Up @@ -53,10 +54,11 @@

ROOT_URLCONF = 'adaptive_hockey_federation.urls'

TEMPLATES_DIR = os.path.join(BASE_DIR, 'templates')
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [TEMPLATES_DIR],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
Expand Down Expand Up @@ -117,7 +119,9 @@
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.2/howto/static-files/

STATIC_URL = 'static/'
STATIC_URL = '/static/'

STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'),)

# Default primary key field type
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field
Expand Down
2 changes: 1 addition & 1 deletion adaptive_hockey_federation/main/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


urlpatterns = [
path('users', views.users, name='users'),
path('users/', views.users, name='users'),
path('teams/<int:id>/', views.teams_id, name='teams_id'),
path('teams/', views.teams, name='teams'),
path(
Expand Down
27 changes: 10 additions & 17 deletions adaptive_hockey_federation/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,28 @@
<html lang="ru">
<head>
<meta charset="utf-8">
<!-- Сайт готов работать с мобильными устройствами -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Загружаем фав-иконки -->
{% load static %}
<link rel="icon" href="{% static 'img/fav/favicon.ico' %}" type="image">
<link rel="icon" href="{% static 'img/fav/fav.ico' %}" type="image">
<link rel="apple-touch-icon" sizes="180x180" href="{% static 'img/fav/apple-touch-icon.png' %}">
<link rel="icon" type="image/png" sizes="32x32" href="{% static 'img/fav/favicon-32x32.png' %}">
<link rel="icon" type="image/png" sizes="16x16" href="{% static 'img/fav/favicon-16x16.png' %}">
<meta name="msapplication-TileColor" content="#000">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
<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">
<title>
{% block title %}
Тут будет заголовок
{% endblock %}
</title>
</head>
<body>
<body class="d-flex flex-column min-vh-100">
<header>
{% include 'includes/header.html' %}
{% include 'includes/header.html' %}
</header>
<main>
{% block content %}
Тут будет основной текст
{% endblock %}
{% block content %}
Основной текст
{% endblock %}
</main>
<footer>
<footer class="mt-auto">
{% include 'includes/footer.html' %}
</footer>
{% include 'includes/drawer.html' %}
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
</body>
</html>
5 changes: 5 additions & 0 deletions adaptive_hockey_federation/templates/includes/button.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<a href="#">
<button type="button" class="btn btn-info border border-white" role="button" data-bs-toggle="button">
{{ name }}
</button>
</a>
21 changes: 21 additions & 0 deletions adaptive_hockey_federation/templates/includes/drawer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<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>
<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 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>
11 changes: 11 additions & 0 deletions adaptive_hockey_federation/templates/includes/dropdown_button.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<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 }}
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">1</a></li>
<li><a class="dropdown-item" href="#">2</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">...</a></li>
</ul>
</li>
35 changes: 32 additions & 3 deletions adaptive_hockey_federation/templates/includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
<div>
<p>Footer</p>
</div>
<div class="footer-copyright text-center py-3">
<nav class="navbar navbar-light" style="background-color: #0dcaf0">
<div class="container py-2">
<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>
<nav aria-label="Page navigation example">
<ul class="pagination">
<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" href="#" aria-label="Next">
<i class="bi bi-caret-right-fill"></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="Выгрузить" %}
</ul>
</div>
</nav>
</div>
26 changes: 23 additions & 3 deletions adaptive_hockey_federation/templates/includes/header.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
<div>
<p>Header</p>
</div>
<nav class="navbar navbar-light" style="background-color: #0dcaf0">
<div class="container py-2">
<ul class="nav d-flex justify-content-start">

<div class="border border-white">
Username
</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>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="##">
<i class="bi bi-box-arrow-right"></i>
</a>
</li>
</ul>
</div>
</nav>
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ mypy_path = "./adaptive_hockey_federation"


[tool.django-stubs]
django_settings_module = "adaptive_hockey_federation.settings"
django_settings_module = "adaptive_hockey_federation.settings"

0 comments on commit 0231f00

Please sign in to comment.