исправил и наполнил футер

main
Сергей Ванюшкин 2023-09-28 20:22:01 +03:00
parent d5a623c1eb
commit 3b3595d6b8
4 changed files with 133 additions and 21 deletions

View File

@ -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 = 4 per_page = 2
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

View File

@ -11,7 +11,13 @@
</title> </title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous"> integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
</head> <!-- Font Awesome -->
<link
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"
rel="stylesheet"
/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.2.0/css/fork-awesome.min.css" integrity="sha256-XoaMnoYC5TH6/+ihMEnospgm0J1PM/nioxbOUdnM8HY=" crossorigin="anonymous">
</head>
<body> <body>
<div id="main-container" class="container-fluid wrapper"> <div id="main-container" class="container-fluid wrapper">
@ -28,10 +34,9 @@
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>
<div class="collapse navbar-collapse" id="navbarSupportedContent"> <div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0"> <ul class="text-body navbar-nav me-auto mb-2 mb-lg-0">
text text
</ul> </ul>
</div> </div>
</div> </div>
</nav> </nav>
@ -40,15 +45,126 @@
<div id="content-container" class="page-body container-fluid"> <div id="content-container" class="page-body container-fluid">
{% block content %} {% endblock %} {% block content %} {% endblock %}
</div> </div>
</div>
<footer class="page-footer navbar p-2 navbar-expand-lg bg-dark border-bottom border-bottom-dark rounded-top-4" <footer class="container-fluid page-footer bg-dark border-bottom border-bottom-dark rounded-top-4 text-center"
data-bs-theme="dark"> data-bs-theme="dark">
<div class="container-fluid"> <!-- Footer -->
<div class="navbar-text fs-6">pi3c</div> <!-- Grid container -->
</div> <div class="container p-2">
</footer> <!-- Section: Social media -->
<section class="mb-2">
<!-- Telegram -->
<a class="btn btn-outline-light btn-floating m-2"
href="https://t.me/pi3c_nao"
role="button"
><i class="fab fa-telegram"></i
></a>
<!-- VK -->
<a class="btn btn-outline-light btn-floating m-2"
href="https://m.vk.com/pi3c_nao"
role="button"
><i class="fab fa-vk"></i
></a>
<!-- Yandex -->
<a class="btn btn-outline-light btn-floating m-2"
href="mailto:pi3c@yandex.ru"
role="button"
><i class="fab fa-yandex"></i
></a>
<!-- Github -->
<a class="btn btn-outline-light btn-floating m-2"
href="https://github.com/pi3c"
role="button"
><i class="fab fa-github"></i
></a>
<!-- Gitea -->
<a class="btn btn-outline-light btn-floating m-2"
href="https://git.pi3c.ru"
role="button"
><i class="fa fa-gitea"></i
></a>
</section>
<!-- Section: Social media -->
<!-- Section: Links -->
<section class="">
<!--Grid row-->
<div class="row">
<!--Grid column-->
<div class="col-lg-3 col-md-6 mb-4 mb-md-0">
<h5 class="text-white">pyproger.ru</h5>
<ul class="list-unstyled mb-0">
<li>
<a class="link-offset-2 link-underline link-underline-opacity-0 text-white"
href="{{ url_for('.index')}}">Главная
</a>
</li>
<li>
<a class="link-offset-2 link-underline link-underline-opacity-0 text-white"
href="{{ url_for('.get_all_tags')}}">Тэги статей</a>
</li>
<li>
<a class="link-offset-2 link-underline link-underline-opacity-0 text-white"
href="#!">О сайте</a>
</li>
<li>
<a class="link-offset-2 link-underline link-underline-opacity-0 text-white"
href="#">Контакты</a>
</li>
</ul>
</div>
<!--Grid column-->
<!--Grid column-->
<div class="col-lg-3 col-md-6 mb-4 mb-md-0">
<h5 class="text-white">Вебхостинг</h5>
<ul class="list-unstyled mb-0">
<li>
<a class="link-offset-2 link-underline link-underline-opacity-0 text-white"
href="https://www.reg.ru/?rlink=reflink-11750021">Российский регистратор reg.ru </a>
</li>
<li>
<a class="link-offset-2 link-underline link-underline-opacity-0 text-white"
href="https://www.reg.ru/domain/new/?rlink=reflink-11750021">Регистрация доменов</a>
</li>
<li>
<a class="link-offset-2 link-underline link-underline-opacity-0 text-white"
href="https://www.reg.ru/hosting/?rlink=reflink-11750021">Веб хостинг сайтов</a>
</li>
<li>
<a class="link-offset-2 link-underline link-underline-opacity-0 text-white"
href="https://www.reg.ru/vps/cloud/?rlink=reflink-11750021">Облачные серверы</a>
</li>
</ul>
</div>
<!--Grid column-->
</div>
<!--Grid row-->
</section>
<!-- Section: Links -->
</div>
<!-- Grid container -->
<!-- Copyright -->
<small class="text-center text-body">
&copy; 2023
<a class="link-offset-2 link-underline link-underline-opacity-0 text-white" href="https://pi3c.ru/">Сергей Ванюшкин</a>
<br>
г.Нарьян-Мар Ненецкий А.О
</small>
<!-- Copyright -->
</footer>
<!-- Footer -->
</div>
<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"
crossorigin="anonymous"></script> crossorigin="anonymous"></script>

View File

@ -9,8 +9,6 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="container px-4 px-lg-5">
<div class="list-group justify-content-center">
{% for p in posts %} {% for p in posts %}
<a href="{{ url_for(".post", slug=p.Post.slug )}}" class="list-group-item list-group-item-action border-0"> <a href="{{ url_for(".post", slug=p.Post.slug )}}" class="list-group-item list-group-item-action border-0">
@ -30,9 +28,7 @@
</a> </a>
{{ p.Post.create_datetime.strftime('%d %B, %Y') }} {{ p.Post.create_datetime.strftime('%d %B, %Y') }}
</small> </small>
<hr class="my-4" />
{% endfor %} {% endfor %}
</div>
<nav class="container"> <nav class="container">
<ul class="pagination justify-content-start" <ul class="pagination justify-content-start"
@ -55,6 +51,6 @@
{% else %} {% else %}
<li class="page-item disabled"><a class="page-link" >&gt;&gt;</a></li> <li class="page-item disabled"><a class="page-link" >&gt;&gt;</a></li>
{% endif %} {% endif %}
</ul>
</nav> </nav>
{% endblock %} {% endblock %}

View File

@ -1,22 +1,22 @@
{% extends 'blog/base.html' %} {% extends 'blog/base.html' %}
{% block title %} {% block title %}
{{title}} {{title}}
{% endblock %} {% endblock %}
{% block menu_title %} {% block menu_title %}
{{ menu_title }} {{ menu_title }}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<!-- Main Content--> <div class="conteiner px-4 px-lg-5">
<div class="conteiner">
<br> <br>
<h4>{{ post.Post.title | safe }}</h4> <h4>{{ post.Post.title | safe }}</h4>
{{ post.Post.text | safe }} {{ post.Post.text | safe }}
</div> <a class="link-offset-2 link-offset-3-hover link-underline link-underline-opacity-0 link-underline-opacity-75-hover" href="{{ back_url }}">
<a class="link-offset-2 link-offset-3-hover link-underline link-underline-opacity-0 link-underline-opacity-75-hover" href="{{ back_url }}">
Назад Назад
</a> </a>
</div>
{% endblock %} {% endblock %}