липкий футер без наполнения, убрал старый мусор
parent
6163505ca0
commit
d5a623c1eb
|
@ -4,6 +4,7 @@ bp = Blueprint(
|
||||||
"bp_blog",
|
"bp_blog",
|
||||||
__name__,
|
__name__,
|
||||||
template_folder="templates/blog",
|
template_folder="templates/blog",
|
||||||
|
static_folder="static",
|
||||||
)
|
)
|
||||||
|
|
||||||
from . import urls
|
from . import urls
|
||||||
|
|
|
@ -14,7 +14,7 @@ locale.setlocale(locale.LC_ALL, "")
|
||||||
@bp.route("/<int:page>", methods=["GET"])
|
@bp.route("/<int:page>", methods=["GET"])
|
||||||
def index(page=1):
|
def index(page=1):
|
||||||
session["back_url"] = request.url
|
session["back_url"] = request.url
|
||||||
per_page = 2
|
per_page = 4
|
||||||
posts, total_pages = get_paginated_posts(page, per_page)
|
posts, total_pages = get_paginated_posts(page, per_page)
|
||||||
list_pages = [
|
list_pages = [
|
||||||
x for x in range(1, total_pages + 1) if x >= page - 2 and x <= page + 2
|
x for x in range(1, total_pages + 1) if x >= page - 2 and x <= page + 2
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
html, body {
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: 100%;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.wrapper {
|
||||||
|
box-sizing: border-box;
|
||||||
|
min-height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.page-header, .page-footer {
|
||||||
|
flex-grow: 0;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.page-body {
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||||
<title>
|
<title>
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% endblock title %}
|
{% endblock title %}
|
||||||
|
@ -13,9 +14,9 @@
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="main-container" class="container-fluid">
|
<div id="main-container" class="container-fluid wrapper">
|
||||||
|
|
||||||
<nav class="navbar p-2 navbar-expand-lg bg-dark border-bottom border-bottom-dark rounded-bottom-4"
|
<nav class="page-header navbar p-2 navbar-expand-lg bg-dark border-bottom border-bottom-dark rounded-bottom-4"
|
||||||
data-bs-theme="dark">
|
data-bs-theme="dark">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<a class="navbar-brand" href="{{ url_for(".index")}}">
|
<a class="navbar-brand" href="{{ url_for(".index")}}">
|
||||||
|
@ -35,11 +36,18 @@
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div id="content-container" class="container-fluid">
|
|
||||||
|
<div id="content-container" class="page-body container-fluid">
|
||||||
{% block content %} {% endblock %}
|
{% block content %} {% endblock %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<footer class="page-footer navbar p-2 navbar-expand-lg bg-dark border-bottom border-bottom-dark rounded-top-4"
|
||||||
|
data-bs-theme="dark">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="navbar-text fs-6">pi3c</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"
|
||||||
integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz"
|
integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz"
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
<html>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div>
|
|
||||||
<a href="{{ url_for('admin.index') }}">админ панель</a>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
Loading…
Reference in New Issue