Moona/templates/diary.html

73 lines
3.2 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/diary.css">
{% extends "base.html" %}
{% block content %}
{% if current_user.is_authenticated %}
<div>
<a href="/add_post" id="add_post" class="btn btn-primary" style="background-color:#1daff0"><strong>Добавить
запись</strong></a>
</div><h1 class="my_post_zag">Мои записи</h1>
<div class="card" style="width: 18rem;" id="all_my_post">
{% for item in post %}
<div class="card-body" id="my_post">
<h2 class="card-title" id="my_post_zag" style="color:#c5f1ff">{{item.name}}</h2>
<strong class="card-text" id="my_text" style="color:#ffffff">{{item.text}}</strong>
{% if item.pos_emot != None %}
<div class="pos_emot">
{% for item2 in item.pos_emot %}
<strong>{{item2}}</strong>
{% endfor %}
</div>
{% endif %}
{% if item.nig_emot != None %}
<div class="nig_emot">
{% for item2 in item.nig_emot %}
<strong>{{item2}}</strong>
{% endfor %}
</div>
{% endif %}
{% if item.case != None %}
<div class="case">
{% for item2 in item.case %}
<strong>{{item2}}</strong>
{% endfor %}
</div>
{% endif %}
{% if item.photo != None %}
<div class="photo">
<img width="100" height="100" src="{{ item.photo }}">
</div>
{% endif %}
{% if item.link != None %}
{% for item2 in item.link %}
<div class="link">
<a href="{{ item2 }}">Ссылка {{ loop.index }}</a>
</div>
{% endfor %}
{% endif %}
{% if item.public == 1 or item.public == 'True' %}
<div class="alert alert-success" role="alert" id="pub">Запись опубликована {{item.public}}</div>
{% else %}
<div class="alert alert-danger" role="alert" id="ptivate">Запись приватная</div>
{% endif %}
<div class="my_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="../{{ current_user.photo }}" width="40" height="40" style="border-radius: 50%">
<strong style="color: #ffffff">{{ current_user.name }}</strong>
</div>
<strong style="color:#ffffff">{{item.date}}</strong>
</div>
{% endfor %}
</div>
{% else %}
<div class="bad_user">
<div class="bad_centre">
<h1 id="hz1">Вы не авторизованы в системе</h1>
<h2 id="hz2">Поэтому вам не доступна страница личного дневника</h2><strong id="sz1">Но вы можете посмотреть
публикации других пользователей в разделе <a href="/" style="color:#a9e4ff">Главная</a> или <a
href="/publications" style="color:#a9e4ff">Публикации</a></strong>
<p></p>
<img id="image" src="../static/img/Надпись Moona без фона.png"></div>
</div>
{% endif %}
{% endblock %}