Изменен вид публикаций на ВСЕХ страницах!

Пы.Сы. я чуть не умерла за пару часов
This commit is contained in:
Dinosaur 2022-04-27 13:53:23 +05:00
parent f9faba1a2b
commit 32a9bfaac8
9 changed files with 815 additions and 616 deletions

Binary file not shown.

View File

@ -2,11 +2,11 @@
font-family: 'Montserrat Alternates', sans-serif; font-family: 'Montserrat Alternates', sans-serif;
} }
body { body {
font-family: 'Comfortaa', cursive; font-family: 'Comfortaa', cursive;
} }
.upp_zag { .upp_zag {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
text-align: center; text-align: center;
margin-top: 50px; margin-top: 50px;
} }

View File

@ -24,9 +24,9 @@ summary {
margin-bottom: 10px; margin-bottom: 10px;
} }
.my_author { .my_author {
width:148px; width:40%;
height:44px; height:5%;
left:255px; left:10%;
-webkit-border-radius: 22px; -webkit-border-radius: 22px;
-moz-border-radius: 22px; -moz-border-radius: 22px;
border-radius: 22px; border-radius: 22px;
@ -40,6 +40,9 @@ summary {
#image { #image {
width: 70%; width: 70%;
} }
.card-body {
background-color: #7fc3ff;
}
#all_my_post, #all_my_post1 { #all_my_post, #all_my_post1 {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@ -53,10 +56,9 @@ summary {
margin-bottom: 20px; margin-bottom: 20px;
} }
.my_author, .my_post_zag { .my_author, .my_post_zag {
text-align: center; margin-left: 50%;
margin-left: auto;
margin-right: auto; margin-right: auto;
margin-top: 25px; margin-top: -20%;
} }
.pub, .private { .pub, .private {
width: 60%; width: 60%;
@ -102,6 +104,10 @@ textarea {
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%;
@ -109,7 +115,7 @@ textarea {
.question, .my_post { .question, .my_post {
background-color:#7fc3ff; background-color:#7fc3ff;
border-radius: 22px; border-radius: 22px;
width: 90%; width: 100%;
margin-left: 10px; margin-left: 10px;
} }
.is_ans { .is_ans {

View File

@ -1,49 +1,153 @@
.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%;
} }
.row1, .row2, .row3 { #edit_btn, #edit_btn1 {
width: 33%; 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{
display:inline-block; display:inline-block;
vertical-align: top; vertical-align: top;
margin-top: 39px;
} }
.rowdiv1, .rowdiv2, .rowdiv3 { .but {
width: 95%; width: 80%;
margin-bottom:5%;
} }
.post_zag, .card-text, .card-body, .post_zag, .author { #all_my_question {
width: 90%; width: 30%;
margin-left: auto; height: -100%;
margin-right: auto;
text-align: center;
} }
.post { .question, .my_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: 90%; width: 100%;
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: 95%; width: 380px;
} }
.but { .emot_block {
width: 80%; 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%;
} }

View File

@ -1,41 +1,141 @@
.but { .bad_user {
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;
text-align: center; 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;
} }
.post { .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;
background-color: #7fc3ff; background-color: #7fc3ff;
border-radius: 50px; border-radius: 50px;
width: 90%;
height: 95%;
margin-bottom: 20px; margin-bottom: 20px;
} }
details { .my_author, .post_zag {
color: #ffffff; 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%;
} }
.hz1 { #edit_btn, #edit_btn1 {
margin: 5%; background-color: #c5f1ff;
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

@ -21,11 +21,8 @@
} }
} }
</style> </style>
<link href="sidebars.css" rel="stylesheet"> <link href="sidebars.css" rel="stylesheet">
<link href="../static/css/base.css">
<link rel="stylesheet" <link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
@ -73,7 +70,7 @@
</a> </a>
<ul class="nav nav-pills nav-flush flex-column mb-auto text-center"> <ul class="nav nav-pills nav-flush flex-column mb-auto text-center">
<li class="nav-item"> <li class="nav-item">
<a href="/" class="nav-link active py-3 border-bottom" aria-current="page" title="Главная" <a href="/" class="nav-link active py-3 border-bottom" title="Главная"
data-bs-toggle="tooltip" data-bs-placement="right"> data-bs-toggle="tooltip" data-bs-placement="right">
<svg class="bi" width="24" height="24" role="img" aria-label="Главная"> <svg class="bi" width="24" height="24" role="img" aria-label="Главная">
<use xlink:href="#home"/> <use xlink:href="#home"/>

View File

@ -3,85 +3,92 @@
{% block content %} {% block content %}
{% if current_user.is_authenticated %} {% if current_user.is_authenticated %}
<h1 class="upp_zag">Главная</h1> <table class="but">
<div> <tr>
<a href="/add_post" id="add_post" class="btn btn-primary" <td style="width: 110%;">
style="background-color:#1daff0;border-radius: 15px;"><strong>Добавить <h1 class="upp_zag">Дневник</h1>
запись</strong></a> </td>
</div> <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>
<table> <table>
<td id="row1"> <td id="row1">
<div id="row1_div"> <div id="row1_div">
<h1 class="my_post_zag">Публикации</h1> <h2 class="my_post_zag" style="margin-bottom: 10%; margin-left:15%">Публикации</h2>
<div id="all_my_post1"> <div id="all_my_post1">
{% if my_post != [] %} {% if my_post != [] %}
{% for item in pub_post %} {% for item in pub_post %}
<div class="card-body" id="my_post1">
<details> <div class="card" style="width: 25rem;">
<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 %}
<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 %} {% if item.photo != None %}
<div class="photo"> <img src="{{ item.photo }}" class="card-img-top" alt="...">
<img width="90%" src="{{ item.photo }}"
style="border-radius: 22px;">
</div>
{% endif %} {% endif %}
{% if emotion_pub[loop.index0]['link'] != None %} <div class="card-body">
<details> {% if item.name != None %}
<summary class="emot_block"> <h4 class="card-title" style="color: #c5f1ff">{{item.name}}</h4>
<strong class="emot_block">Ссылки</strong> {% endif %}
</summary> <p><small>{{item.date}}</small></p>
{% for item2 in emotion_pub[loop.index0]['link'] %} {% if item.text != None %}
<div class="link"> <p class="card-text">{{item.text}}</p>
<a class="alert alert-light" role="alert" href="{{ item2 }}" style="border-radius: 22px;">Ссылка {% endif %}
{{ loop.index }}</a> </div>
</div> <ul class="list-group list-group-flush">
{% endfor %} <li class="list-group-item">
</details> {% if emotion_pub[loop.index0]['pos_emot'] != None %}
<ul style="list-style-type: none; margin-left:-15%; margin-top:5%;">
{% for item2 in emotion[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 %} {% endif %}
</li>
<li class="list-group-item">
{% if emotion_pub[loop.index0]['nig_emot'] != None %}
<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>
{% endif %}
</li>
<li class="list-group-item">
{% if emotion_pub[loop.index0]['link'] != None %}
<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>
{% endif %}
</li>
</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" role="alert">Запись <div style="border-radius: 22px; margin-left:-5%; width: 50%" class="alert alert-success pub" role="alert">Запись
опубликована опубликована
</div> </div>
{% else %} {% else %}
<div style="border-radius: 22px;" class="alert alert-danger private" role="alert">Запись <div style="border-radius: 22px; margin-left:-5% width: 50%" class="alert alert-danger private" role="alert">Запись
приватная приватная
</div> </div>
{% endif %} {% endif %}
<div class="like"> <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" <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'] %}
@ -91,19 +98,14 @@
{% endif %} {% endif %}
</a> </a>
{% if emotion_pub[loop.index0]['like'] != None %} {% if emotion_pub[loop.index0]['like'] != None %}
<p style="color:#ffffff">{{emotion_pub[loop.index0]['like']}}</p> <p style="color:#ffffff; margin-left:30%">{{emotion_pub[loop.index0]['like']}}</p>
{% endif %} {% endif %}
</div> </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> <div>
<a style="border-radius: 15px;" href="/post/{{ item.id }}" class="btn" , id="edit_btn"> <a style="border-radius: 15px; margin-top:10%; margin-left:1%" href="/post/{{ item.id }}" class="btn" id="edit_btn">
Изменить Изменить
</a> </a>
<a style="border-radius: 15px;" href="/post_deleted/{{ item.id }}" class="btn btn-danger"> <a style="border-radius: 15px; margin-top:10%" href="/post_deleted/{{ item.id }}" class="btn btn-danger">
Удалить Удалить
</a> </a>
</div> </div>
@ -119,27 +121,27 @@
</td> </td>
<td id="row2"> <td id="row2">
<div id="row2_div"> <div id="row2_div">
<h1 class="my_post_zag">Мои мысли</h1> <h2 class="my_post_zag" style="margin-bottom: 10%; margin-left:15%">Мои мысли</h2>
<div id="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-body" id="my_post"> <div class="card" style="width: 25rem;">
<details> {% if item.photo != None %}
<summary style="color:#ffffff">{% if item.name != None %} <img src="{{ item.photo }}" class="card-img-top" alt="...">
<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 %}
{% if item.text != None %} <h4 class="card-title" style="color: #c5f1ff">{{item.name}}</h4>
<strong class="card-text" id="my_text" style="color:#ffffff">{{item.text}}</strong> {% endif %}
{% endif %} <p><small>{{item.date}}</small></p>
</details> {% if item.text != None %}
{% if emotion[loop.index0]['pos_emot'] != None %} <p class="card-text">{{item.text}}</p>
<div class="pos_emot"> {% endif %}
<details> </div>
<summary class="emot_block"> <ul class="list-group list-group-flush">
<strong class="emot_block">Позитивные эмоции</strong> <li class="list-group-item">
</summary> {% if emotion_pub[loop.index0]['pos_emot'] != None %}
<ul style="list-style-type: none"> <ul style="list-style-type: none; margin-left:-15%; margin-top:5%;">
{% 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"
@ -147,51 +149,40 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</details> {% endif %}
</div> </li>
{% endif %} <li class="list-group-item">
{% if emotion[loop.index0]['nig_emot'] != None %} {% if emotion_pub[loop.index0]['nig_emot'] != None %}
<div class="nig_emot"> <ul style="list-style-type: none; margin-left:-15%; margin-top:5%">
<details> {% for item2 in emotion_pub[loop.index0]['nig_emot'] %}
<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> <li>
<div class="emot"><strong class="alert alert-danger" role="alert" <div class="emot"><strong class="alert alert-danger" role="alert"
style="border-radius: 22px;">{{item2}}</strong></div> style="border-radius: 22px;">{{item2}}</strong></div>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</details> {% endif %}
</div> </li>
{% endif %} <li class="list-group-item">
{% if item.photo != None %} {% if emotion_pub[loop.index0]['link'] != None %}
<div class="photo"> <ul style="list-style-type: none; margin-left:-15%; margin-top:5%; margin-bottom:5%">
<img width="90%" src="{{ item.photo }}" {% for item2 in emotion_pub[loop.index0]['link'] %}
style="border-radius: 22px;"> <li>
</div> <div class="emot"><a class="alert alert-light" role="alert" href="{{ item2 }}" style="border-radius: 22px;">Ссылка
{% endif %} {{ loop.index }}</a></div>
{% if emotion[loop.index0]['link'] != None %} </li>
<details> {% endfor %}
<summary class="emot_block"> </ul>
<strong class="emot_block">Ссылки</strong> {% endif %}
</summary> </li>
{% for item2 in emotion[loop.index0]['link'] %} </ul>
<div class="link"> <div class="card-body">
<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' %} {% if item.public == 1 or item.public == 'True' %}
<div style="border-radius: 22px;" class="alert alert-success pub" role="alert">Запись <div style="border-radius: 22px; margin-left:-5%; width: 50%" class="alert alert-success pub" role="alert">Запись
опубликована опубликована
</div> </div>
{% else %} {% else %}
<div style="border-radius: 22px;" class="alert alert-danger private" role="alert">Запись <div style="border-radius: 22px; margin-left:-5% width: 50%" class="alert alert-danger private" role="alert">Запись
приватная приватная
</div> </div>
{% endif %} {% endif %}
@ -199,12 +190,11 @@
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 }}" class="btn" id="edit_btn1"> <a style="border-radius: 15px; margin-top:10%; margin-left:1%" href="/post/{{ item.id }}" class="btn" id="edit_btn">
Изменить Изменить
</a> </a>
<a style="border-radius: 15px;" href="/post_deleted/{{ item.id }}" class="btn btn-danger"> <a style="border-radius: 15px; margin-top:10%" href="/post_deleted/{{ item.id }}" class="btn btn-danger">
Удалить Удалить
</a> </a>
</div> </div>
@ -220,7 +210,7 @@
</td> </td>
<td id="all_my_question"> <td id="all_my_question">
<div id="row3_div"> <div id="row3_div">
<h1 class="my_post_zag">Вопросы дня</h1> <h2 class="my_post_zag" style="margin-top:10%; 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 %}

View File

@ -15,9 +15,9 @@
</tr> </tr>
</table> </table>
<table id="main_table"> <table id="main_table">
<th class="row1"> <td class="row1">
<div class="rowdiv1"> <div class="rowdiv1">
<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,206 +39,208 @@
</div> </div>
</div> </div>
</div> </div>
</th> </td>
<th class="row2"> <td class="row2">
<div class="rowdiv2"> <div class="rowdiv2">
<h2 class="post_zag">Вам будет интересно</h2> <h2 class="post_zag" style="margin-top:-20%">Вам будет интересно</h2>
{% if for_me_post != [] %} {% if for_me_post != [] %}
{% for item in for_me_post %} {% for item in for_me_post %}
<div class="card-body post"> <div class="card" style="width: 25rem;">
<details> {% if item.photo != None %}
<summary> <img src="{{ item.photo }}" class="card-img-top" alt="...">
{% 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 %} {% endif %}
</details> <div class="card-body">
{% if emotion_for_you[loop.index0]['pos_emot'] != None %} {% if item.name != None %}
<div class="pos_emot"> <h4 class="card-title" style="color: #c5f1ff">{{item.name}}</h4>
<details> {% endif %}
<summary class="emot_block"> <p><small>{{item.date}}</small></p>
<strong class="emot_block">Позитивные эмоции</strong> {% if item.text != None %}
</summary> <p class="card-text">{{item.text}}</p>
<p></p> {% endif %}
{% for item2 in emotion_for_you[loop.index0]['pos_emot'] %} </div>
<strong class="alert alert-success" role="alert" <ul class="list-group list-group-flush">
style="border-radius: 22px;">{{item2}}</strong> <li class="list-group-item">
{% endfor %} {% if emotion_for_you[loop.index0]['pos_emot'] != None %}
</details> <ul style="list-style-type: none; margin-left:-15%; margin-top:5%;">
</div> {% for item2 in emotion_for_you[loop.index0]['pos_emot'] %}
<p></p> <li>
{% endif %} <div class="emot"><strong class="alert alert-success" role="alert"
{% if emotion_for_you[loop.index0]['nig_emot'] != None %} style="border-radius: 22px;">{{item2}}</strong></div>
<div class="nig_emot"> </li>
<details> {% endfor %}
<summary class="emot_block"> </ul>
<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 %} {% endif %}
</a> </li>
{% if emotion_for_you[loop.index0]['like'] != None %} <li class="list-group-item">
<p style="color:#ffffff">{{emotion_for_you[loop.index0]['like']}}</p> {% if emotion_for_you[loop.index0]['nig_emot'] != None %}
{% endif %} <ul style="list-style-type: none; margin-left:-15%; margin-top:5%">
</div> {% for item2 in emotion_for_you[loop.index0]['nig_emot'] %}
{% endif %} <li>
{% if emotion_for_you[loop.index0]['link'] != None %} <div class="emot"><strong class="alert alert-danger" role="alert"
<details> style="border-radius: 22px;">{{item2}}</strong></div>
<summary class="emot_block"> </li>
<strong class="emot_block">Ссылки</strong> {% endfor %}
</summary> </ul>
<p></p> {% endif %}
{% for item2 in emotion_for_you[loop.index0]['link'] %} </li>
<div class="link"> <li class="list-group-item">
<a class="alert alert-light" role="alert" href="{{ item2 }}" style="border-radius: 22px;">Ссылка {% if emotion_for_you[loop.index0]['link'] != None %}
{{ loop.index }}</a> <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> </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> </div>
<strong style="color:#ffffff">{{item.date}}</strong> {% endfor %}
</div> </div>
{% 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">
<p class="hz1">Ничего не нашлось :с</p> <p class="hz1">Ничего не нашлось :с</p>
</div> </div>
{% endif %} {% endif %}
</div> </div>
</th> </td>
<th class="row3"> <td class="row3">
<div class="rowdiv3"> <div class="rowdiv3">
<h2 class="post_zag">Вам понравились эти посты</h2> <h2 class="post_zag" style="margin-top:-20%; margin-left:5%">Вам понравилось</h2>
{% if you_like_that != [] %} {% if you_like_that != [] %}
{% for item in you_like_that %} {% for item in you_like_that %}
<div class="card-body post"> <div class="card" style="width: 25rem;">
<details> {% if item.photo != None %}
<summary> <img src="{{ item.photo }}" class="card-img-top" alt="...">
{% 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 %} {% endif %}
</details> <div class="card-body">
{% if emotion_you_like_that[loop.index0]['pos_emot'] != None %} {% if item.name != None %}
<div class="pos_emot"> <h4 class="card-title" style="color: #c5f1ff">{{item.name}}</h4>
<details> {% endif %}
<summary class="emot_block"> <p><small>{{item.date}}</small></p>
<strong class="emot_block">Позитивные эмоции</strong> {% if item.text != None %}
</summary> <p class="card-text">{{item.text}}</p>
<p></p> {% endif %}
{% for item2 in emotion_you_like_that[loop.index0]['pos_emot'] %} </div>
<strong class="alert alert-success" role="alert" <ul class="list-group list-group-flush">
style="border-radius: 22px;">{{item2}}</strong> <li class="list-group-item">
{% endfor %} {% if emotion_you_like_that[loop.index0]['pos_emot'] != None %}
</details> <ul style="list-style-type: none; margin-left:-15%; margin-top:5%;">
</div> {% for item2 in emotion_you_like_that[loop.index0]['pos_emot'] %}
<p></p> <li>
{% endif %} <div class="emot"><strong class="alert alert-success" role="alert"
{% if emotion_you_like_that[loop.index0]['nig_emot'] != None %} style="border-radius: 22px;">{{item2}}</strong></div>
<div class="nig_emot"> </li>
<details> {% endfor %}
<summary class="emot_block"> </ul>
<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 %} {% endif %}
</a> </li>
{% if emotion_you_like_that[loop.index0]['like'] != None %} <li class="list-group-item">
<p style="color:#ffffff">{{emotion_you_like_that[loop.index0]['like']}}</p> {% if emotion_you_like_that[loop.index0]['nig_emot'] != None %}
{% endif %} <ul style="list-style-type: none; margin-left:-15%; margin-top:5%">
</div> {% for item2 in emotion_you_like_that[loop.index0]['nig_emot'] %}
{% endif %} <li>
{% if emotion_you_like_that[loop.index0]['link'] != None %} <div class="emot"><strong class="alert alert-danger" role="alert"
<details> style="border-radius: 22px;">{{item2}}</strong></div>
<summary class="emot_block"> </li>
<strong class="emot_block">Ссылки</strong> {% endfor %}
</summary> </ul>
<p></p> {% endif %}
{% for item2 in emotion_you_like_that[loop.index0]['link'] %} </li>
<div class="link"> <li class="list-group-item">
<a class="alert alert-light" role="alert" href="{{ item2 }}" style="border-radius: 22px;">Ссылка {% if emotion_you_like_that[loop.index0]['link'] != None %}
{{ loop.index }}</a> <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_btn">
Изменить
</a>
<a style="border-radius: 15px; margin-top:10%" href="/post_deleted/{{ item.id }}" class="btn btn-danger">
Удалить
</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> </div>
<strong style="color:#ffffff">{{item.date}}</strong> {% endfor %}
</div> </div>
{% 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">
<p class="hz1">Ничего не нашлось :с</p> <p class="hz1">Ничего не нашлось :с</p>
</div> </div>
{% endif %} {% endif %}
</div> </div>
</th> </td>
</table> </table>
{% endblock %} {% endblock %}

View File

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