Files
santeh-ray/templates/_layouts/base.html
Azimkin 52cbc1c2b3
All checks were successful
Build and Push Docker Image / build (push) Successful in 42s
feat: implement shopping cart feature with user authentication support
- Added `Cart` and `CartItem` models with migrations for managing user-specific carts and items
- Developed services for cart-related operations: adding, removing, and updating cart items
- Built specialized templates (`cart.html`) and styled them with new CSS assets (`cart.css`)
- Enabled real-time UI updates via AJAX in shopping cart interactions (`cart.js`)
- Modified header to dynamically display cart link with user authentication awareness
- Added Leaflet-based interactive map to the contacts page and integrated CSS/JS dependencies
- Expanded tests for cart functionality, item detail page cart integration, and contacts page maps
2026-05-15 23:18:16 +02:00

61 lines
2.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
{% load static %}
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Santehray - {% block title %}{{ title }}{% endblock %}</title>
<link rel="icon" type="image/svg+xml" href="{% url 'favicon' %}">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="{% static 'css/normalize.css' %}">
<link rel="stylesheet" href="{% static 'css/style.css' %}">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@12/swiper-bundle.min.css"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui@6.1/dist/fancybox/fancybox.css"/>
<script src="https://cdn.jsdelivr.net/npm/swiper@12/swiper-bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui@6.1/dist/fancybox/fancybox.umd.js"></script>
<script src="{% static 'js/header-category-dropdown.js' %}"></script>
{% block add_css %}
<!-- Additional CSS -->
{% endblock %}
</head>
<body>
{% if messages %}
<div class="site-toast-stack" aria-live="polite" aria-atomic="true">
{% for message in messages %}
<div class="site-toast site-toast--{{ message.tags }}" data-toast>
<div class="site-toast__content">{{ message }}</div>
<button class="site-toast__close" type="button" aria-label="Закрыть уведомление" data-toast-close>×</button>
</div>
{% endfor %}
</div>
{% endif %}
{% block content %}
{% endblock %}
<script>
document.addEventListener('DOMContentLoaded', function () {
document.querySelectorAll('[data-toast]').forEach(function (toast) {
const closeButton = toast.querySelector('[data-toast-close]')
const hideToast = function () {
toast.classList.add('is-hiding')
window.setTimeout(function () {
toast.remove()
}, 220)
}
if (closeButton) {
closeButton.addEventListener('click', hideToast)
}
window.setTimeout(hideToast, 4000)
})
})
</script>
<script src="{% static 'js/favorites.js' %}"></script>
<script src="{% static 'js/cart.js' %}"></script>
{% block add_js %}{% endblock %}
</body>
</html>