From 5a82a4753213476d7f683d03394a465377b897cb Mon Sep 17 00:00:00 2001 From: mrmur Date: Wed, 27 Apr 2022 22:15:58 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=A2=D0=9A=D0=90=D0=A2=20=D0=9A=D0=9E?= =?UTF-8?q?=D0=9C=D0=9C=D0=98=D0=A2=D0=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/moona_data.db | Bin 86016 -> 86016 bytes main.py | 101 ++++++++++-------- static/css/diary.css | 35 +++--- templates/diary.html | 249 ++++++++++++++++++++++--------------------- templates/main.html | 6 +- 5 files changed, 208 insertions(+), 183 deletions(-) diff --git a/db/moona_data.db b/db/moona_data.db index dd37cb78c0e489cc1eeb67c590850ced83b5bf1b..c4061c0a2ae605a78a1e2394fda470539629f25f 100644 GIT binary patch delta 83 zcmV-Z0IdIjpap=S1&|v7xRD$~1-Jk%Pkgatp+6A;0RRc@4-^c^3^D-$1xo{3k%6}a p3%&$?lhHsh3y4Pr3;-*SO#wjwv)Dim1d{W7Q4-^c^3^D-C1xo{3k%6}a dh

Публикации

-
+
{% if my_post != [] %} {% for item in pub_post %} - -
+
{% if item.photo != None %} ... {% endif %} -
- {% if item.name != None %} -

{{item.name}}

- {% endif %} -

{{item.date}}

- {% if item.text != None %} -

{{item.text}}

- {% endif %} -
-
    -
  • - {% if emotion_pub[loop.index0]['pos_emot'] != None %} -
      - {% for item2 in emotion[loop.index0]['pos_emot'] %} -
    • -
      {{item2}}
      -
    • - {% endfor %} -
    - {% endif %} -
  • -
  • +
    + {% if item.name != None %} +

    {{item.name}}

    + {% endif %} +

    {{item.date}}

    + {% if item.text != None %} +

    {{item.text}}

    + {% endif %} +
    +
      + {% if emotion_pub[loop.index0]['pos_emot'] != None %} +
    • +
        + {% for item2 in emotion_pub[loop.index0]['pos_emot'] %} +
      • +
        {{item2}}
        +
      • + {% endfor %} +
      +
    • + {% endif %} {% if emotion_pub[loop.index0]['nig_emot'] != None %} -
        +
      • +
          {% for item2 in emotion_pub[loop.index0]['nig_emot'] %}
        • {{item2}}
        • {% endfor %} -
        +
      + {% endif %} - -
    • {% if emotion_pub[loop.index0]['link'] != None %} - +
    • {% endif %} - -
    -
    - {% if item.public == 1 or item.public == 'True' %} - - {% else %} - - {% endif %} -
    - {{ current_user.name }} -
    -
+
{% endfor %} @@ -121,26 +126,26 @@
-

Мои мысли

-
+

Мои мысли

+
{% if my_post != [] %} {% for item in my_post %} -
+
{% if item.photo != None %} ... {% endif %} -
- {% if item.name != None %} -

{{item.name}}

- {% endif %} -

{{item.date}}

- {% if item.text != None %} -

{{item.text}}

- {% endif %} -
-
    -
  • - {% if emotion_pub[loop.index0]['pos_emot'] != None %} +
    + {% if item.name != None %} +

    {{item.name}}

    + {% endif %} +

    {{item.date}}

    + {% if item.text != None %} +

    {{item.text}}

    + {% endif %} +
    +
      + {% if emotion[loop.index0]['pos_emot'] != None %} +
      • {% for item2 in emotion[loop.index0]['pos_emot'] %}
      • @@ -149,54 +154,60 @@
      • {% endfor %}
      +
    • {% endif %} - -
    • - {% if emotion_pub[loop.index0]['nig_emot'] != None %} -
        - {% for item2 in emotion_pub[loop.index0]['nig_emot'] %} + {% if emotion[loop.index0]['nig_emot'] != None %} +
      • +
          + {% for item2 in emotion[loop.index0]['nig_emot'] %}
        • {{item2}}
        • {% endfor %} -
        +
      +
    • {% endif %} - -
    • - {% if emotion_pub[loop.index0]['link'] != None %} -
        - {% for item2 in emotion_pub[loop.index0]['link'] %} + {% if emotion[loop.index0]['link'] != None %} +
      • + +
      +
    • {% endif %} - -
    -
    - {% if item.public == 1 or item.public == 'True' %} - - {% else %} - - {% endif %} -
    - {{ current_user.name }} -
    -
+
+ {% if item.public == 1 or item.public == 'True' %} + + {% else %} + + {% endif %} +
+ {{ current_user.name }} +
+
{% endfor %} diff --git a/templates/main.html b/templates/main.html index aaa9bd8..bf6693e 100644 --- a/templates/main.html +++ b/templates/main.html @@ -17,6 +17,7 @@
+ {% if current_user.is_authenticated %}

Вопросы дня

@@ -38,6 +39,9 @@ {% endfor %}
+ {% else %} +

Чтобы увидеть вопросы дня войдите в аккаунт

+ {% endif %}
@@ -225,7 +229,7 @@ {% endif %}