686 lines
21 KiB
HTML
686 lines
21 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="ru">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>{% block title %}Строительные материалы{% endblock %}</title>
|
||
|
||
<!-- Bootstrap 5 -->
|
||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||
|
||
<!-- Font Awesome Icons -->
|
||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
|
||
|
||
<!-- Verdana Font -->
|
||
<link href="https://fonts.googleapis.com/css2?family=Verdana:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||
|
||
<!-- Favicon -->
|
||
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
||
|
||
<style>
|
||
:root {
|
||
--antique-white: #FAEBD7;
|
||
--light-brown: #DEB887;
|
||
--brown: #A0522D;
|
||
--dark-brown: #8B4513;
|
||
}
|
||
|
||
/* ПОЛНОЕ ОТКЛЮЧЕНИЕ ВСЕХ ПОДСВЕТОК */
|
||
*,
|
||
*:focus,
|
||
*:hover,
|
||
*:active,
|
||
*:visited {
|
||
outline: 0 !important;
|
||
outline-style: none !important;
|
||
outline-width: 0 !important;
|
||
outline-color: transparent !important;
|
||
box-shadow: none !important;
|
||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
|
||
-webkit-tap-highlight-color: transparent !important;
|
||
-webkit-focus-ring-color: transparent !important;
|
||
}
|
||
|
||
a:focus,
|
||
a:hover,
|
||
a:active,
|
||
button:focus,
|
||
button:hover,
|
||
button:active,
|
||
.btn:focus,
|
||
.btn:hover,
|
||
.btn:active,
|
||
.btn.active,
|
||
.dropdown-toggle:focus,
|
||
.form-control:focus,
|
||
.form-select:focus,
|
||
.page-link:focus,
|
||
.nav-link:focus {
|
||
outline: 0 !important;
|
||
outline-style: none !important;
|
||
box-shadow: none !important;
|
||
}
|
||
|
||
/* Для Bootstrap кнопок */
|
||
.btn:focus,
|
||
.btn:active,
|
||
.btn.active,
|
||
.btn.show,
|
||
.btn.show:focus,
|
||
.btn.show:active {
|
||
outline: 0 !important;
|
||
box-shadow: none !important;
|
||
border-color: inherit !important;
|
||
}
|
||
|
||
/* Для форм */
|
||
.form-control:focus,
|
||
.form-select:focus {
|
||
border-color: var(--brown) !important;
|
||
box-shadow: none !important;
|
||
outline: 0 !important;
|
||
}
|
||
|
||
/* Исправление синего текста при наведении */
|
||
a,
|
||
a:hover,
|
||
a:focus,
|
||
a:active,
|
||
.nav-link,
|
||
.nav-link:hover,
|
||
.nav-link:focus,
|
||
.nav-link:active,
|
||
.btn,
|
||
.btn:hover,
|
||
.btn:focus,
|
||
.btn:active {
|
||
color: inherit !important;
|
||
text-decoration: none;
|
||
}
|
||
|
||
/* Для карточек поставщиков */
|
||
.supplier-card a,
|
||
.supplier-card a:hover,
|
||
.supplier-card a:focus,
|
||
.supplier-card a:active {
|
||
color: inherit !important;
|
||
}
|
||
|
||
/* Для кнопок в карточках */
|
||
.action-btn,
|
||
.action-btn:hover,
|
||
.action-btn:focus,
|
||
.action-btn:active {
|
||
color: inherit !important;
|
||
}
|
||
|
||
.edit-btn,
|
||
.edit-btn:hover,
|
||
.edit-btn:focus,
|
||
.edit-btn:active {
|
||
color: #2c3e50 !important;
|
||
}
|
||
|
||
.add-btn,
|
||
.add-btn:hover,
|
||
.add-btn:focus,
|
||
.add-btn:active {
|
||
color: white !important;
|
||
}
|
||
|
||
.history-btn,
|
||
.history-btn:hover,
|
||
.history-btn:focus,
|
||
.history-btn:active {
|
||
color: white !important;
|
||
}
|
||
|
||
/* Убираем подсветку при нажатии на мобильных */
|
||
* {
|
||
-webkit-touch-callout: none;
|
||
-webkit-user-select: none;
|
||
-khtml-user-select: none;
|
||
-moz-user-select: none;
|
||
-ms-user-select: none;
|
||
user-select: none;
|
||
}
|
||
|
||
/* Разрешаем выделение текста в инпутах */
|
||
input,
|
||
textarea {
|
||
-webkit-user-select: text;
|
||
-khtml-user-select: text;
|
||
-moz-user-select: text;
|
||
-ms-user-select: text;
|
||
user-select: text;
|
||
}
|
||
|
||
body {
|
||
font-family: 'Verdana', sans-serif;
|
||
background-color: var(--antique-white);
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
.main-container {
|
||
background-color: #ffffff;
|
||
min-height: 100vh;
|
||
padding: 0;
|
||
}
|
||
|
||
.container {
|
||
max-width: 1400px;
|
||
margin: 0 auto;
|
||
padding: 20px 30px;
|
||
}
|
||
|
||
/* ===== HEADER + НАВИГАЦИЯ В ОДНОЙ ПОЛОСЕ ===== */
|
||
.header-nav-wrapper {
|
||
background: linear-gradient(135deg, var(--brown) 0%, var(--dark-brown) 100%);
|
||
width: 100%;
|
||
box-shadow: 0 4px 12px rgba(160, 82, 45, 0.2);
|
||
margin-bottom: 25px;
|
||
}
|
||
|
||
.header-nav-wrapper .container {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 10px 30px;
|
||
}
|
||
|
||
.logo-container {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 15px;
|
||
}
|
||
|
||
.logo {
|
||
height: 60px !important;
|
||
width: auto !important;
|
||
object-fit: contain !important;
|
||
display: block !important;
|
||
filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
|
||
background-color: transparent !important;
|
||
}
|
||
|
||
.header-title {
|
||
font-size: 2rem;
|
||
font-weight: 600;
|
||
margin: 0;
|
||
text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
|
||
font-family: 'Verdana', sans-serif;
|
||
color: white;
|
||
}
|
||
|
||
/* Навигация в хедере */
|
||
.header-nav {
|
||
display: flex;
|
||
gap: 5px;
|
||
}
|
||
|
||
.header-nav .nav-link {
|
||
color: rgba(255, 255, 255, 0.9);
|
||
font-family: 'Verdana', sans-serif;
|
||
font-weight: 500;
|
||
border: 2px solid transparent;
|
||
border-radius: 10px;
|
||
padding: 10px 20px;
|
||
transition: all 0.2s ease;
|
||
font-size: 1rem;
|
||
text-decoration: none;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
|
||
.header-nav .nav-link i {
|
||
font-size: 1.1rem;
|
||
color: inherit;
|
||
width: 20px;
|
||
text-align: center;
|
||
}
|
||
|
||
.header-nav .nav-link:hover {
|
||
color: white;
|
||
background-color: rgba(255, 255, 255, 0.15);
|
||
border-color: var(--light-brown);
|
||
}
|
||
|
||
.header-nav .nav-link.active {
|
||
color: white;
|
||
font-weight: 600;
|
||
background: rgba(0, 0, 0, 0.25);
|
||
border-color: var(--light-brown);
|
||
}
|
||
|
||
/* ===== ЗАГОЛОВКИ СТРАНИЦ ===== */
|
||
.page-title {
|
||
color: var(--brown);
|
||
font-size: 2rem;
|
||
font-weight: 600;
|
||
font-family: 'Verdana', sans-serif;
|
||
margin: 0;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
}
|
||
|
||
.page-title i {
|
||
color: var(--brown);
|
||
}
|
||
|
||
/* ===== КНОПКИ ===== */
|
||
.btn {
|
||
font-family: 'Verdana', sans-serif;
|
||
border: none;
|
||
border-radius: 8px;
|
||
padding: 10px 20px;
|
||
transition: all 0.2s ease;
|
||
font-weight: 500;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
cursor: pointer;
|
||
text-decoration: none;
|
||
}
|
||
|
||
.btn-primary {
|
||
background: linear-gradient(135deg, var(--brown) 0%, var(--dark-brown) 100%);
|
||
color: white;
|
||
}
|
||
|
||
.btn-primary:hover {
|
||
background: linear-gradient(135deg, var(--dark-brown) 0%, var(--brown) 100%);
|
||
transform: translateY(-2px);
|
||
box-shadow: 0 4px 10px rgba(160, 82, 45, 0.3);
|
||
}
|
||
|
||
.btn-secondary {
|
||
background: var(--light-brown);
|
||
color: #2c3e50;
|
||
}
|
||
|
||
.btn-secondary:hover {
|
||
background: var(--brown);
|
||
color: white;
|
||
transform: translateY(-2px);
|
||
box-shadow: 0 4px 10px rgba(160, 82, 45, 0.2);
|
||
}
|
||
|
||
.btn-outline {
|
||
background: white;
|
||
border: 2px solid var(--brown);
|
||
color: var(--brown);
|
||
}
|
||
|
||
.btn-outline:hover {
|
||
background: var(--antique-white);
|
||
border-color: var(--dark-brown);
|
||
color: var(--dark-brown);
|
||
}
|
||
|
||
.btn-success {
|
||
background: #28a745;
|
||
color: white;
|
||
}
|
||
|
||
.btn-success:hover {
|
||
background: #218838;
|
||
transform: translateY(-2px);
|
||
box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
|
||
}
|
||
|
||
.btn-danger {
|
||
background: #dc3545;
|
||
color: white;
|
||
}
|
||
|
||
.btn-danger:hover {
|
||
background: #c82333;
|
||
transform: translateY(-2px);
|
||
box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
|
||
}
|
||
|
||
/* ===== ФОРМЫ ===== */
|
||
.form-label {
|
||
color: var(--brown);
|
||
font-weight: 600;
|
||
font-size: 0.95rem;
|
||
margin-bottom: 5px;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
}
|
||
|
||
.form-label i {
|
||
color: var(--brown);
|
||
}
|
||
|
||
.form-control, .form-select {
|
||
border: 2px solid var(--light-brown);
|
||
border-radius: 8px;
|
||
padding: 10px 12px;
|
||
font-family: 'Verdana', sans-serif;
|
||
transition: all 0.2s ease;
|
||
width: 100%;
|
||
}
|
||
|
||
.form-control:focus, .form-select:focus {
|
||
border-color: var(--brown) !important;
|
||
box-shadow: none !important;
|
||
outline: 0 !important;
|
||
}
|
||
|
||
.form-control:hover, .form-select:hover {
|
||
border-color: var(--brown);
|
||
}
|
||
|
||
.form-text {
|
||
font-size: 0.8rem;
|
||
color: #6c757d;
|
||
margin-top: 4px;
|
||
}
|
||
|
||
/* ===== ТАБЛИЦЫ ===== */
|
||
.table-container {
|
||
background: white;
|
||
border: 2px solid var(--brown);
|
||
border-radius: 12px;
|
||
overflow: hidden;
|
||
box-shadow: 0 4px 12px rgba(160, 82, 45, 0.1);
|
||
}
|
||
|
||
.table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
}
|
||
|
||
.table thead th {
|
||
background: linear-gradient(135deg, var(--brown) 0%, var(--dark-brown) 100%);
|
||
color: white;
|
||
font-weight: 600;
|
||
padding: 12px 15px;
|
||
font-size: 0.95rem;
|
||
text-align: left;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.table tbody td {
|
||
padding: 12px 15px;
|
||
border-bottom: 2px solid var(--light-brown);
|
||
color: #2c3e50;
|
||
}
|
||
|
||
.table tbody tr:last-child td {
|
||
border-bottom: none;
|
||
}
|
||
|
||
.table tbody tr:hover td {
|
||
background-color: var(--antique-white);
|
||
}
|
||
|
||
.table tfoot {
|
||
background: var(--light-brown);
|
||
}
|
||
|
||
.table tfoot td {
|
||
padding: 12px 15px;
|
||
font-weight: 600;
|
||
}
|
||
|
||
/* ===== КАРТОЧКИ ===== */
|
||
.card {
|
||
background: white;
|
||
border: 2px solid var(--brown);
|
||
border-radius: 12px;
|
||
overflow: hidden;
|
||
box-shadow: 0 4px 12px rgba(160, 82, 45, 0.1);
|
||
}
|
||
|
||
.card-header {
|
||
background: linear-gradient(135deg, var(--brown) 0%, var(--dark-brown) 100%);
|
||
color: white;
|
||
padding: 15px 20px;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.card-header i {
|
||
color: white;
|
||
margin-right: 8px;
|
||
}
|
||
|
||
.card-body {
|
||
padding: 20px;
|
||
}
|
||
|
||
/* ===== УВЕДОМЛЕНИЯ ===== */
|
||
.alert {
|
||
border-radius: 8px;
|
||
border: 1px solid var(--light-brown);
|
||
padding: 12px 15px;
|
||
margin-bottom: 20px;
|
||
font-family: 'Verdana', sans-serif;
|
||
}
|
||
|
||
.alert-success {
|
||
background: var(--antique-white);
|
||
color: var(--brown);
|
||
border-left: 4px solid #28a745;
|
||
}
|
||
|
||
.alert-danger {
|
||
background: var(--antique-white);
|
||
color: #721c24;
|
||
border-left: 4px solid #dc3545;
|
||
}
|
||
|
||
.alert-info {
|
||
background: var(--antique-white);
|
||
color: var(--brown);
|
||
border-left: 4px solid var(--brown);
|
||
}
|
||
|
||
/* ===== ХЛЕБНЫЕ КРОШКИ ===== */
|
||
.breadcrumb {
|
||
background: none;
|
||
padding: 0;
|
||
margin: 0;
|
||
}
|
||
|
||
.breadcrumb-item a {
|
||
color: var(--brown);
|
||
text-decoration: none;
|
||
}
|
||
|
||
.breadcrumb-item a:hover {
|
||
text-decoration: underline;
|
||
}
|
||
|
||
.breadcrumb-item.active {
|
||
color: #6c757d;
|
||
}
|
||
|
||
.breadcrumb-item + .breadcrumb-item::before {
|
||
color: var(--light-brown);
|
||
}
|
||
|
||
/* ===== ИКОНКИ ===== */
|
||
i {
|
||
color: var(--brown);
|
||
}
|
||
|
||
.btn i, .nav-link i, .alert i, .card-header i, .header-nav-wrapper i {
|
||
color: inherit;
|
||
}
|
||
|
||
/* ===== АДАПТИВНОСТЬ ===== */
|
||
@media (max-width: 992px) {
|
||
.header-nav-wrapper .container {
|
||
flex-direction: column;
|
||
gap: 15px;
|
||
padding: 15px;
|
||
}
|
||
|
||
.logo-container {
|
||
width: 100%;
|
||
justify-content: center;
|
||
}
|
||
|
||
.header-nav {
|
||
width: 100%;
|
||
justify-content: center;
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
.logo {
|
||
height: 50px !important;
|
||
}
|
||
|
||
.header-title {
|
||
font-size: 1.5rem;
|
||
}
|
||
}
|
||
|
||
@media (max-width: 768px) {
|
||
.container {
|
||
padding: 15px;
|
||
}
|
||
|
||
.page-title {
|
||
font-size: 1.5rem;
|
||
}
|
||
|
||
.header-nav .nav-link {
|
||
padding: 8px 15px;
|
||
font-size: 0.9rem;
|
||
}
|
||
|
||
.btn {
|
||
width: 100%;
|
||
justify-content: center;
|
||
}
|
||
|
||
.d-flex.justify-content-between {
|
||
flex-direction: column;
|
||
gap: 15px;
|
||
align-items: stretch !important;
|
||
}
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="main-container">
|
||
<!-- Header + Навигация в одной полосе -->
|
||
<div class="header-nav-wrapper">
|
||
<div class="container">
|
||
<div class="logo-container">
|
||
<img src="{{ url_for('static', filename='favicon.png') }}" alt="Стройматериалы" class="logo">
|
||
<h1 class="header-title">Стройматериалы</h1>
|
||
</div>
|
||
|
||
<!-- Навигационные вкладки -->
|
||
{% if request.endpoint in ['index', 'orders_list', 'catalog'] %}
|
||
<div class="header-nav">
|
||
<a class="nav-link {% if request.endpoint == 'index' %}active{% endif %}" href="{{ url_for('index') }}">
|
||
<i class="fas fa-truck"></i> Поставщики
|
||
</a>
|
||
<a class="nav-link {% if request.endpoint == 'orders_list' %}active{% endif %}" href="{{ url_for('orders_list') }}">
|
||
<i class="fas fa-clipboard-list"></i> Заказы
|
||
</a>
|
||
<a class="nav-link {% if request.endpoint == 'catalog' %}active{% endif %}" href="{{ url_for('catalog') }}">
|
||
<i class="fas fa-cubes"></i> Материалы
|
||
</a>
|
||
</div>
|
||
{% endif %}
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Основной контент -->
|
||
<div class="container">
|
||
<!-- Flash сообщения -->
|
||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||
{% if messages %}
|
||
<div class="flashed-messages">
|
||
{% for category, message in messages %}
|
||
<div class="alert alert-{{ category }} alert-dismissible fade show">
|
||
<i class="fas fa-info-circle me-2"></i>{{ message }}
|
||
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||
</div>
|
||
{% endfor %}
|
||
</div>
|
||
{% endif %}
|
||
{% endwith %}
|
||
|
||
{% block content %}
|
||
{% endblock %}
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Модальное окно с информацией о проекте -->
|
||
<div class="modal fade" id="projectInfoModal" tabindex="-1">
|
||
<div class="modal-dialog">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<h5 class="modal-title">
|
||
<i class="fas fa-info-circle"></i> О проекте
|
||
</h5>
|
||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||
</div>
|
||
<div class="modal-body">
|
||
<h5>Система учета строительных материалов</h5>
|
||
<p>Управление поставщиками, заказами и каталогом материалов</p>
|
||
|
||
<h6>Цветовая палитра:</h6>
|
||
<div class="d-flex gap-2 mt-2 mb-3">
|
||
<div style="width: 40px; height: 40px; background-color: #FAEBD7; border: 1px solid #DEB887;"></div>
|
||
<div style="width: 40px; height: 40px; background-color: #DEB887; border: 1px solid #A0522D;"></div>
|
||
<div style="width: 40px; height: 40px; background-color: #A0522D; border: 1px solid #8B4513;"></div>
|
||
<div style="width: 40px; height: 40px; background-color: #8B4513; border: 1px solid #000;"></div>
|
||
</div>
|
||
|
||
<h6>Технологии:</h6>
|
||
<div>
|
||
<span class="badge bg-secondary me-1">Flask</span>
|
||
<span class="badge bg-secondary me-1">SQLite</span>
|
||
<span class="badge bg-secondary me-1">Bootstrap</span>
|
||
<span class="badge bg-secondary me-1">Verdana</span>
|
||
</div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Bootstrap JS -->
|
||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
||
|
||
<script>
|
||
document.addEventListener('DOMContentLoaded', function() {
|
||
// Tooltips
|
||
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
|
||
tooltipTriggerList.map(function(tooltipTriggerEl) {
|
||
return new bootstrap.Tooltip(tooltipTriggerEl);
|
||
});
|
||
|
||
// Auto-dismiss alerts after 5 seconds
|
||
setTimeout(function() {
|
||
document.querySelectorAll('.alert:not(.alert-permanent)').forEach(function(alert) {
|
||
var bsAlert = new bootstrap.Alert(alert);
|
||
bsAlert.close();
|
||
});
|
||
}, 5000);
|
||
});
|
||
|
||
function showProjectInfo() {
|
||
var modal = new bootstrap.Modal(document.getElementById('projectInfoModal'));
|
||
modal.show();
|
||
}
|
||
</script>
|
||
|
||
{% block scripts %}
|
||
{% endblock %}
|
||
</body>
|
||
</html> |