From 237dbd031be049d91725ce57d0db8f04a1324cca Mon Sep 17 00:00:00 2001 From: Dinosaur <78600651+Darya-Tolmeneva@users.noreply.github.com> Date: Mon, 11 Apr 2022 20:53:22 +0500 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=B2?= =?UTF-8?q?=20=D0=B2=D0=B5=D1=80=D1=81=D1=82=D0=BA=D0=B5,=20=D0=B4=D0=BE?= =?UTF-8?q?=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B0=20=D1=81=D1=82=D1=80?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=86=D0=B0=20"=D0=9E=20=D0=BD=D0=B0=D1=81"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/moona_data.db | Bin 73728 -> 73728 bytes main.py | 14 ++---- static/css/about.css | 0 static/css/diary.css | 102 +++++++++++++++++++++++++--------------- static/css/question.css | 12 ++--- templates/about.html | 6 +++ templates/base.html | 2 +- templates/diary.html | 37 +++++---------- 8 files changed, 92 insertions(+), 81 deletions(-) create mode 100644 static/css/about.css create mode 100644 templates/about.html diff --git a/db/moona_data.db b/db/moona_data.db index 182048c0c8a1d0e628dbdc1da5638a06c9f80eb7..c8dba0abc0e2d514fbe829451b11f8b6ccffce9f 100644 GIT binary patch delta 224 zcmZoTz|wGlWr8$g=R_H2#?FliOYHerxjPy7GI?uxPVyLWcW!L_$Ff<#wUW)HQH_FYLJ34rFh>u#d^ez{p6~z(g0Q#?Z{l z$kNKtLeJ3D+}zw?^7;P?u9#;nqy1KP3!D1gjWxUdOmxslJ6!)%)v_;2!W+AOHBjGtGPiH(6#l+%$3sCL8j{ql^C E0H05Iod5s; diff --git a/main.py b/main.py index bee0d4a..6e68393 100644 --- a/main.py +++ b/main.py @@ -418,15 +418,6 @@ def recovery(): if finish.validate_on_submit(): db_sess = db_session.create_session() user = db_sess.query(User).filter(User.email == user_email).first() - # user2 = User( - # name=user.name, - # surname=user.surname, - # login=user.login, - # age=user.age, - # about=user.about, - # email=user_email, - # photo=user.photo, - # role='user') user.set_password(finish.password.data) user2 = session.merge(user) session.add(user2) @@ -436,6 +427,11 @@ def recovery(): return render_template('recovery.html', title='Восстановление пароля', form=form, message='', s='1') +@app.route('/about_us') +def about(): + return render_template('about.html', title='О нас') + + def main(): db_session.global_init("db/moona_data.db") app.run() diff --git a/static/css/about.css b/static/css/about.css new file mode 100644 index 0000000..e69de29 diff --git a/static/css/diary.css b/static/css/diary.css index 1ec82ec..e12018d 100644 --- a/static/css/diary.css +++ b/static/css/diary.css @@ -1,52 +1,76 @@ .bad_user { -margin-left: auto; + 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; + 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; +} +summary { + margin-bottom: 10px; +} +.pos_emot { + margin-bottom: 10px; +} +.nig_emot { + margin-bottom: 10px; +} +.my_author { + 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; +} +.emot { + margin-bottom: 30px; } #image { -width: 70%; + width: 70%; } #all_my_post, #all_my_post1 { -margin-left: auto; + margin-left: auto; margin-right: auto; } #my_post, #my_post1 { -text-align: center; -margin-left: auto; + text-align: center; + margin-left: auto; margin-right: auto; margin-top: 25px; background-color: #7fc3ff; border-radius: 22px; } .my_author, .my_post_zag { -text-align: center; -margin-left: auto; + text-align: center; + margin-left: auto; margin-right: auto; margin-top: 25px; } .pub, .private { -width: 60%; -height: 10%; -margin-left: auto; + width: 60%; + height: 10%; + margin-left: auto; margin-right: auto; } #add_post { -margin-top: 20px; -margin-left: 85%; + margin-top: 20px; + margin-left: 85%; } #edit_btn, #edit_btn1 { -background-color: #c5f1ff; + background-color: #c5f1ff; } input[type=text], input[type=email], input[type=password], input[type=file], input[type=number]{ padding:10px; @@ -73,32 +97,32 @@ textarea { margin-left: 20px; } #row2, #row1 { -width: 30%; + width: 30%; } #row1, #row2, #all_my_question { -display:inline-block; -vertical-align: top; + display:inline-block; + vertical-align: top; } #all_my_question { -width: 30%; -height: -100%; + width: 30%; + height: -100%; } .question, .my_post { -background-color:#7fc3ff; -border-radius: 22px; -width: 90%; -margin-left: 10px; + background-color:#7fc3ff; + border-radius: 22px; + width: 90%; + margin-left: 10px; } .is_ans { -background-color:#ddefff; -border:2px solid #FFFFFF; -border-radius: 25px; + background-color:#ddefff; + border:2px solid #ffffff; + border-radius: 25px; } .emot_block { -color: #ffffff; -font-weight: bolder; + color: #ffffff; + font-weight: bolder; } table { -margin-left: 5%; -width: 90%; + margin-left: 5%; + width: 90%; } \ No newline at end of file diff --git a/static/css/question.css b/static/css/question.css index db84ce8..419a5ce 100644 --- a/static/css/question.css +++ b/static/css/question.css @@ -1,16 +1,16 @@ .all_div { -margin-left: auto; + margin-left: auto; margin-right: auto; width: 50%; -.add_q{ - width: 50%; } +.add_q { + width: 50%; } .h_q { -text-align: center; + text-align: center; } form { -width: 60%; -margin-left: auto; + width: 60%; + margin-left: auto; margin-right: auto; } \ No newline at end of file diff --git a/templates/about.html b/templates/about.html new file mode 100644 index 0000000..5c3c6b1 --- /dev/null +++ b/templates/about.html @@ -0,0 +1,6 @@ + +{% extends "base.html" %} + +{% block content %} + +{% endblock %} \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 572d0ae..8ac15a4 100644 --- a/templates/base.html +++ b/templates/base.html @@ -34,7 +34,7 @@ diff --git a/templates/diary.html b/templates/diary.html index 15a7d01..a32d115 100644 --- a/templates/diary.html +++ b/templates/diary.html @@ -31,13 +31,11 @@ Позитивные эмоции -

{% for item2 in emotion_pub[loop.index0]['pos_emot'] %} {{item2}} {% endfor %} -

{% endif %} {% if emotion_pub[loop.index0]['nig_emot'] != None %}
@@ -51,31 +49,25 @@ {% endfor %}
-

{% endif %} {% if item.photo != None %} -

-

{% endif %} {% if emotion_pub[loop.index0]['link'] != None %}
Ссылки -

{% for item2 in emotion_pub[loop.index0]['link'] %} -

{% endfor %}
-

{% endif %} {% if item.public == 1 or item.public == 'True' %} {% endif %} -
+
{{ current_user.name }}
{{item.date}} @@ -130,13 +120,13 @@ Позитивные эмоции -

- {% for item2 in emotion[loop.index0]['pos_emot'] %} - {{item2}} - {% endfor %} +
    + {% for item2 in emotion[loop.index0]['pos_emot'] %} +
  • {{item2}}
  • + {% endfor %} +
-

{% endif %} {% if emotion[loop.index0]['nig_emot'] != None %}
@@ -144,37 +134,32 @@ Негативные эмоции -

- {% for item2 in emotion[loop.index0]['nig_emot'] %} - {{item2}} - {% endfor %} +
    + {% for item2 in emotion[loop.index0]['nig_emot'] %} +
  • {{item2}}
  • + {% endfor %} +
-

{% endif %} {% if item.photo != None %} -

-

{% endif %} {% if emotion[loop.index0]['link'] != None %}
Ссылки -

{% for item2 in emotion[loop.index0]['link'] %} -

{% endfor %}
-

{% endif %} {% if item.public == 1 or item.public == 'True' %}