Initial commit
This commit is contained in:
51
templates/base.html
Normal file
51
templates/base.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<!-- templates/base.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 CSS -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<style>
|
||||
/* Sticky footer implementation */
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #EDE6D1;
|
||||
padding-top: 70px; /* leave space for fixed navbar */
|
||||
}
|
||||
main {
|
||||
flex: 1 0 auto;
|
||||
}
|
||||
/* Footer styling adjustment if needed, assuming footer is not fixed */
|
||||
|
||||
/* Uniform product image size */
|
||||
.product-img {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
object-fit: cover;
|
||||
}
|
||||
</style>
|
||||
{% block extra_css %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<!-- Навигационная панель -->
|
||||
{% include 'components/navbar.html' %}
|
||||
|
||||
<!-- Основной контент -->
|
||||
<main class="container mt-4">
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
|
||||
<!-- Футер -->
|
||||
{% include 'components/footer.html' %}
|
||||
|
||||
<!-- Bootstrap JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
{% block extra_js %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
10
templates/components/footer.html
Normal file
10
templates/components/footer.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<!-- templates/components/footer.html -->
|
||||
<footer class="bg-dark text-white text-center py-4 mt-5">
|
||||
<div class="container">
|
||||
<p>© 2026 Проект АСК. Все права защищены.</p>
|
||||
<p class="small mb-0">
|
||||
ENV: {{ env_type|default:"unknown" }}
|
||||
| <!--PAGE_GENERATION_TIME-->
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
33
templates/components/navbar.html
Normal file
33
templates/components/navbar.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!-- templates/components/navbar.html -->
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
|
||||
<!-- <div class="container">
|
||||
<a class="navbar-brand" href="#">Мой проект</a> -->
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav me-auto">
|
||||
<li class="nav-item">
|
||||
<!-- <a class="nav-link" href="% url 'home' %}">Главная</a> -->
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<!-- <a class="nav-link" href="% url 'products:list' %}">Продукты</a> -->
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/admin">Админка</a>
|
||||
</li>
|
||||
<!-- % if user.is_authenticated %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Выход</a>
|
||||
</li>
|
||||
% else %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Вход</a>
|
||||
</li>
|
||||
% endif %} -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
Reference in New Issue
Block a user