Улучшен визуал страниц, начата страница "о нас"

This commit is contained in:
mrmur 2022-04-20 18:50:08 +05:00
parent 81bab42a86
commit 5a367a5df4
12 changed files with 173 additions and 94 deletions

Binary file not shown.

10
main.py
View File

@ -209,7 +209,7 @@ def publications():
if session.query(Like).filter(Like.post == i.id, Like.user == current_user.id).first():
emotion['is_like'] = 1
emotion_for_you.append(emotion)
return render_template('publications.html', fresh_post=fresh_posts, emotion_fresh=emotion_fresh, title='moona',
return render_template('publications.html', fresh_post=fresh_posts, emotion_fresh=emotion_fresh, title='Публикации',
pop_post=pop_post, emotion_pop=emotion_pop, for_you_post=for_you_post,
emotion_for_you=emotion_for_you)
@ -453,7 +453,7 @@ def diary():
lis_emotion = None
emotion_pub = None
pub_post = None
return render_template('diary.html', title='moona', my_post=posts, message='', question=post_quest,
return render_template('diary.html', title='Дневник', my_post=posts, message='', question=post_quest,
ans=ans2, emotion=lis_emotion, emotion_pub=emotion_pub, pub_post=pub_post)
@ -590,10 +590,12 @@ def recovery():
def about():
return render_template('about.html', title='О нас')
@app.route('/profil')
def profil():
@app.route('/profile')
def profile():
return render_template('profil.html', title='Профиль')
def main():
db_session.global_init("db/moona_data.db")
app.run()

View File

@ -0,0 +1,34 @@
.obout_block {
width: 80%;
margin-left: 10%;
margin-right: 10%;
background-color:#7fc3ff;
border-radius: 22px;
}
.about_text {
width: 90%;
text-align: justify;
margin-left: 5%;
margin-right: 5%;
color: #ffffff;
font: bold;
}
#moona_img {
width: 90%;
margin-left: 5%;
border-radius: 55px;
}
.contact {
width: 80%;
margin-left: 10%;
margin-right: 10%;
background-color: #58cdf5;
margin-top: 20px;
border-radius: 25px;
}
.contact_content {
width: 80%;
margin-left: 10%;
margin-right: 10%;
color: #ffffff;
}

View File

@ -4,3 +4,9 @@
body {
font-family: 'Comfortaa', cursive;
}
.upp_zag {
margin-left: auto;
margin-right: auto;
text-align: center;
margin-top: 50px;
}

View File

@ -66,7 +66,7 @@ summary {
}
#add_post {
margin-top: 20px;
margin-left: 85%;
margin-left: 83%;
}
#edit_btn, #edit_btn1 {
background-color: #c5f1ff;

View File

@ -4,7 +4,9 @@
width: 50%;
}
.add_q {
width: 50%;
width: 80%;
margin-left: 10%;
margin-right: auto;
}
.h_q {
text-align: center;
@ -13,4 +15,8 @@ form {
width: 60%;
margin-left: auto;
margin-right: auto;
}
.btn_sm {
text-align: center;
border-radius: 25px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 KiB

View File

@ -2,5 +2,36 @@
{% extends "base.html" %}
{% block content %}
<div>
<h1 class="upp_zag">Контакты</h1>
<div class="contact">
<div class="contact_content">
<strong>Вы можете связаться с нами:</strong>
<p>По этой <a href="mailto:andreiduvakin@mail.ru">andreiduvakin@mail.ru</a>
<wbr>
или этой электронной почте <a href="mailto:moonadiary@yandex.ru">moonadiary@yandex.ru</a></p>
<p>Также вы можете написать нам в VK: <a href="https://vk.com/s_plombir19">Дарья</a>
<wbr>и
<a href="https://vk.com/andreiduvakin">Андрей</a></p>
</div>
</div>
<h1 class="upp_zag">О нас</h1>
<div class="obout_block">
<h4 class="about_text">
В наше время существует много личных дневников
для телефонов или планшетов, где вы можете изложить свои мысли, эмоции, посмотреть статистику,
но мы решили пойти дальше, как непосредственные пользователи таких дневников мы решили, что было бы
круто если бы можно было поделится частью своих мыслей, проблем, переживаний или побед.
<wbr>
moona - это такой-же личный дневник, как и остальные, но у нас есть кое, что особенное. Здесь вы можете
опубликовать свои записи для других пользователей, поделится своими переживаниями или личными свершениями.
Здесь вас всегда поймут и поддержат.
<wbr>
Мы не являемся психологами и не оказываем услуг, мы вообще не коммерческая организация, moona - это проект
созданный друзьями, которые верят в то, что мир можно сделать лучше, если каждый человек сможет получить
поддержку :з
</h4>
<img src="..\static\img\НадписьMoona.png" id="moona_img">
</div>
</div>
{% endblock %}

View File

@ -25,7 +25,7 @@
</div>
{% endfor %}
</p>
<p>{{ form.submit(type="submit", class="btn btn-primary") }}</p>
<p class="btn_sm">{{ form.submit(type="submit", class="btn btn-primary btn_sm") }}</p>
{% if message != '' %}
<div class="alert alert-danger" role="alert">{{ message }}</div>
{% endif %}

View File

@ -22,6 +22,7 @@
}
</style>
<link href="sidebars.css" rel="stylesheet">
<link href="../static/css/base.css">
@ -105,11 +106,10 @@
</li>
<li>
{% if current_user.is_authenticated %}
<a href="/profil" class="nav-link py-3 border-bottom" title="Профиль" data-bs-toggle="tooltip"
<a href="/profile" class="nav-link py-3 border-bottom" title="Профиль" data-bs-toggle="tooltip"
data-bs-placement="right">
<svg class="bi" width="24" height="24" role="img" aria-label="Профиль">
<use xlink:href="#profil"/>
</svg>
<img src="../{{ current_user.photo }}" width="35" height="35"
style="border-radius: 50%;">
</a>
{% else %}
<a href="/login" class="nav-link py-3 border-bottom" title="Профиль" data-bs-toggle="tooltip"

View File

@ -3,7 +3,7 @@
{% block content %}
{% if current_user.is_authenticated %}
<h1 class="upp_zag">Дневник</h1>
<div>
<a href="/add_post" id="add_post" class="btn btn-primary"
style="background-color:#1daff0;border-radius: 15px;"><strong>Добавить

View File

@ -3,7 +3,7 @@
{% block content %}
{% if current_user.is_authenticated %}
<h1 class="upp_zag">Публикации</h1>
<div>
<a href="/add_post" id="add_post" class="btn btn-primary"
style="background-color:#1daff0;border-radius: 15px;"><strong>Добавить
@ -220,100 +220,100 @@
<h1 class="post_zag">Для вас</h1>
{% if for_me_post != [] %}
{% for item in for_you_post %}
<div class="card-body post">
<details>
<summary>
{% if item.name != None %}
<h2 class="card-title post_zag" style="color:#c5f1ff">{{item.name}}</h2>
{% endif %}
</summary>
{% if item.text != None %}
<strong class="card-text" style="color:#ffffff">{{item.text}}</strong>
<div class="card-body post">
<details>
<summary>
{% if item.name != None %}
<h2 class="card-title post_zag" style="color:#c5f1ff">{{item.name}}</h2>
{% endif %}
</details>
{% if emotion_for_you[loop.index0]['pos_emot'] != None %}
<div class="pos_emot">
<details>
<summary class="emot_block">
<strong class="emot_block">Позитивные эмоции</strong>
</summary>
<p></p>
{% for item2 in emotion_for_you[loop.index0]['pos_emot'] %}
<strong class="alert alert-success" role="alert"
style="border-radius: 22px;">{{item2}}</strong>
{% endfor %}
</details>
</div>
<p></p>
</summary>
{% if item.text != None %}
<strong class="card-text" style="color:#ffffff">{{item.text}}</strong>
{% endif %}
{% if emotion_for_you[loop.index0]['nig_emot'] != None %}
<div class="nig_emot">
<details>
<summary class="emot_block">
<strong class="emot_block">Негативные эмоции</strong>
</summary>
<p></p>
{% for item2 in emotion_for_you[loop.index0]['nig_emot'] %}
<strong class="alert alert-danger" role="alert"
style="border-radius: 22px;">{{item2}}</strong>
{% endfor %}
</details>
</div>
<p></p>
{% endif %}
{% if item.photo != None %}
<p></p>
<div class="photo">
<img width="90%" src="{{ item.photo }}"
style="border-radius: 22px;">
</div>
<p></p>
{% endif %}
{% if current_user.is_authenticated %}
<div class="like">
<a type="button"
href="/new_like/{{current_user.id}}/{{item.id}}/publications">
{% if emotion_for_you[loop.index0]['is_like'] %}
<img src="../static/img/like_add.png" width="117" height="100">
{% else %}
<img src="../static/img/like.png" width="94" height="80">
{% endif %}
</a>
{% if emotion_for_you[loop.index0]['like'] != None %}
<p style="color:#ffffff">{{emotion_for_you[loop.index0]['like']}}</p>
{% endif %}
</div>
{% endif %}
{% if emotion_for_you[loop.index0]['link'] != None %}
</details>
{% if emotion_for_you[loop.index0]['pos_emot'] != None %}
<div class="pos_emot">
<details>
<summary class="emot_block">
<strong class="emot_block">Ссылки</strong>
<strong class="emot_block">Позитивные эмоции</strong>
</summary>
<p></p>
{% for item2 in emotion_for_you[loop.index0]['link'] %}
<div class="link">
<a class="alert alert-light" role="alert" href="{{ item2 }}" style="border-radius: 22px;">Ссылка
{{ loop.index }}</a>
</div>
<p></p>
{% for item2 in emotion_for_you[loop.index0]['pos_emot'] %}
<strong class="alert alert-success" role="alert"
style="border-radius: 22px;">{{item2}}</strong>
{% endfor %}
</details>
</div>
<p></p>
{% endif %}
{% if emotion_for_you[loop.index0]['nig_emot'] != None %}
<div class="nig_emot">
<details>
<summary class="emot_block">
<strong class="emot_block">Негативные эмоции</strong>
</summary>
<p></p>
{% for item2 in emotion_for_you[loop.index0]['nig_emot'] %}
<strong class="alert alert-danger" role="alert"
style="border-radius: 22px;">{{item2}}</strong>
{% endfor %}
</details>
</div>
<p></p>
{% endif %}
{% if item.photo != None %}
<p></p>
<div class="photo">
<img width="90%" src="{{ item.photo }}"
style="border-radius: 22px;">
</div>
<p></p>
{% endif %}
{% if current_user.is_authenticated %}
<div class="like">
<a type="button"
href="/new_like/{{current_user.id}}/{{item.id}}/publications">
{% if emotion_for_you[loop.index0]['is_like'] %}
<img src="../static/img/like_add.png" width="117" height="100">
{% else %}
<img src="../static/img/like.png" width="94" height="80">
{% endif %}
</a>
{% if emotion_for_you[loop.index0]['like'] != None %}
<p style="color:#ffffff">{{emotion_for_you[loop.index0]['like']}}</p>
{% endif %}
<div class="author" style="style=position:absolute; width:148px; height:44px; left:255px; -webkit-border-radius:
</div>
{% endif %}
{% if emotion_for_you[loop.index0]['link'] != None %}
<details>
<summary class="emot_block">
<strong class="emot_block">Ссылки</strong>
</summary>
<p></p>
{% for item2 in emotion_for_you[loop.index0]['link'] %}
<div class="link">
<a class="alert alert-light" role="alert" href="{{ item2 }}" style="border-radius: 22px;">Ссылка
{{ loop.index }}</a>
</div>
<p></p>
{% endfor %}
</details>
{% endif %}
<div class="author" style="style=position:absolute; width:148px; height:44px; left:255px; -webkit-border-radius:
22px;-moz-border-radius: 22px;border-radius: 22px; border:2px solid #FFFFFF; background-color:#1daff0; top:
98px;"><img src="../{{ emotion_for_you[loop.index0]['author'].photo }}" width="40" height="40"
style="border-radius: 22px">
<strong style="color: #ffffff">{{ emotion_for_you[loop.index0]['author'].name }}</strong>
</div>
<strong style="color:#ffffff">{{item.date}}</strong>
<strong style="color: #ffffff">{{ emotion_for_you[loop.index0]['author'].name }}</strong>
</div>
{% endfor %}
<strong style="color:#ffffff">{{item.date}}</strong>
</div>
{% else %}
<div class="bad_centre" style="background-color:#1daff0; border-radius: 22px;color:#ffffff">
<h1 class="hz1">Ничего не нашлось :с</h1>
</div>
{% endif %}
{% endfor %}
</div>
{% else %}
<div class="bad_centre" style="background-color:#1daff0; border-radius: 22px;color:#ffffff">
<h1 class="hz1">Ничего не нашлось :с</h1>
</div>
{% endif %}
</div>
</td>
</table>