Moona/templates/profile.html

124 lines
5.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<link rel="stylesheet" href="../static/css/profile.css">
<link rel="stylesheet" href="../static/css/publications.css">
{% extends "base.html" %}
{% block content %}
<h1 align="center">Профиль</h1>
<div class="all_profile">
<div class="profile_header">
<table>
<th class="row_left">
{% if current_user.about %}
<h2>О себе:</h2>
<h5>
{{current_user.about}}
</h5>
{% endif %}
<div>
<a href="/edit_profile/{{current_user.login}}" type="submit" class="btn btn-primary"
style="background-color:#38aaff; border-radius: 15px; margin:5%; width:90%">Редактировать профиль</a>
<a style="border-radius: 15px; margin:5%; width:90%" href="/logout" class="btn btn-danger logout_btn">
Выйти
</a>
</div>
</th>
<th class="row_centre">
</th>
<th class="row_right">
<img src="../{{ current_user.photo }}" width="150" height="150" style="margin:1%" class="profile_header_photo_img">
<h1 class="profile_header_name">{{current_user.name}}</h1>
</th>
</table>
</div>
</div>
{% if message != '' %}
<div class="alert alert-danger" role="alert">{{ message }}</div>
{% endif %}
<div class="user_posts">
<h1 class="post_zag">Опубликованные посты</h1>
{% if pub_post != [] %}
{% for item in pub_post %}
<div class="card-body" id="my_post1">
<details>
<summary style="color:#ffffff">{% if item.name != None %}
<h2 class="card-title" id="my_post_zag1" style="color:#c5f1ff">{{item.name}}</h2>
{% endif %}
</summary>
{% if item.text != None %}
<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'] %}
<p class="alert alert-success" role="alert"
style="border-radius: 22px;">{{item2}}</p>
{% 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'] %}
<p class="alert alert-danger" role="alert"
style="border-radius: 22px;">{{item2}}</p>
{% endfor %}
</details>
</div>
{% endif %}
{% if item.photo != None %}
<div class="photo">
<img width="90%" src="{{ item.photo }}"
style="border-radius: 22px;">
</div>
{% endif %}
{% if emotion_pub[loop.index0]['link'] != None %}
<details>
<summary class="emot_block">
<strong class="emot_block">Ссылки</strong>
</summary>
{% for item2 in emotion_pub[loop.index0]['link'] %}
<div class="link">
<a class="alert alert-light" role="alert" href="{{ item2 }}" style="border-radius: 22px;">Ссылка
{{ loop.index }}</a>
</div>
{% endfor %}
</details>
{% endif %}
<div class="like">
<a type="button"
href="/new_like/{{current_user.id}}/{{item.id}}/diary">
{% if emotion_pub[loop.index0]['is_like'] %}
<img src="../static/img/like_add.png" width="117" height="100">
{% else %}
<img src="../static/img/like.png" width="94" height="80">
{% endif %}
</a>
{% if emotion_pub[loop.index0]['like'] != None %}
<p style="color:#ffffff">{{emotion_pub[loop.index0]['like']}}</p>
{% endif %}
</div>
<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>
{% endfor %}
{% else %}
<div class="bad_centre" style="background-color:#1daff0; border-radius: 22px;color:#ffffff">
<h1 class="hz1">Ничего не нашлось :с</h1>
</div>
{% endif %}
</div>
{% endblock %}