Подправлено отображение блоков с постами

This commit is contained in:
mrmur 2022-04-19 18:18:12 +05:00
parent 4c536e528a
commit 7ded2a130d
5 changed files with 413 additions and 374 deletions

Binary file not shown.

View File

@ -123,10 +123,12 @@ textarea {
}
table {
margin-left: 5%;
width: 90%;
}
.like {
width: 50%;
margin-left: auto;
margin-right: auto;
}
#row1_div, #row2_div, #row3_div {
width: 90%;
}

View File

@ -1,10 +1,15 @@
table {
width: 90%;
margin-left: auto;
margin-right: auto;
}
#row1, #row2, #row3 {
width: 30%;
width: 32%;
display:inline-block;
vertical-align: top;
margin-top: 39px;
}
#row1_div, #row2_div, #row3_div {
width: 90%;
}
.post_zag, .card-text, .card-body, .post_zag, .author {
width: 90%;
@ -22,3 +27,7 @@ margin-bottom: 20px;
details {
color: #ffffff;
}
#add_post {
margin-top: 20px;
margin-left: 83%;
}

View File

@ -11,6 +11,7 @@
</div>
<table>
<td id="row1">
<div id="row1_div">
<h1 class="my_post_zag">Публикации</h1>
<div id="all_my_post1">
{% if my_post != [] %}
@ -32,7 +33,8 @@
<strong class="emot_block">Позитивные эмоции</strong>
</summary>
{% for item2 in emotion_pub[loop.index0]['pos_emot'] %}
<strong class="alert alert-success" role="alert" style="border-radius: 22px;">{{item2}}</strong>
<strong class="alert alert-success" role="alert"
style="border-radius: 22px;">{{item2}}</strong>
{% endfor %}
</details>
</div>
@ -45,7 +47,8 @@
</summary>
<p></p>
{% for item2 in emotion_pub[loop.index0]['nig_emot'] %}
<strong class="alert alert-danger" role="alert" style="border-radius: 22px;">{{item2}}</strong>
<strong class="alert alert-danger" role="alert"
style="border-radius: 22px;">{{item2}}</strong>
{% endfor %}
</details>
</div>
@ -112,8 +115,10 @@
</div>
{% endif %}
</div>
</div>
</td>
<td id="row2">
<div id="row2_div">
<h1 class="my_post_zag">Мои мысли</h1>
<div id="all_my_post">
{% if my_post != [] %}
@ -211,8 +216,10 @@
</div>
{% endif %}
</div>
</div>
</td>
<td id="all_my_question">
<div id="row3_div">
<h1 class="my_post_zag">Вопросы дня</h1>
<div class="my_post">
<div class="question">
@ -234,6 +241,7 @@
{% endfor %}
</div>
</div>
</div>
</td>
</table>
{% else %}

View File

@ -2,8 +2,17 @@
{% extends "base.html" %}
{% block content %}
{% if current_user.is_authenticated %}
<div>
<a href="/add_post" id="add_post" class="btn btn-primary"
style="background-color:#1daff0;border-radius: 15px;"><strong>Добавить
запись</strong></a>
</div>
{% endif %}
<table>
<td id="row1">
<div id="row1_div">
<h1 class="post_zag">Популярное</h1>
<div class="fresh_block" id="pop">
{% if pop_post != [] %}
@ -27,7 +36,8 @@
</summary>
<p></p>
{% for item2 in emotion_pop[loop.index0]['pos_emot'] %}
<strong class="alert alert-success" role="alert" style="border-radius: 22px;">{{item2}}</strong>
<strong class="alert alert-success" role="alert"
style="border-radius: 22px;">{{item2}}</strong>
{% endfor %}
</details>
</div>
@ -41,7 +51,8 @@
</summary>
<p></p>
{% for item2 in emotion_pop[loop.index0]['nig_emot'] %}
<strong class="alert alert-danger" role="alert" style="border-radius: 22px;">{{item2}}</strong>
<strong class="alert alert-danger" role="alert"
style="border-radius: 22px;">{{item2}}</strong>
{% endfor %}
</details>
</div>
@ -100,8 +111,10 @@
<h1 class="hz1">Ничего не нашлось :с</h1>
</div>
{% endif %}
</div>
</td>
<td id="row2">
<div id="row2_div">
<h1 class="post_zag">Свежее</h1>
<div class="fresh_block" id="fresh">
{% if fresh_post != [] %}
@ -125,7 +138,8 @@
</summary>
<p></p>
{% for item2 in emotion_fresh[loop.index0]['pos_emot'] %}
<strong class="alert alert-success" role="alert" style="border-radius: 22px;">{{item2}}</strong>
<strong class="alert alert-success" role="alert"
style="border-radius: 22px;">{{item2}}</strong>
{% endfor %}
</details>
</div>
@ -139,7 +153,8 @@
</summary>
<p></p>
{% for item2 in emotion_fresh[loop.index0]['nig_emot'] %}
<strong class="alert alert-danger" role="alert" style="border-radius: 22px;">{{item2}}</strong>
<strong class="alert alert-danger" role="alert"
style="border-radius: 22px;">{{item2}}</strong>
{% endfor %}
</details>
</div>
@ -198,7 +213,12 @@
<h1 class="hz1">Ничего не нашлось :с</h1>
</div>
{% endif %}
</div>
</td>
<td id="row3">
<div id="row3_div">
<h1 class="post_zag">Для вас</h1>
</div>
</td>
<td id="row3"></td>
</table>
{% endblock %}