ОТКАТ КОММИТА - отсюда

This commit is contained in:
mrmur 2022-04-27 22:17:40 +05:00
parent 5a82a47532
commit b880a01f99
7 changed files with 660 additions and 880 deletions

View File

@ -154,7 +154,7 @@ def main_page():
else:
you_like_that = []
emotion_you_like_that = None
post_quest = None
post_quest = []
ans2 = None
return render_template('main.html', title='moona', for_me_post=for_you_post, emotion_for_you=emotion_for_you,
you_like_that=you_like_that, emotion_you_like_that=emotion_you_like_that,

View File

@ -24,10 +24,11 @@ summary {
margin-bottom: 10px;
}
.my_author {
width:40%;
height:5%;
margin-left:30%;
margin-right:30%;
width:148px;
height:44px;
left:255px;
-webkit-border-radius: 22px;
-moz-border-radius: 22px;
border-radius: 22px;
border:2px solid #ffffff;
background-color:#1daff0;
@ -39,14 +40,12 @@ summary {
#image {
width: 70%;
}
.card-body {
background-color: #7fc3ff;
}
.all_my_post {
#all_my_post, #all_my_post1 {
margin-left: auto;
margin-right: auto;
}
.card {
#my_post, #my_post1 {
text-align: center;
margin-left: auto;
margin-right: auto;
background-color: #7fc3ff;
@ -55,13 +54,15 @@ summary {
}
.my_author, .my_post_zag {
text-align: center;
margin-left: auto;
margin-right: auto;
margin-top: 25px;
}
.pub, .private {
width: 55%;
width: 60%;
height: 10%;
margin-left:25%;
margin-right: 25%;
text-align: center;
margin-left: auto;
margin-right: auto;
}
#add_post {
margin-top: 20px;
@ -69,9 +70,6 @@ summary {
}
#edit_btn, #edit_btn1 {
background-color: #c5f1ff;
margin-left: 10%;
margin-right: auto;
margin-top: 15px;
}
input[type=text], input[type=email], input[type=password], input[type=file], input[type=number]{
padding:10px;
@ -98,24 +96,21 @@ textarea {
margin-left: 20px;
}
#row2, #row1 {
width: 32%;
width: 30%;
}
#row1, #row2, #all_my_question {
display:inline-block;
vertical-align: top;
}
.but {
width: 80%;
margin-bottom:5%;
}
#all_my_question {
width: 30%;
height: -100%;
}
.question, .my_post {
background-color:#7fc3ff;
border-radius: 22px;
width: 90%;
margin-left: 10px;
margin-right: 10px;
}
.is_ans {
background-color:#ddefff;
@ -137,7 +132,7 @@ table {
margin-right: auto;
}
#row1_div, #row2_div {
width: 98%;
width: 98%;
}
td {
margin: 20px;
@ -147,8 +142,4 @@ width: 25%;
}
.is_ans {
width: 95%;
}
.card-text {
color:#ffffff;
text-align: center;
}

View File

@ -1,153 +1,49 @@
.bad_user {
margin-left: auto;
margin-right: auto;
background-color: #1daff0;
color: #ffffff;
width: 50%;
height: 55%;
-webkit-border-radius:22px;
-moz-border-radius: 22px;
border-radius: 22px;
border:2px solid #ffffff;
margin-top: 20px;
}
#main_table {
margin-left:7%
}
.bad_centre {
text-align: center;
}
summary {
margin-bottom: 10px;
}
.pos_emot {
margin-bottom: 10px;
}
.nig_emot {
margin-bottom: 10px;
}
.my_author {
width:40%;
height:5%;
left:10%;
-webkit-border-radius: 22px;
-moz-border-radius: 22px;
border-radius: 22px;
border:2px solid #ffffff;
background-color:#1daff0;
top: 98px;
}
.emot {
margin-bottom: 30px;
}
#image {
width: 70%;
}
.card-body {
background-color: #7fc3ff;
}
#all_my_post, #all_my_post1 {
margin-left: auto;
margin-right: auto;
}
#my_post, #my_post1 {
text-align: center;
margin-left: auto;
margin-right: auto;
background-color: #7fc3ff;
border-radius: 50px;
margin-bottom: 20px;
}
.my_author, .my_post_zag {
margin-left: 50%;
margin-right: auto;
margin-top: -20%;
}
.pub, .private {
width: 60%;
height: 10%;
margin-left: auto;
margin-right: auto;
}
#add_post {
margin-top: 20px;
margin-left: 83%;
}
#edit_btn, #edit_btn1 {
background-color: #c5f1ff;
}
input[type=text], input[type=email], input[type=password], input[type=file], input[type=number]{
padding:10px;
border:5;
box-shadow:0 0 15px 4px rgba(0,0,0,0.06);
border-radius:10px;
}
textarea {
width:100%;
resize: vertical;
padding:10px;
border-radius:10px;
border:5;
box-shadow:0 0 15px 4px rgba(0,0,0,0.06);
height:150px;
}
.post_form {
margin-left: auto;
margin-right: auto;
width: 80%;
height: 50%
}
.box {
margin-left: 20px;
}
.row2, .row1, .row3{
width: 30%;
}
.row1, .row2, .question, .row3{
.row1, .row2, .row3 {
width: 33%;
display:inline-block;
vertical-align: top;
margin-top: 39px;
}
.but {
width: 80%;
margin-bottom:5%;
.rowdiv1, .rowdiv2, .rowdiv3 {
width: 95%;
}
#all_my_question {
width: 30%;
height: -100%;
.post_zag, .card-text, .card-body, .post_zag, .author {
width: 90%;
margin-left: auto;
margin-right: auto;
text-align: center;
}
.question, .my_post {
.post {
background-color: #7fc3ff;
border-radius: 50px;
width: 90%;
height: 95%;
margin-bottom: 20px;
}
details {
color: #ffffff;
}
#main_table {
margin-left: 10%;
margin-right: auto;
width: 90%;
}
.question {
background-color:#7fc3ff;
border-radius: 22px;
width: 100%;
width: 90%;
margin-left: 10px;
}
.is_ans {
background-color:#ddefff;
border:2px solid #ffffff;
border-radius: 25px;
width: 380px;
width: 95%;
}
.emot_block {
color: #ffffff;
font-weight: bolder;
}
table {
margin-left: 10%;
width: 90%;
}
.like {
width: 50%;
margin-left: auto;
margin-right: auto;
}
.row1_div, .row2_div, .row3div {
width: 100%;
}
td {
margin: 20px;
}
#all_my_question {
width: 25%;
}
.is_ans {
width: 95%;
.but {
width: 80%;
}

View File

@ -1,141 +1,41 @@
.bad_user {
.but {
width: 80%;
}
table {
margin-left: 10%;
margin-right: auto;
width: 90%;
}
#row1, #row2, #row3 {
width: 33%;
display:inline-block;
vertical-align: top;
margin-top: 39px;
}
#row1_div, #row2_div, #row3_div {
width: 95%;
}
.post_zag, .card-text, .card-body, .post_zag, .author {
width: 90%;
margin-left: auto;
margin-right: auto;
background-color: #1daff0;
color: #ffffff;
width: 50%;
height: 55%;
-webkit-border-radius:22px;
-moz-border-radius: 22px;
border-radius: 22px;
border:2px solid #ffffff;
margin-top: 20px;
}
.bad_centre {
text-align: center;
margin-left:20%;
margin-right: -20%
}
summary {
margin-bottom: 10px;
}
.pos_emot {
margin-bottom: 10px;
}
.nig_emot {
margin-bottom: 10px;
}
.my_author {
width:40%;
height:5%;
left:10%;
-webkit-border-radius: 22px;
-moz-border-radius: 22px;
border-radius: 22px;
border:2px solid #ffffff;
background-color:#1daff0;
top: 98px;
}
.emot {
margin-bottom: 30px;
}
#image {
width: 70%;
}
.card-body {
background-color: #7fc3ff;
}
#all_my_post, #all_my_post1 {
margin-left: auto;
margin-right: auto;
}
#my_post, #my_post1 {
text-align: center;
margin-left: auto;
margin-right: auto;
.post {
background-color: #7fc3ff;
border-radius: 50px;
width: 90%;
height: 95%;
margin-bottom: 20px;
}
.my_author, .post_zag {
margin-left: 50%;
margin-right: auto;
margin-top: -20%;
}
.pub, .private {
width: 60%;
height: 10%;
margin-left: auto;
margin-right: auto;
details {
color: #ffffff;
}
#add_post {
margin-top: 20px;
margin-left: 83%;
}
#edit_btn, #edit_btn1 {
background-color: #c5f1ff;
}
input[type=text], input[type=email], input[type=password], input[type=file], input[type=number]{
padding:10px;
border:5;
box-shadow:0 0 15px 4px rgba(0,0,0,0.06);
border-radius:10px;
}
textarea {
width:100%;
resize: vertical;
padding:10px;
border-radius:10px;
border:5;
box-shadow:0 0 15px 4px rgba(0,0,0,0.06);
height:150px;
}
.post_form {
margin-left: auto;
margin-right: auto;
width: 80%;
height: 50%
}
.box {
margin-left: 20px;
}
#row2, #row1 {
width: 30%;
}
#row1, #row2, #all_my_question {
display:inline-block;
vertical-align: top;
}
.but {
width: 80%;
margin-bottom:5%;
}
#all_my_question {
width: 30%;
height: -100%;
}
.question, .my_post {
background-color:#7fc3ff;
border-radius: 22px;
width: 100%;
margin-left: 10px;
}
.emot_block {
color: #ffffff;
font-weight: bolder;
}
table {
margin-left: 10%;
width: 90%;
}
.like {
width: 50%;
margin-left: auto;
margin-right: auto;
}
#row1_div, #row2_div {
width: 98%;
}
td {
margin: 20px;
.hz1 {
margin: 5%;
font-size: 160%;
}

View File

@ -3,116 +3,109 @@
{% block content %}
{% if current_user.is_authenticated %}
<table class="but">
<tr>
<td style="width: 110%;">
<h1 class="upp_zag">Дневник</h1>
</td>
<td>
<a href="/add_post" id="add_post" class="btn btn-primary"
style="background-color:#1daff0;border-radius: 15px;"><strong>Добавить
запись</strong></a>
</td>
</tr>
</table>
<h1 class="upp_zag">Дневник</h1>
<div>
<a href="/add_post" id="add_post" class="btn btn-primary"
style="background-color:#1daff0;border-radius: 15px;"><strong>Добавить
запись</strong></a>
</div>
<table>
<td id="row1">
<div id="row1_div">
<h2 class="my_post_zag" style="margin-bottom: 10%; margin-left:15%">Публикации</h2>
<div class="all_my_post">
<h1 class="my_post_zag">Публикации</h1>
<div id="all_my_post1">
{% if my_post != [] %}
{% for item in pub_post %}
<div class="card">
{% if item.photo != None %}
<img src="{{ item.photo }}" class="card-img-top" alt="...">
{% endif %}
<div class="card-body">
{% if item.name != None %}
<h4 class="card-title" style="color: #c5f1ff">{{item.name}}</h4>
{% endif %}
<p><small>{{item.date}}</small></p>
<div class="card-body" id="my_post1">
<details>
<summary style="color:#ffffff">{% if item.name != None %}
<h2 class="card-title" id="my_post_zag1" style="color:#c5f1ff">{{item.name}}</h2>
{% endif %}
</summary>
{% if item.text != None %}
<p class="card-text">{{item.text}}</p>
<strong class="card-text" id="my_text1" style="color:#ffffff">{{item.text}}</strong>
{% endif %}
</details>
{% if emotion_pub[loop.index0]['pos_emot'] != None %}
<div class="pos_emot">
<details>
<summary class="emot_block">
<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>
{% endfor %}
</details>
</div>
{% endif %}
{% if emotion_pub[loop.index0]['nig_emot'] != None %}
<div class="nig_emot">
<details>
<summary class="emot_block">
<strong class="emot_block">Негативные эмоции</strong>
</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>
{% endfor %}
</details>
</div>
{% endif %}
{% if item.photo != None %}
<div class="photo">
<img width="90%" src="{{ item.photo }}"
style="border-radius: 22px;">
</div>
{% endif %}
{% if emotion_pub[loop.index0]['link'] != None %}
<details>
<summary class="emot_block">
<strong class="emot_block">Ссылки</strong>
</summary>
{% for item2 in emotion_pub[loop.index0]['link'] %}
<div class="link">
<a class="alert alert-light" role="alert" href="{{ item2 }}" style="border-radius: 22px;">Ссылка
{{ loop.index }}</a>
</div>
{% endfor %}
</details>
{% endif %}
{% if item.public == 1 or item.public == 'True' %}
<div style="border-radius: 22px;" class="alert alert-success pub" role="alert">Запись
опубликована
</div>
{% else %}
<div style="border-radius: 22px;" class="alert alert-danger private" role="alert">Запись
приватная
</div>
{% endif %}
<div class="like">
<a type="button"
href="/new_like/{{current_user.id}}/{{item.id}}/diary">
{% if emotion_pub[loop.index0]['is_like'] %}
<img src="../static/img/like_add.png" width="117" height="100">
{% else %}
<img src="../static/img/like.png" width="94" height="80">
{% endif %}
</a>
{% if emotion_pub[loop.index0]['like'] != None %}
<p style="color:#ffffff">{{emotion_pub[loop.index0]['like']}}</p>
{% endif %}
</div>
<ul class="list-group list-group-flush">
{% if emotion_pub[loop.index0]['pos_emot'] != None %}
<li class="list-group-item">
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%;">
{% for item2 in emotion_pub[loop.index0]['pos_emot'] %}
<li>
<div class="emot"><strong class="alert alert-success" role="alert"
style="border-radius: 22px;">{{item2}}</strong></div>
</li>
{% endfor %}
</ul>
</li>
{% endif %}
{% if emotion_pub[loop.index0]['nig_emot'] != None %}
<li class="list-group-item">
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%">
{% for item2 in emotion_pub[loop.index0]['nig_emot'] %}
<li>
<div class="emot"><strong class="alert alert-danger" role="alert"
style="border-radius: 22px;">{{item2}}</strong></div>
</li>
{% endfor %}
</ul>
</li>
{% endif %}
{% if emotion_pub[loop.index0]['link'] != None %}
<li class="list-group-item">
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%; margin-bottom:5%">
{% for item2 in emotion_pub[loop.index0]['link'] %}
<li>
<div class="emot"><a class="alert alert-light" role="alert" href="{{ item2 }}"
style="border-radius: 22px;">Ссылка
{{ loop.index }}</a></div>
</li>
{% endfor %}
</ul>
</li>
{% endif %}
</ul>
<div class="card-body">
{% if item.public == 1 or item.public == 'True' %}
<div style="border-radius: 22px;" class="alert alert-success pub"
role="alert">Запись
опубликована
</div>
{% else %}
<div style="border-radius: 22px;" class="alert alert-danger private"
role="alert">Запись
приватная
</div>
{% endif %}
<div class="my_author"><img src="../{{ current_user.photo }}" width="40" height="40"
style="border-radius: 22px">
<strong style="color: #ffffff">{{ current_user.name }}</strong>
</div>
<div class="like" style="margin-top:5%; margin-left:1%">
<a type="button"
href="/new_like/{{current_user.id}}/{{item.id}}/diary">
{% if emotion_pub[loop.index0]['is_like'] %}
<img src="../static/img/like_add.png" width="117" height="100">
{% else %}
<img src="../static/img/like.png" width="94" height="80">
{% endif %}
</a>
{% if emotion_pub[loop.index0]['like'] != None %}
<p style="color:#ffffff; margin-left:30%">{{emotion_pub[loop.index0]['like']}}</p>
{% endif %}
</div>
<div class="edit">
<a style="border-radius: 15px;" href="/post/{{ item.id }}"
class="btn" id="edit_btn">
Изменить
</a>
<a style="border-radius: 15px;" href="/post_deleted/{{ item.id }}"
class="btn btn-danger">
Удалить
</a>
</div>
<div class="my_author"><img src="../{{ current_user.photo }}" width="40" height="40"
style="border-radius: 22px">
<strong style="color: #ffffff">{{ current_user.name }}</strong>
</div>
<strong style="color:#ffffff">{{item.date}}</strong>
<div>
<a style="border-radius: 15px;" href="/post/{{ item.id }}" class="btn" , id="edit_btn">
Изменить
</a>
<a style="border-radius: 15px;" href="/post_deleted/{{ item.id }}" class="btn btn-danger">
Удалить
</a>
</div>
</div>
{% endfor %}
@ -126,27 +119,27 @@
</td>
<td id="row2">
<div id="row2_div">
<h2 class="my_post_zag">Мои мысли</h2>
<div class="all_my_post">
<h1 class="my_post_zag">Мои мысли</h1>
<div id="all_my_post">
{% if my_post != [] %}
{% for item in my_post %}
<div class="card">
{% if item.photo != None %}
<img src="{{ item.photo }}" class="card-img-top" alt="...">
{% endif %}
<div class="card-body">
{% if item.name != None %}
<h4 class="card-title" style="color: #c5f1ff">{{item.name}}</h4>
{% endif %}
<p><small>{{item.date}}</small></p>
<div class="card-body" id="my_post">
<details>
<summary style="color:#ffffff">{% if item.name != None %}
<h2 class="card-title" id="my_post_zag" style="color:#c5f1ff">{{item.name}}</h2>
{% endif %}
</summary>
{% if item.text != None %}
<p class="card-text">{{item.text}}</p>
<strong class="card-text" id="my_text" style="color:#ffffff">{{item.text}}</strong>
{% endif %}
</div>
<ul class="list-group list-group-flush">
{% if emotion[loop.index0]['pos_emot'] != None %}
<li class="list-group-item">
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%;">
</details>
{% if emotion[loop.index0]['pos_emot'] != None %}
<div class="pos_emot">
<details>
<summary class="emot_block">
<strong class="emot_block">Позитивные эмоции</strong>
</summary>
<ul style="list-style-type: none">
{% for item2 in emotion[loop.index0]['pos_emot'] %}
<li>
<div class="emot"><strong class="alert alert-success" role="alert"
@ -154,11 +147,16 @@
</li>
{% endfor %}
</ul>
</li>
{% endif %}
{% if emotion[loop.index0]['nig_emot'] != None %}
<li class="list-group-item">
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%">
</details>
</div>
{% endif %}
{% if emotion[loop.index0]['nig_emot'] != None %}
<div class="nig_emot">
<details>
<summary class="emot_block">
<strong class="emot_block">Негативные эмоции</strong>
</summary>
<ul style="list-style-type: none">
{% for item2 in emotion[loop.index0]['nig_emot'] %}
<li>
<div class="emot"><strong class="alert alert-danger" role="alert"
@ -166,48 +164,49 @@
</li>
{% endfor %}
</ul>
</li>
{% endif %}
{% if emotion[loop.index0]['link'] != None %}
<li class="list-group-item">
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%; margin-bottom:5%">
{% for item2 in emotion[loop.index0]['link'] %}
<li>
<div class="emot"><a class="alert alert-light" role="alert" href="{{ item2 }}"
style="border-radius: 22px;">Ссылка
{{ loop.index }}</a></div>
</li>
{% endfor %}
</ul>
</li>
{% endif %}
</ul>
<div class="card-body">
{% if item.public == 1 or item.public == 'True' %}
<div style="border-radius: 22px;" class="alert alert-success pub"
role="alert">Запись
опубликована
</div>
{% else %}
<div style="border-radius: 22px;" class="alert alert-danger private"
role="alert">Запись
приватная
</div>
{% endif %}
<div class="my_author"><img src="../{{ current_user.photo }}" width="40" height="40"
style="border-radius: 22px">
<strong style="color: #ffffff">{{ current_user.name }}</strong>
</div>
<div>
<a style="border-radius: 15px;" href="/post/{{ item.id }}"
class="btn" id="edit_btn1">
Изменить
</a>
<a style="border-radius: 15px;" href="/post_deleted/{{ item.id }}"
class="btn btn-danger">
Удалить
</a>
</details>
</div>
{% endif %}
{% if item.photo != None %}
<div class="photo">
<img width="90%" src="{{ item.photo }}"
style="border-radius: 22px;">
</div>
{% endif %}
{% if emotion[loop.index0]['link'] != None %}
<details>
<summary class="emot_block">
<strong class="emot_block">Ссылки</strong>
</summary>
{% for item2 in emotion[loop.index0]['link'] %}
<div class="link">
<a class="alert alert-light" role="alert" href="{{ item2 }}" style="border-radius: 22px;">Ссылка
{{ loop.index }}</a>
</div>
{% endfor %}
</details>
{% endif %}
{% if item.public == 1 or item.public == 'True' %}
<div style="border-radius: 22px;" class="alert alert-success pub" role="alert">Запись
опубликована
</div>
{% else %}
<div style="border-radius: 22px;" class="alert alert-danger private" role="alert">Запись
приватная
</div>
{% endif %}
<div class="my_author"><img src="../{{ current_user.photo }}" width="40" height="40"
style="border-radius: 22px">
<strong style="color: #ffffff">{{ current_user.name }}</strong>
</div>
<strong style="color:#ffffff">{{item.date}}</strong>
<div>
<a style="border-radius: 15px;" href="/post/{{ item.id }}" class="btn" id="edit_btn1">
Изменить
</a>
<a style="border-radius: 15px;" href="/post_deleted/{{ item.id }}" class="btn btn-danger">
Удалить
</a>
</div>
</div>
{% endfor %}
@ -221,7 +220,7 @@
</td>
<td id="all_my_question">
<div id="row3_div">
<h2 class="my_post_zag" style="margin-top:10%; margin-left:15%">Вопросы дня</h2>
<h1 class="my_post_zag">Вопросы дня</h1>
<div class="my_post">
<div class="question">
{% for item in question %}

View File

@ -15,10 +15,9 @@
</tr>
</table>
<table id="main_table">
<td class="row1">
<th class="row1">
<div class="rowdiv1">
{% if current_user.is_authenticated %}
<h2 class="my_post_zag" style="margin-left:15%">Вопросы дня</h2>
<h1 class="my_post_zag">Вопросы дня</h1>
<div class="my_post">
<div class="question">
{% for item in question %}
@ -39,212 +38,207 @@
{% endfor %}
</div>
</div>
{% else %}
<p>Чтобы увидеть вопросы дня войдите в аккаунт</p>
{% endif %}
</div>
</td>
<td class="row2">
</th>
<th class="row2">
<div class="rowdiv2">
<h2 class="post_zag" style="margin-top:-20%">Вам будет интересно</h2>
<h2 class="post_zag">Вам будет интересно</h2>
{% if for_me_post != [] %}
{% for item in for_me_post %}
<div class="card" style="width: 25rem;">
{% if item.photo != None %}
<img src="{{ item.photo }}" class="card-img-top" alt="...">
<div class="card-body post">
<details>
<summary>
{% if item.name != None %}
<h3 class="card-title post_zag" style="color:#c5f1ff">{{item.name}}</h3>
{% endif %}
</summary>
{% if item.text != None %}
<strong class="card-text" style="color:#ffffff">{{item.text}}</strong>
{% endif %}
<div class="card-body">
{% if item.name != None %}
<h4 class="card-title" style="color: #c5f1ff">{{item.name}}</h4>
{% endif %}
<p><small>{{item.date}}</small></p>
{% if item.text != None %}
<p class="card-text">{{item.text}}</p>
{% endif %}
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">
{% if emotion_for_you[loop.index0]['pos_emot'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%;">
{% for item2 in emotion_for_you[loop.index0]['pos_emot'] %}
<li>
<div class="emot"><strong class="alert alert-success" role="alert"
style="border-radius: 22px;">{{item2}}</strong></div>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
<li class="list-group-item">
{% if emotion_for_you[loop.index0]['nig_emot'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%">
{% for item2 in emotion_for_you[loop.index0]['nig_emot'] %}
<li>
<div class="emot"><strong class="alert alert-danger" role="alert"
style="border-radius: 22px;">{{item2}}</strong></div>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
<li class="list-group-item">
{% if emotion_for_you[loop.index0]['link'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%; margin-bottom:5%">
{% for item2 in emotion_for_you[loop.index0]['link'] %}
<li>
<div class="emot"><a class="alert alert-light" role="alert" href="{{ item2 }}" style="border-radius: 22px;">Ссылка
{{ loop.index }}</a></div>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
</ul>
<div class="card-body">
{% if item.public == 1 or item.public == 'True' %}
<div style="border-radius: 22px; margin-left:-5%; width: 50%" class="alert alert-success pub" role="alert">Запись
опубликована
</div>
{% else %}
<div style="border-radius: 22px; margin-left:-5% width: 50%" class="alert alert-danger private" role="alert">Запись
приватная
</div>
{% endif %}
<div class="my_author"><img src="../{{ current_user.photo }}" width="40" height="40"
style="border-radius: 22px">
<strong style="color: #ffffff">{{ current_user.name }}</strong>
</div>
<div class="like" style="margin-top:5%; margin-left:1%">
<a type="button"
href="/new_like/{{current_user.id}}/{{item.id}}/diary">
{% if emotion_for_you[loop.index0]['is_like'] %}
<img src="../static/img/like_add.png" width="117" height="100">
{% else %}
<img src="../static/img/like.png" width="94" height="80">
{% endif %}
</a>
{% if emotion_for_you[loop.index0]['like'] != None %}
<p style="color:#ffffff; margin-left:30%">{{emotion_for_you[loop.index0]['like']}}</p>
{% endif %}
</div>
<div>
<a style="border-radius: 15px; margin-top:10%; margin-left:1%" href="/post/{{ item.id }}" class="btn" id="edit_btn">
Изменить
</a>
<a style="border-radius: 15px; margin-top:10%" href="/post_deleted/{{ item.id }}" class="btn btn-danger">
Удалить
</a>
</div>
</details>
{% if emotion_for_you[loop.index0]['pos_emot'] != None %}
<div class="pos_emot">
<details>
<summary class="emot_block">
<strong class="emot_block">Позитивные эмоции</strong>
</summary>
<p></p>
{% for item2 in emotion_for_you[loop.index0]['pos_emot'] %}
<strong class="alert alert-success" role="alert"
style="border-radius: 22px;">{{item2}}</strong>
{% endfor %}
</details>
</div>
{% endfor %}
<p></p>
{% endif %}
{% if emotion_for_you[loop.index0]['nig_emot'] != None %}
<div class="nig_emot">
<details>
<summary class="emot_block">
<strong class="emot_block">Негативные эмоции</strong>
</summary>
<p></p>
{% for item2 in emotion_for_you[loop.index0]['nig_emot'] %}
<strong class="alert alert-danger" role="alert"
style="border-radius: 22px;">{{item2}}</strong>
{% endfor %}
</details>
</div>
<p></p>
{% endif %}
{% if item.photo != None %}
<p></p>
<div class="photo">
<img width="90%" src="{{ item.photo }}"
style="border-radius: 22px;">
</div>
<p></p>
{% endif %}
{% if current_user.is_authenticated %}
<div class="like">
<a type="button"
href="/new_like/{{current_user.id}}/{{item.id}}/main">
{% if emotion_for_you[loop.index0]['is_like'] %}
<img src="../static/img/like_add.png" width="117" height="100">
{% else %}
<img src="../static/img/like.png" width="94" height="80">
{% endif %}
</a>
{% if emotion_for_you[loop.index0]['like'] != None %}
<p style="color:#ffffff">{{emotion_for_you[loop.index0]['like']}}</p>
{% endif %}
</div>
{% endif %}
{% if emotion_for_you[loop.index0]['link'] != None %}
<details>
<summary class="emot_block">
<strong class="emot_block">Ссылки</strong>
</summary>
<p></p>
{% for item2 in emotion_for_you[loop.index0]['link'] %}
<div class="link">
<a class="alert alert-light" role="alert" href="{{ item2 }}" style="border-radius: 22px;">Ссылка
{{ loop.index }}</a>
</div>
<p></p>
{% endfor %}
</details>
{% endif %}
<div class="author" style="style=position:absolute; width:148px; height:44px; left:255px; -webkit-border-radius:
22px;-moz-border-radius: 22px;border-radius: 22px; border:2px solid #FFFFFF; background-color:#1daff0; top:
98px;"><img src="../{{ emotion_for_you[loop.index0]['author'].photo }}" width="40" height="40"
style="border-radius: 22px">
<strong style="color: #ffffff">{{ emotion_for_you[loop.index0]['author'].name }}</strong>
</div>
<strong style="color:#ffffff">{{item.date}}</strong>
</div>
{% endfor %}
{% else %}
<div class="bad_centre" style="background-color:#1daff0; border-radius: 22px;color:#ffffff">
<p class="hz1">Ничего не нашлось :с</p>
</div>
{% endif %}
</div>
</td>
<td class="row3">
</th>
<th class="row3">
<div class="rowdiv3">
<h2 class="post_zag" style="margin-top:-20%; margin-left:5%">Вам понравилось</h2>
<h2 class="post_zag">Вам понравились эти посты</h2>
{% if you_like_that != [] %}
{% for item in you_like_that %}
<div class="card" style="width: 25rem;">
{% if item.photo != None %}
<img src="{{ item.photo }}" class="card-img-top" alt="...">
<div class="card-body post">
<details>
<summary>
{% if item.name != None %}
<h3 class="card-title post_zag" style="color:#c5f1ff">{{item.name}}</h3>
{% endif %}
</summary>
{% if item.text != None %}
<strong class="card-text" style="color:#ffffff">{{item.text}}</strong>
{% endif %}
<div class="card-body">
{% if item.name != None %}
<h4 class="card-title" style="color: #c5f1ff">{{item.name}}</h4>
{% endif %}
<p><small>{{item.date}}</small></p>
{% if item.text != None %}
<p class="card-text">{{item.text}}</p>
{% endif %}
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">
{% if emotion_you_like_that[loop.index0]['pos_emot'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%;">
{% for item2 in emotion_you_like_that[loop.index0]['pos_emot'] %}
<li>
<div class="emot"><strong class="alert alert-success" role="alert"
style="border-radius: 22px;">{{item2}}</strong></div>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
<li class="list-group-item">
{% if emotion_you_like_that[loop.index0]['nig_emot'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%">
{% for item2 in emotion_you_like_that[loop.index0]['nig_emot'] %}
<li>
<div class="emot"><strong class="alert alert-danger" role="alert"
style="border-radius: 22px;">{{item2}}</strong></div>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
<li class="list-group-item">
{% if emotion_you_like_that[loop.index0]['link'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%; margin-bottom:5%">
{% for item2 in emotion_you_like_that[loop.index0]['link'] %}
<li>
<div class="emot"><a class="alert alert-light" role="alert" href="{{ item2 }}" style="border-radius: 22px;">Ссылка
{{ loop.index }}</a></div>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
</ul>
<div class="card-body">
{% if item.public == 1 or item.public == 'True' %}
<div style="border-radius: 22px; margin-left:-5%; width: 50%" class="alert alert-success pub" role="alert">Запись
опубликована
</div>
{% else %}
<div style="border-radius: 22px; margin-left:-5% width: 50%" class="alert alert-danger private" role="alert">Запись
приватная
</div>
{% endif %}
<div class="my_author"><img src="../{{ current_user.photo }}" width="40" height="40"
style="border-radius: 22px">
<strong style="color: #ffffff">{{ current_user.name }}</strong>
</div>
<div class="like" style="margin-top:5%; margin-left:1%">
<a type="button"
href="/new_like/{{current_user.id}}/{{item.id}}/diary">
{% if emotion_you_like_that[loop.index0]['is_like'] %}
<img src="../static/img/like_add.png" width="117" height="100">
{% else %}
<img src="../static/img/like.png" width="94" height="80">
{% endif %}
</a>
{% if emotion_you_like_that[loop.index0]['like'] != None %}
<p style="color:#ffffff; margin-left:30%">{{emotion_you_like_that[loop.index0]['like']}}</p>
{% endif %}
</div>
<div>
<a style="border-radius: 15px; margin-top:10%; margin-left:1%" href="/post/{{ item.id }}" class="btn" id="edit_btn1">
Изменить
</a>
<a style="border-radius: 15px; margin-top:10%" href="/post_deleted/{{ item.id }}" class="btn btn-danger">
Удалить
</a>
</div>
</details>
{% if emotion_you_like_that[loop.index0]['pos_emot'] != None %}
<div class="pos_emot">
<details>
<summary class="emot_block">
<strong class="emot_block">Позитивные эмоции</strong>
</summary>
<p></p>
{% for item2 in emotion_you_like_that[loop.index0]['pos_emot'] %}
<strong class="alert alert-success" role="alert"
style="border-radius: 22px;">{{item2}}</strong>
{% endfor %}
</details>
</div>
{% endfor %}
<p></p>
{% endif %}
{% if emotion_you_like_that[loop.index0]['nig_emot'] != None %}
<div class="nig_emot">
<details>
<summary class="emot_block">
<strong class="emot_block">Негативные эмоции</strong>
</summary>
<p></p>
{% for item2 in emotion_you_like_that[loop.index0]['nig_emot'] %}
<strong class="alert alert-danger" role="alert"
style="border-radius: 22px;">{{item2}}</strong>
{% endfor %}
</details>
</div>
<p></p>
{% endif %}
{% if item.photo != None %}
<p></p>
<div class="photo">
<img width="90%" src="{{ item.photo }}"
style="border-radius: 22px;">
</div>
<p></p>
{% endif %}
{% if current_user.is_authenticated %}
<div class="like">
<a type="button"
href="/new_like/{{current_user.id}}/{{item.id}}/main">
{% if emotion_you_like_that[loop.index0]['is_like'] %}
<img src="../static/img/like_add.png" width="117" height="100">
{% else %}
<img src="../static/img/like.png" width="94" height="80">
{% endif %}
</a>
{% if emotion_you_like_that[loop.index0]['like'] != None %}
<p style="color:#ffffff">{{emotion_you_like_that[loop.index0]['like']}}</p>
{% endif %}
</div>
{% endif %}
{% if emotion_you_like_that[loop.index0]['link'] != None %}
<details>
<summary class="emot_block">
<strong class="emot_block">Ссылки</strong>
</summary>
<p></p>
{% for item2 in emotion_you_like_that[loop.index0]['link'] %}
<div class="link">
<a class="alert alert-light" role="alert" href="{{ item2 }}" style="border-radius: 22px;">Ссылка
{{ loop.index }}</a>
</div>
<p></p>
{% endfor %}
</details>
{% endif %}
<div class="author" style="style=position:absolute; width:148px; height:44px; left:255px; -webkit-border-radius:
22px;-moz-border-radius: 22px;border-radius: 22px; border:2px solid #FFFFFF; background-color:#1daff0; top:
98px;"><img src="../{{ emotion_you_like_that[loop.index0]['author'].photo }}" width="40" height="40"
style="border-radius: 22px">
<strong style="color: #ffffff">{{ emotion_you_like_that[loop.index0]['author'].name }}</strong>
</div>
<strong style="color:#ffffff">{{item.date}}</strong>
</div>
{% endfor %}
{% else %}
<div class="bad_centre" style="background-color:#1daff0; border-radius: 22px;color:#ffffff">
<p class="hz1">Ничего не нашлось :с</p>
</div>
{% endif %}
</div>
</td>
</th>
</table>
{% endblock %}

View File

@ -23,74 +23,59 @@
<div class="fresh_block" id="pop">
{% if pop_post != [] %}
{% for item in pop_post %}
<div class="card" style="width: 25rem;">
<div class="card-body post">
<details>
<summary>
{% if item.name != None %}
<h3 class="card-title post_zag" style="color:#c5f1ff">{{item.name}}</h3>
{% endif %}
</summary>
{% if item.text != None %}
<strong class="card-text" style="color:#ffffff">{{item.text}}</strong>
{% endif %}
</details>
{% if emotion_pop[loop.index0]['pos_emot'] != None %}
<div class="pos_emot">
<details>
<summary class="emot_block">
<strong class="emot_block">Позитивные эмоции</strong>
</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>
{% endfor %}
</details>
</div>
<p></p>
{% endif %}
{% if emotion_pop[loop.index0]['nig_emot'] != None %}
<div class="nig_emot">
<details>
<summary class="emot_block">
<strong class="emot_block">Негативные эмоции</strong>
</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>
{% endfor %}
</details>
</div>
<p></p>
{% endif %}
{% if item.photo != None %}
<img src="{{ item.photo }}" class="card-img-top" alt="...">
<p></p>
<div class="photo">
<img width="90%" src="{{ item.photo }}"
style="border-radius: 22px;">
</div>
<p></p>
{% endif %}
<div class="card-body">
{% if item.name != None %}
<h4 class="card-title" style="color: #c5f1ff">{{item.name}}</h4>
{% endif %}
<p><small>{{item.date}}</small></p>
{% if item.text != None %}
<p class="card-text">{{item.text}}</p>
{% endif %}
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">
{% if emotion_pop[loop.index0]['pos_emot'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%;">
{% for item2 in emotion_pop[loop.index0]['pos_emot'] %}
<li>
<div class="emot"><strong class="alert alert-success" role="alert"
style="border-radius: 22px;">{{item2}}</strong></div>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
<li class="list-group-item">
{% if emotion_pop[loop.index0]['nig_emot'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%">
{% for item2 in emotion_pop[loop.index0]['nig_emot'] %}
<li>
<div class="emot"><strong class="alert alert-danger" role="alert"
style="border-radius: 22px;">{{item2}}</strong></div>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
<li class="list-group-item">
{% if emotion_pop[loop.index0]['link'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%; margin-bottom:5%">
{% for item2 in emotion_pop[loop.index0]['link'] %}
<li>
<div class="emot"><a class="alert alert-light" role="alert" href="{{ item2 }}" style="border-radius: 22px;">Ссылка
{{ loop.index }}</a></div>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
</ul>
<div class="card-body">
{% if item.public == 1 or item.public == 'True' %}
<div style="border-radius: 22px; margin-left:-5%; width: 50%" class="alert alert-success pub" role="alert">Запись
опубликована
</div>
{% else %}
<div style="border-radius: 22px; margin-left:-5% width: 50%" class="alert alert-danger private" role="alert">Запись
приватная
</div>
{% endif %}
<div class="my_author"><img src="../{{ current_user.photo }}" width="40" height="40"
style="border-radius: 22px">
<strong style="color: #ffffff">{{ current_user.name }}</strong>
</div>
<div class="like" style="margin-top:5%; margin-left:1%">
{% if current_user.is_authenticated %}
<div class="like">
<a type="button"
href="/new_like/{{current_user.id}}/{{item.id}}/diary">
href="/new_like/{{current_user.id}}/{{item.id}}/publications">
{% if emotion_pop[loop.index0]['is_like'] %}
<img src="../static/img/like_add.png" width="117" height="100">
{% else %}
@ -98,17 +83,32 @@
{% endif %}
</a>
{% if emotion_pop[loop.index0]['like'] != None %}
<p style="color:#ffffff; margin-left:30%">{{emotion_pop[loop.index0]['like']}}</p>
<p style="color:#ffffff">{{emotion_pop[loop.index0]['like']}}</p>
{% endif %}
</div>
<div>
<a style="border-radius: 15px; margin-top:10%; margin-left:1%" href="/post/{{ item.id }}" class="btn" id="edit_btn">
Изменить
</a>
<a style="border-radius: 15px; margin-top:10%" href="/post_deleted/{{ item.id }}" class="btn btn-danger">
Удалить
</a>
{% endif %}
{% if emotion_pop[loop.index0]['link'] != None %}
<details>
<summary class="emot_block">
<strong class="emot_block">Ссылки</strong>
</summary>
<p></p>
{% for item2 in emotion_pop[loop.index0]['link'] %}
<div class="link">
<a class="alert alert-light" role="alert" href="{{ item2 }}" style="border-radius: 22px;">Ссылка
{{ loop.index }}</a>
</div>
<p></p>
{% endfor %}
</details>
{% endif %}
<div class="author" style="style=position:absolute; width:148px; height:44px; left:255px; -webkit-border-radius:
22px;-moz-border-radius: 22px;border-radius: 22px; border:2px solid #FFFFFF; background-color:#1daff0; top:
98px;"><img src="../{{ emotion_pop[loop.index0]['author'].photo }}" width="40" height="40"
style="border-radius: 22px">
<strong style="color: #ffffff">{{ emotion_pop[loop.index0]['author'].name }}</strong>
</div>
<strong style="color:#ffffff">{{item.date}}</strong>
</div>
{% endfor %}
</div>
@ -120,79 +120,64 @@
</div>
</td>
<td id="row2">
<div id="row2_div" style="margin-left:50%">
<div id="row2_div">
<h2 class="post_zag">Свежее</h2>
<div class="fresh_block" id="fresh">
{% if fresh_post != [] %}
{% for item in fresh_post %}
<div class="card" style="width: 25rem;">
<div class="card-body post">
<details>
<summary>
{% if item.name != None %}
<h3 class="card-title post_zag" style="color:#c5f1ff">{{item.name}}</h3>
{% endif %}
</summary>
{% if item.text != None %}
<strong class="card-text" style="color:#ffffff">{{item.text}}</strong>
{% endif %}
</details>
{% if emotion_fresh[loop.index0]['pos_emot'] != None %}
<div class="pos_emot">
<details>
<summary class="emot_block">
<strong class="emot_block">Позитивные эмоции</strong>
</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>
{% endfor %}
</details>
</div>
<p></p>
{% endif %}
{% if emotion_fresh[loop.index0]['nig_emot'] != None %}
<div class="nig_emot">
<details>
<summary class="emot_block">
<strong class="emot_block">Негативные эмоции</strong>
</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>
{% endfor %}
</details>
</div>
<p></p>
{% endif %}
{% if item.photo != None %}
<img src="{{ item.photo }}" class="card-img-top" alt="...">
<p></p>
<div class="photo">
<img width="90%" src="{{ item.photo }}"
style="border-radius: 22px;">
</div>
<p></p>
{% endif %}
<div class="card-body">
{% if item.name != None %}
<h4 class="card-title" style="color: #c5f1ff">{{item.name}}</h4>
{% endif %}
<p><small>{{item.date}}</small></p>
{% if item.text != None %}
<p class="card-text">{{item.text}}</p>
{% endif %}
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">
{% if emotion_fresh[loop.index0]['pos_emot'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%;">
{% for item2 in emotion_fresh[loop.index0]['pos_emot'] %}
<li>
<div class="emot"><strong class="alert alert-success" role="alert"
style="border-radius: 22px;">{{item2}}</strong></div>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
<li class="list-group-item">
{% if emotion_fresh[loop.index0]['nig_emot'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%">
{% for item2 in emotion_fresh[loop.index0]['nig_emot'] %}
<li>
<div class="emot"><strong class="alert alert-danger" role="alert"
style="border-radius: 22px;">{{item2}}</strong></div>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
<li class="list-group-item">
{% if emotion_fresh[loop.index0]['link'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%; margin-bottom:5%">
{% for item2 in emotion_fresh[loop.index0]['link'] %}
<li>
<div class="emot"><a class="alert alert-light" role="alert" href="{{ item2 }}" style="border-radius: 22px;">Ссылка
{{ loop.index }}</a></div>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
</ul>
<div class="card-body">
{% if item.public == 1 or item.public == 'True' %}
<div style="border-radius: 22px; margin-left:-5%; width: 50%" class="alert alert-success pub" role="alert">Запись
опубликована
</div>
{% else %}
<div style="border-radius: 22px; margin-left:-5% width: 50%" class="alert alert-danger private" role="alert">Запись
приватная
</div>
{% endif %}
<div class="my_author"><img src="../{{ current_user.photo }}" width="40" height="40"
style="border-radius: 22px">
<strong style="color: #ffffff">{{ current_user.name }}</strong>
</div>
<div class="like" style="margin-top:5%; margin-left:1%">
{% if current_user.is_authenticated %}
<div class="like">
<a type="button"
href="/new_like/{{current_user.id}}/{{item.id}}/diary">
href="/new_like/{{current_user.id}}/{{item.id}}/publications">
{% if emotion_fresh[loop.index0]['is_like'] %}
<img src="../static/img/like_add.png" width="117" height="100">
{% else %}
@ -200,17 +185,32 @@
{% endif %}
</a>
{% if emotion_fresh[loop.index0]['like'] != None %}
<p style="color:#ffffff; margin-left:30%">{{emotion_fresh[loop.index0]['like']}}</p>
<p style="color:#ffffff">{{emotion_fresh[loop.index0]['like']}}</p>
{% endif %}
</div>
<div>
<a style="border-radius: 15px; margin-top:10%; margin-left:1%" href="/post/{{ item.id }}" class="btn" id="edit_btn">
Изменить
</a>
<a style="border-radius: 15px; margin-top:10%" href="/post_deleted/{{ item.id }}" class="btn btn-danger">
Удалить
</a>
{% endif %}
{% if emotion_fresh[loop.index0]['link'] != None %}
<details>
<summary class="emot_block">
<strong class="emot_block">Ссылки</strong>
</summary>
<p></p>
{% for item2 in emotion_fresh[loop.index0]['link'] %}
<div class="link">
<a class="alert alert-light" role="alert" href="{{ item2 }}" style="border-radius: 22px;">Ссылка
{{ loop.index }}</a>
</div>
<p></p>
{% endfor %}
</details>
{% endif %}
<div class="author" style="style=position:absolute; width:148px; height:44px; left:255px; -webkit-border-radius:
22px;-moz-border-radius: 22px;border-radius: 22px; border:2px solid #FFFFFF; background-color:#1daff0; top:
98px;"><img src="../{{ emotion_fresh[loop.index0]['author'].photo }}" width="40" height="40"
style="border-radius: 22px">
<strong style="color: #ffffff">{{ emotion_fresh[loop.index0]['author'].name }}</strong>
</div>
<strong style="color:#ffffff">{{item.date}}</strong>
</div>
{% endfor %}
</div>
@ -223,103 +223,103 @@
</td>
<td id="row3">
<div id="row3_div">
<h2 class="post_zag" style="margin-top:-5%; margin-left:25%">Для вас</h2>
<h2 class="post_zag">Для вас</h2>
{% if for_me_post != [] %}
{% for item in for_you_post %}
<div class="card" style="width: 25rem;">
{% if item.photo != None %}
<img src="{{ item.photo }}" class="card-img-top" alt="...">
<div class="card-body post">
<details>
<summary>
{% if item.name != None %}
<h3 class="card-title post_zag" style="color:#c5f1ff">{{item.name}}</h3>
{% endif %}
</summary>
{% if item.text != None %}
<strong class="card-text" style="color:#ffffff">{{item.text}}</strong>
{% endif %}
<div class="card-body">
{% if item.name != None %}
<h4 class="card-title" style="color: #c5f1ff">{{item.name}}</h4>
{% endif %}
<p><small>{{item.date}}</small></p>
{% if item.text != None %}
<p class="card-text">{{item.text}}</p>
{% endif %}
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">
{% if emotion_for_you[loop.index0]['pos_emot'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%;">
{% for item2 in emotion_for_you[loop.index0]['pos_emot'] %}
<li>
<div class="emot"><strong class="alert alert-success" role="alert"
style="border-radius: 22px;">{{item2}}</strong></div>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
<li class="list-group-item">
{% if emotion_for_you[loop.index0]['nig_emot'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%">
{% for item2 in emotion_for_you[loop.index0]['nig_emot'] %}
<li>
<div class="emot"><strong class="alert alert-danger" role="alert"
style="border-radius: 22px;">{{item2}}</strong></div>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
<li class="list-group-item">
{% if emotion_for_you[loop.index0]['link'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%; margin-bottom:5%">
{% for item2 in emotion_for_you[loop.index0]['link'] %}
<li>
<div class="emot"><a class="alert alert-light" role="alert" href="{{ item2 }}" style="border-radius: 22px;">Ссылка
{{ loop.index }}</a></div>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
</ul>
<div class="card-body">
{% if item.public == 1 or item.public == 'True' %}
<div style="border-radius: 22px; margin-left:-5%; width: 50%" class="alert alert-success pub" role="alert">Запись
опубликована
</div>
{% else %}
<div style="border-radius: 22px; margin-left:-5% width: 50%" class="alert alert-danger private" role="alert">Запись
приватная
</div>
{% endif %}
<div class="my_author"><img src="../{{ current_user.photo }}" width="40" height="40"
style="border-radius: 22px">
<strong style="color: #ffffff">{{ current_user.name }}</strong>
</div>
<div class="like" style="margin-top:5%; margin-left:1%">
<a type="button"
href="/new_like/{{current_user.id}}/{{item.id}}/diary">
{% if emotion_for_you[loop.index0]['is_like'] %}
<img src="../static/img/like_add.png" width="117" height="100">
{% else %}
<img src="../static/img/like.png" width="94" height="80">
{% endif %}
</a>
{% if emotion_for_you[loop.index0]['like'] != None %}
<p style="color:#ffffff; margin-left:30%">{{emotion_for_you[loop.index0]['like']}}</p>
{% endif %}
</div>
<div>
<a style="border-radius: 15px; margin-top:10%; margin-left:1%" href="/post/{{ item.id }}" class="btn" id="edit_btn">
Изменить
</a>
<a style="border-radius: 15px; margin-top:10%" href="/post_deleted/{{ item.id }}" class="btn btn-danger">
Удалить
</a>
</div>
</details>
{% if emotion_for_you[loop.index0]['pos_emot'] != None %}
<div class="pos_emot">
<details>
<summary class="emot_block">
<strong class="emot_block">Позитивные эмоции</strong>
</summary>
<p></p>
{% for item2 in emotion_for_you[loop.index0]['pos_emot'] %}
<strong class="alert alert-success" role="alert"
style="border-radius: 22px;">{{item2}}</strong>
{% endfor %}
</details>
</div>
{% endfor %}
<p></p>
{% endif %}
{% if emotion_for_you[loop.index0]['nig_emot'] != None %}
<div class="nig_emot">
<details>
<summary class="emot_block">
<strong class="emot_block">Негативные эмоции</strong>
</summary>
<p></p>
{% for item2 in emotion_for_you[loop.index0]['nig_emot'] %}
<strong class="alert alert-danger" role="alert"
style="border-radius: 22px;">{{item2}}</strong>
{% endfor %}
</details>
</div>
<p></p>
{% endif %}
{% if item.photo != None %}
<p></p>
<div class="photo">
<img width="90%" src="{{ item.photo }}"
style="border-radius: 22px;">
</div>
<p></p>
{% endif %}
{% if current_user.is_authenticated %}
<div class="like">
<a type="button"
href="/new_like/{{current_user.id}}/{{item.id}}/publications">
{% if emotion_for_you[loop.index0]['is_like'] %}
<img src="../static/img/like_add.png" width="117" height="100">
{% else %}
<img src="../static/img/like.png" width="94" height="80">
{% endif %}
</a>
{% if emotion_for_you[loop.index0]['like'] != None %}
<p style="color:#ffffff">{{emotion_for_you[loop.index0]['like']}}</p>
{% endif %}
</div>
{% endif %}
{% if emotion_for_you[loop.index0]['link'] != None %}
<details>
<summary class="emot_block">
<strong class="emot_block">Ссылки</strong>
</summary>
<p></p>
{% for item2 in emotion_for_you[loop.index0]['link'] %}
<div class="link">
<a class="alert alert-light" role="alert" href="{{ item2 }}" style="border-radius: 22px;">Ссылка
{{ loop.index }}</a>
</div>
<p></p>
{% endfor %}
</details>
{% endif %}
<div class="author" style="style=position:absolute; width:148px; height:44px; left:255px; -webkit-border-radius:
22px;-moz-border-radius: 22px;border-radius: 22px; border:2px solid #FFFFFF; background-color:#1daff0; top:
98px;"><img src="../{{ emotion_for_you[loop.index0]['author'].photo }}" width="40" height="40"
style="border-radius: 22px">
<strong style="color: #ffffff">{{ emotion_for_you[loop.index0]['author'].name }}</strong>
</div>
<strong style="color:#ffffff">{{item.date}}</strong>
</div>
{% else %}
<div class="bad_centre" style="background-color:#1daff0; border-radius: 22px;color:#ffffff">
<p class="hz1">Ничего не нашлось :с</p>
</div>
{% endif %}
{% endfor %}
</div>
{% else %}
<div class="bad_centre" style="background-color:#1daff0; border-radius: 22px;color:#ffffff">
<p class="hz1">Ничего не нашлось :с</p>
</div>
{% endif %}
</div>
</td>
</table>