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

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: else:
you_like_that = [] you_like_that = []
emotion_you_like_that = None emotion_you_like_that = None
post_quest = None post_quest = []
ans2 = None ans2 = None
return render_template('main.html', title='moona', for_me_post=for_you_post, emotion_for_you=emotion_for_you, 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, you_like_that=you_like_that, emotion_you_like_that=emotion_you_like_that,

View File

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

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-left: auto;
margin-right: 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; text-align: center;
margin-left:20%;
margin-right: -20%
} }
summary { .post {
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; background-color: #7fc3ff;
border-radius: 50px; border-radius: 50px;
width: 90%;
height: 95%;
margin-bottom: 20px; margin-bottom: 20px;
} }
.my_author, .post_zag { details {
margin-left: 50%; color: #ffffff;
margin-right: auto;
margin-top: -20%;
}
.pub, .private {
width: 60%;
height: 10%;
margin-left: auto;
margin-right: auto;
} }
#add_post { #add_post {
margin-top: 20px; margin-top: 20px;
margin-left: 83%; margin-left: 83%;
} }
#edit_btn, #edit_btn1 { .hz1 {
background-color: #c5f1ff; margin: 5%;
} font-size: 160%;
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;
} }

View File

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

View File

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

View File

@ -23,74 +23,59 @@
<div class="fresh_block" id="pop"> <div class="fresh_block" id="pop">
{% if pop_post != [] %} {% if pop_post != [] %}
{% for item in pop_post %} {% for item in pop_post %}
<div class="card" style="width: 25rem;"> <div class="card-body post">
{% if item.photo != None %} <details>
<img src="{{ item.photo }}" class="card-img-top" alt="..."> <summary>
{% endif %}
<div class="card-body">
{% if item.name != None %} {% if item.name != None %}
<h4 class="card-title" style="color: #c5f1ff">{{item.name}}</h4> <h3 class="card-title post_zag" style="color:#c5f1ff">{{item.name}}</h3>
{% endif %} {% endif %}
<p><small>{{item.date}}</small></p> </summary>
{% if item.text != None %} {% if item.text != None %}
<p class="card-text">{{item.text}}</p> <strong class="card-text" style="color:#ffffff">{{item.text}}</strong>
{% endif %} {% endif %}
</div> </details>
<ul class="list-group list-group-flush">
<li class="list-group-item">
{% if emotion_pop[loop.index0]['pos_emot'] != None %} {% if emotion_pop[loop.index0]['pos_emot'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%;"> <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'] %} {% for item2 in emotion_pop[loop.index0]['pos_emot'] %}
<li> <strong class="alert alert-success" role="alert"
<div class="emot"><strong class="alert alert-success" role="alert" style="border-radius: 22px;">{{item2}}</strong>
style="border-radius: 22px;">{{item2}}</strong></div>
</li>
{% endfor %} {% endfor %}
</ul> </details>
</div>
<p></p>
{% endif %} {% endif %}
</li>
<li class="list-group-item">
{% if emotion_pop[loop.index0]['nig_emot'] != None %} {% if emotion_pop[loop.index0]['nig_emot'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%"> <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'] %} {% for item2 in emotion_pop[loop.index0]['nig_emot'] %}
<li> <strong class="alert alert-danger" role="alert"
<div class="emot"><strong class="alert alert-danger" role="alert" style="border-radius: 22px;">{{item2}}</strong>
style="border-radius: 22px;">{{item2}}</strong></div>
</li>
{% endfor %} {% endfor %}
</ul> </details>
{% 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> </div>
<p></p>
{% endif %} {% endif %}
<div class="my_author"><img src="../{{ current_user.photo }}" width="40" height="40" {% if item.photo != None %}
style="border-radius: 22px"> <p></p>
<strong style="color: #ffffff">{{ current_user.name }}</strong> <div class="photo">
<img width="90%" src="{{ item.photo }}"
style="border-radius: 22px;">
</div> </div>
<div class="like" style="margin-top:5%; margin-left:1%"> <p></p>
{% endif %}
{% if current_user.is_authenticated %}
<div class="like">
<a type="button" <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'] %} {% if emotion_pop[loop.index0]['is_like'] %}
<img src="../static/img/like_add.png" width="117" height="100"> <img src="../static/img/like_add.png" width="117" height="100">
{% else %} {% else %}
@ -98,17 +83,32 @@
{% endif %} {% endif %}
</a> </a>
{% if emotion_pop[loop.index0]['like'] != None %} {% 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 %} {% endif %}
</div> </div>
<div> {% endif %}
<a style="border-radius: 15px; margin-top:10%; margin-left:1%" href="/post/{{ item.id }}" class="btn" id="edit_btn"> {% if emotion_pop[loop.index0]['link'] != None %}
Изменить <details>
</a> <summary class="emot_block">
<a style="border-radius: 15px; margin-top:10%" href="/post_deleted/{{ item.id }}" class="btn btn-danger"> <strong class="emot_block">Ссылки</strong>
Удалить </summary>
</a> <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> </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> </div>
{% endfor %} {% endfor %}
</div> </div>
@ -120,79 +120,64 @@
</div> </div>
</td> </td>
<td id="row2"> <td id="row2">
<div id="row2_div" style="margin-left:50%"> <div id="row2_div">
<h2 class="post_zag">Свежее</h2> <h2 class="post_zag">Свежее</h2>
<div class="fresh_block" id="fresh"> <div class="fresh_block" id="fresh">
{% if fresh_post != [] %} {% if fresh_post != [] %}
{% for item in fresh_post %} {% for item in fresh_post %}
<div class="card" style="width: 25rem;"> <div class="card-body post">
{% if item.photo != None %} <details>
<img src="{{ item.photo }}" class="card-img-top" alt="..."> <summary>
{% endif %}
<div class="card-body">
{% if item.name != None %} {% if item.name != None %}
<h4 class="card-title" style="color: #c5f1ff">{{item.name}}</h4> <h3 class="card-title post_zag" style="color:#c5f1ff">{{item.name}}</h3>
{% endif %} {% endif %}
<p><small>{{item.date}}</small></p> </summary>
{% if item.text != None %} {% if item.text != None %}
<p class="card-text">{{item.text}}</p> <strong class="card-text" style="color:#ffffff">{{item.text}}</strong>
{% endif %} {% endif %}
</div> </details>
<ul class="list-group list-group-flush">
<li class="list-group-item">
{% if emotion_fresh[loop.index0]['pos_emot'] != None %} {% if emotion_fresh[loop.index0]['pos_emot'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%;"> <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'] %} {% for item2 in emotion_fresh[loop.index0]['pos_emot'] %}
<li> <strong class="alert alert-success" role="alert"
<div class="emot"><strong class="alert alert-success" role="alert" style="border-radius: 22px;">{{item2}}</strong>
style="border-radius: 22px;">{{item2}}</strong></div>
</li>
{% endfor %} {% endfor %}
</ul> </details>
</div>
<p></p>
{% endif %} {% endif %}
</li>
<li class="list-group-item">
{% if emotion_fresh[loop.index0]['nig_emot'] != None %} {% if emotion_fresh[loop.index0]['nig_emot'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%"> <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'] %} {% for item2 in emotion_fresh[loop.index0]['nig_emot'] %}
<li> <strong class="alert alert-danger" role="alert"
<div class="emot"><strong class="alert alert-danger" role="alert" style="border-radius: 22px;">{{item2}}</strong>
style="border-radius: 22px;">{{item2}}</strong></div>
</li>
{% endfor %} {% endfor %}
</ul> </details>
{% 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> </div>
<p></p>
{% endif %} {% endif %}
<div class="my_author"><img src="../{{ current_user.photo }}" width="40" height="40" {% if item.photo != None %}
style="border-radius: 22px"> <p></p>
<strong style="color: #ffffff">{{ current_user.name }}</strong> <div class="photo">
<img width="90%" src="{{ item.photo }}"
style="border-radius: 22px;">
</div> </div>
<div class="like" style="margin-top:5%; margin-left:1%"> <p></p>
{% endif %}
{% if current_user.is_authenticated %}
<div class="like">
<a type="button" <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'] %} {% if emotion_fresh[loop.index0]['is_like'] %}
<img src="../static/img/like_add.png" width="117" height="100"> <img src="../static/img/like_add.png" width="117" height="100">
{% else %} {% else %}
@ -200,17 +185,32 @@
{% endif %} {% endif %}
</a> </a>
{% if emotion_fresh[loop.index0]['like'] != None %} {% 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 %} {% endif %}
</div> </div>
<div> {% endif %}
<a style="border-radius: 15px; margin-top:10%; margin-left:1%" href="/post/{{ item.id }}" class="btn" id="edit_btn"> {% if emotion_fresh[loop.index0]['link'] != None %}
Изменить <details>
</a> <summary class="emot_block">
<a style="border-radius: 15px; margin-top:10%" href="/post_deleted/{{ item.id }}" class="btn btn-danger"> <strong class="emot_block">Ссылки</strong>
Удалить </summary>
</a> <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> </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> </div>
{% endfor %} {% endfor %}
</div> </div>
@ -223,77 +223,62 @@
</td> </td>
<td id="row3"> <td id="row3">
<div id="row3_div"> <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 != [] %} {% if for_me_post != [] %}
{% for item in for_you_post %} {% for item in for_you_post %}
<div class="card" style="width: 25rem;"> <div class="card-body post">
{% if item.photo != None %} <details>
<img src="{{ item.photo }}" class="card-img-top" alt="..."> <summary>
{% endif %}
<div class="card-body">
{% if item.name != None %} {% if item.name != None %}
<h4 class="card-title" style="color: #c5f1ff">{{item.name}}</h4> <h3 class="card-title post_zag" style="color:#c5f1ff">{{item.name}}</h3>
{% endif %} {% endif %}
<p><small>{{item.date}}</small></p> </summary>
{% if item.text != None %} {% if item.text != None %}
<p class="card-text">{{item.text}}</p> <strong class="card-text" style="color:#ffffff">{{item.text}}</strong>
{% endif %} {% endif %}
</div> </details>
<ul class="list-group list-group-flush">
<li class="list-group-item">
{% if emotion_for_you[loop.index0]['pos_emot'] != None %} {% if emotion_for_you[loop.index0]['pos_emot'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%;"> <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'] %} {% for item2 in emotion_for_you[loop.index0]['pos_emot'] %}
<li> <strong class="alert alert-success" role="alert"
<div class="emot"><strong class="alert alert-success" role="alert" style="border-radius: 22px;">{{item2}}</strong>
style="border-radius: 22px;">{{item2}}</strong></div>
</li>
{% endfor %} {% endfor %}
</ul> </details>
</div>
<p></p>
{% endif %} {% endif %}
</li>
<li class="list-group-item">
{% if emotion_for_you[loop.index0]['nig_emot'] != None %} {% if emotion_for_you[loop.index0]['nig_emot'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%"> <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'] %} {% for item2 in emotion_for_you[loop.index0]['nig_emot'] %}
<li> <strong class="alert alert-danger" role="alert"
<div class="emot"><strong class="alert alert-danger" role="alert" style="border-radius: 22px;">{{item2}}</strong>
style="border-radius: 22px;">{{item2}}</strong></div>
</li>
{% endfor %} {% endfor %}
</ul> </details>
{% 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> </div>
<p></p>
{% endif %} {% endif %}
<div class="my_author"><img src="../{{ current_user.photo }}" width="40" height="40" {% if item.photo != None %}
style="border-radius: 22px"> <p></p>
<strong style="color: #ffffff">{{ current_user.name }}</strong> <div class="photo">
<img width="90%" src="{{ item.photo }}"
style="border-radius: 22px;">
</div> </div>
<div class="like" style="margin-top:5%; margin-left:1%"> <p></p>
{% endif %}
{% if current_user.is_authenticated %}
<div class="like">
<a type="button" <a type="button"
href="/new_like/{{current_user.id}}/{{item.id}}/diary"> href="/new_like/{{current_user.id}}/{{item.id}}/publications">
{% if emotion_for_you[loop.index0]['is_like'] %} {% if emotion_for_you[loop.index0]['is_like'] %}
<img src="../static/img/like_add.png" width="117" height="100"> <img src="../static/img/like_add.png" width="117" height="100">
{% else %} {% else %}
@ -301,17 +286,32 @@
{% endif %} {% endif %}
</a> </a>
{% if emotion_for_you[loop.index0]['like'] != None %} {% if emotion_for_you[loop.index0]['like'] != None %}
<p style="color:#ffffff; margin-left:30%">{{emotion_for_you[loop.index0]['like']}}</p> <p style="color:#ffffff">{{emotion_for_you[loop.index0]['like']}}</p>
{% endif %} {% endif %}
</div> </div>
<div> {% endif %}
<a style="border-radius: 15px; margin-top:10%; margin-left:1%" href="/post/{{ item.id }}" class="btn" id="edit_btn"> {% if emotion_for_you[loop.index0]['link'] != None %}
Изменить <details>
</a> <summary class="emot_block">
<a style="border-radius: 15px; margin-top:10%" href="/post_deleted/{{ item.id }}" class="btn btn-danger"> <strong class="emot_block">Ссылки</strong>
Удалить </summary>
</a> <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> </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> </div>
{% endfor %} {% endfor %}
</div> </div>