<!DOCTYPE html>
<html lang="ru" class="h-100">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Контакты</title>
<!-- Подключение Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
/* Стиль для анимации желтого кружка при наведении */
.brand-logo {
display: inline-flex;
align-items: center;
justify-content: center;
width: 55px;
height: 55px;
border-radius: 50%;
border: 3px solid transparent;
transition: all 0.3s ease;
text-decoration: none;
}
/* Эффект при наведении курсора на логотип */
.brand-logo:hover {
border-color: #ffc107;
box-shadow: 0 0 10px #ffc107;
color: #ffc107 !important;
}
</style>
</head>
<body class="bg-secondary text-white d-flex flex-column h-100">
<!-- Верхняя черная плашка (Логотип ведет на главную страницу) -->
<nav class="navbar navbar-dark bg-dark shadow">
<div class="container-fluid justify-content-center">
<a href="{% url 'index' %}" class="navbar-brand mb-0 h1 fs-3 fw-bold brand-logo text-white">А4</a>
</div>
</nav>
<!-- Основной контент страницы -->
<main class="flex-grow-1 container d-flex align-items-center justify-content-center my-5">
<div class="bg-dark p-5 rounded shadow text-center" style="max-width: 500px; width: 100%;">
<h2 class="text-warning mb-4 fw-bold">Связаться с нами</h2>
<p class="text-muted small mb-3">Нажмите на номер ниже, чтобы скопировать его</p>
<!-- Кнопка с номером телефона и Bootstrap Tooltip для уведомления -->
<button class="btn btn-outline-warning btn-lg fw-bold px-4 py-3 w-100 shadow-sm"
id="phoneButton"
data-bs-toggle="tooltip"
data-bs-placement="top"
data-bs-trigger="click"
title="Номер скопирован!">
8-800-555-35-35
</button>
</div>
</main>
<!-- Подвал сайта с кнопкой контактов (активная страница) -->
<footer class="footer mt-auto py-3 bg-dark text-center">
<div class="container">
<a href="{% url 'contacts' %}" class="btn btn-info btn-sm disabled">Контакты</a>
</div>
</footer>
<!-- Подключение Bootstrap JS (необходим для работы всплывающих подсказок Tooltips) -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script>
// Инициализация всплывающей подсказки Bootstrap
const phoneButton = document.getElementById('phoneButton');
const tooltip = new bootstrap.Tooltip(phoneButton);
// Функция копирования текста при клике
phoneButton.addEventListener('click', () => {
const phoneNumber = "8-800-555-35-35";
// Копирование в буфер обмена
navigator.clipboard.writeText(phoneNumber).then(() => {
// Скрываем подсказку через 1.5 секунды после показа
setTimeout(() => {
tooltip.hide();
}, 1500);
}).catch(err => {
console.error('Ошибка при копировании: ', err);
});
});
</script>
</body>
</html>