diff --git a/db/moona_data.db b/db/moona_data.db index c2f3932..0b6bb7a 100644 Binary files a/db/moona_data.db and b/db/moona_data.db differ diff --git a/static/css/diary.css b/static/css/diary.css index 75bdca2..7d1804c 100644 --- a/static/css/diary.css +++ b/static/css/diary.css @@ -123,10 +123,12 @@ textarea { } table { margin-left: 5%; - width: 90%; } .like { width: 50%; margin-left: auto; margin-right: auto; +} +#row1_div, #row2_div, #row3_div { +width: 90%; } \ No newline at end of file diff --git a/static/css/publications.css b/static/css/publications.css index 7eca729..f70d347 100644 --- a/static/css/publications.css +++ b/static/css/publications.css @@ -1,10 +1,15 @@ table { -width: 90%; margin-left: auto; margin-right: auto; } #row1, #row2, #row3 { -width: 30%; +width: 32%; +display:inline-block; + vertical-align: top; + margin-top: 39px; +} +#row1_div, #row2_div, #row3_div { +width: 90%; } .post_zag, .card-text, .card-body, .post_zag, .author { width: 90%; @@ -21,4 +26,8 @@ margin-bottom: 20px; } details { color: #ffffff; +} +#add_post { + margin-top: 20px; + margin-left: 83%; } \ No newline at end of file diff --git a/templates/diary.html b/templates/diary.html index 300d878..d7b3b6e 100644 --- a/templates/diary.html +++ b/templates/diary.html @@ -11,227 +11,235 @@ diff --git a/templates/publications.html b/templates/publications.html index e172659..6ad70eb 100644 --- a/templates/publications.html +++ b/templates/publications.html @@ -2,203 +2,223 @@ {% extends "base.html" %} {% block content %} +{% if current_user.is_authenticated %} + +
+ Добавить + запись +
+{% endif %}
-

Публикации

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

{{item.name}}

+
+

Публикации

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

{{item.name}}

+ {% endif %} +
+ {% if item.text != None %} + {{item.text}} {% endif %} -
- {% 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 item.photo != None %} -
- -
- {% endif %} - {% if emotion_pub[loop.index0]['link'] != None %} -
- - Ссылки - - {% for item2 in emotion_pub[loop.index0]['link'] %} -
- {% endif %} - {% if item.public == 1 or item.public == 'True' %} - - {% else %} - - {% endif %} - -
- {{ current_user.name }} -
- {{item.date}} -
- - Изменить - - - Удалить - + {% endfor %} + {% else %} +
+

Ничего не нашлось :с

+ {% endif %}
- {% endfor %} - {% else %} -
-

Ничего не нашлось :с

-
- {% endif %}
-

Мои мысли

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

{{item.name}}

+
+

Мои мысли

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

{{item.name}}

+ {% endif %} +
+ {% if item.text != None %} + {{item.text}} {% endif %} -
- {% if item.text != None %} - {{item.text}} - {% endif %} -
- {% if emotion[loop.index0]['pos_emot'] != None %} -
-
- - Позитивные эмоции - -
    - {% for item2 in emotion[loop.index0]['pos_emot'] %} -
  • -
    {{item2}}
    -
  • - {% endfor %} -
-
- {% endif %} - {% if emotion[loop.index0]['nig_emot'] != None %} -
-
- - Негативные эмоции - -
    - {% 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'] %} -
- {% endif %} - {% if item.public == 1 or item.public == 'True' %} - + {% endfor %} {% else %} - - {% endfor %} - {% else %} -
-

Ничего не нашлось :с

-
- {% endif %}
-

Вопросы дня

-
-
+ -
-

Популярное

-
- {% if pop_post != [] %} - {% for item in pop_post %} -
-
- - {% if item.name != None %} -

{{item.name}}

- {% endif %} -
- {% if item.text != None %} - {{item.text}} - {% endif %} -
- {% if emotion_pop[loop.index0]['pos_emot'] != None %} -
+
+

Популярное

+
+ {% if pop_post != [] %} + {% for item in pop_post %} +
- - Позитивные эмоции + + {% if item.name != None %} +

{{item.name}}

+ {% endif %}
-

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

- {% endif %} - {% if emotion_pop[loop.index0]['nig_emot'] != None %} -
-
- - Негативные эмоции - -

- {% for item2 in emotion_pop[loop.index0]['nig_emot'] %} - {{item2}} - {% endfor %} -
-
-

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

-
- -
-

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

- {% for item2 in emotion_pop[loop.index0]['link'] %} -
+ {% if emotion_pop[loop.index0]['pos_emot'] != None %} +
+
+ + Позитивные эмоции + +

+ {% for item2 in emotion_pop[loop.index0]['pos_emot'] %} + {{item2}} + {% endfor %} +

- {% endfor %} - - {% endif %} -
+
+ + Негативные эмоции + +

+ {% for item2 in emotion_pop[loop.index0]['nig_emot'] %} + {{item2}} + {% endfor %} +
+
+

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

+
+ +
+

+ {% endif %} + {% if current_user.is_authenticated %} + + {% endif %} + {% if emotion_pop[loop.index0]['link'] != None %} +
+ + Ссылки + +

+ {% for item2 in emotion_pop[loop.index0]['link'] %} + +

+ {% endfor %} +
+ {% endif %} +
- {{ emotion_pop[loop.index0]['author'].name }} + {{ emotion_pop[loop.index0]['author'].name }} +
+ {{item.date}}
- {{item.date}} + {% endfor %}
- {% endfor %} + {% else %} +
+

Ничего не нашлось :с

+
+ {% endif %}
- {% else %} -
-

Ничего не нашлось :с

-
- {% endif %}
-

Свежее

-
- {% if fresh_post != [] %} - {% for item in fresh_post %} -
-
- - {% if item.name != None %} -

{{item.name}}

- {% endif %} -
- {% if item.text != None %} - {{item.text}} - {% endif %} -
- {% if emotion_fresh[loop.index0]['pos_emot'] != None %} -
+
+

Свежее

+
+ {% if fresh_post != [] %} + {% for item in fresh_post %} +
- - Позитивные эмоции + + {% if item.name != None %} +

{{item.name}}

+ {% endif %}
-

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

- {% endif %} - {% if emotion_fresh[loop.index0]['nig_emot'] != None %} -
-
- - Негативные эмоции - -

- {% for item2 in emotion_fresh[loop.index0]['nig_emot'] %} - {{item2}} - {% endfor %} -
-
-

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

-
- -
-

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

- {% for item2 in emotion_fresh[loop.index0]['link'] %} -
+ {% if emotion_fresh[loop.index0]['pos_emot'] != None %} +
+
+ + Позитивные эмоции + +

+ {% for item2 in emotion_fresh[loop.index0]['pos_emot'] %} + {{item2}} + {% endfor %} +

- {% endfor %} - - {% endif %} -
+
+ + Негативные эмоции + +

+ {% for item2 in emotion_fresh[loop.index0]['nig_emot'] %} + {{item2}} + {% endfor %} +
+
+

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

+
+ +
+

+ {% endif %} + {% if current_user.is_authenticated %} + + {% endif %} + {% if emotion_fresh[loop.index0]['link'] != None %} +
+ + Ссылки + +

+ {% for item2 in emotion_fresh[loop.index0]['link'] %} + +

+ {% endfor %} +
+ {% endif %} +
- {{ emotion_fresh[loop.index0]['author'].name }} + {{ emotion_fresh[loop.index0]['author'].name }} +
+ {{item.date}}
- {{item.date}} + {% endfor %}
- {% endfor %} + {% else %} +
+

Ничего не нашлось :с

+
+ {% endif %} +
+
+
+

Для вас

- {% else %} -
-

Ничего не нашлось :с

-
- {% endif %}
{% endblock %} \ No newline at end of file