diff --git a/books/templates/books/create_update.html b/books/templates/books/create_update.html index d971bb5c..7bdab6c8 100644 --- a/books/templates/books/create_update.html +++ b/books/templates/books/create_update.html @@ -38,12 +38,6 @@ - {% comment %} - - - - - {% endcomment %} diff --git a/collection/templates/detail.html b/collection/templates/detail.html index 2616c572..c47d0e91 100644 --- a/collection/templates/detail.html +++ b/collection/templates/detail.html @@ -102,12 +102,6 @@ - {% comment %} - - - - - {% endcomment %} diff --git a/collection/templates/list.html b/collection/templates/list.html index e6f73166..1d364146 100644 --- a/collection/templates/list.html +++ b/collection/templates/list.html @@ -89,12 +89,6 @@ - {% comment %} - - - - - {% endcomment %} diff --git a/common/templates/partial/_sidebar.html b/common/templates/partial/_sidebar.html new file mode 100644 index 00000000..38daab26 --- /dev/null +++ b/common/templates/partial/_sidebar.html @@ -0,0 +1,182 @@ +{% load static %} +{% load i18n %} +{% load admin_url %} +{% load mastodon %} +{% load oauth_token %} +{% load truncate %} +{% load thumb %} +
+
+ +
+ +
+
+ + + + + +
+ {% if show_follow %} +
+
+ +
+
+ {% trans '关注的人' %} +
+ {% trans '更多' %} + +
+ +
+
+ {% trans '被他们关注' %} +
+ {% trans '更多' %} + +
+ +
+
+ {% trans '常用标签' %} +
+
+ {% if book_tags %} +
{% trans '书籍' %}
+ {% for v in book_tags %} + + {{ v }} + + {% endfor %} +
+ {% endif %} + + {% if movie_tags %} +
{% trans '电影和剧集' %}
+ {% for v in movie_tags %} + + {{ v }} + + {% endfor %} +
+ {% endif %} + + {% if music_tags %} +
{% trans '音乐' %}
+ {% for v in music_tags %} + + {{ v }} + + {% endfor %} +
+ {% endif %} + + {% if game_tags %} +
{% trans '游戏' %}
+ {% for v in game_tags %} + + {{ v }} + + {% endfor %} +
+ {% endif %} +
+
+ +
+ +
+ {% if request.user.is_staff and request.user == user%} +
+
{% trans '投诉信息' %}
+ 全部投诉 +
+ +
+
+ {% endif %} +
+
+ {% endif %} +
+
+ +{% if show_follow %} + + +{% if user == request.user %} + +{% else %} + +{% endif %} + + + +{% endif %} diff --git a/games/templates/games/create_update.html b/games/templates/games/create_update.html index 7779a0e3..3f56e82d 100644 --- a/games/templates/games/create_update.html +++ b/games/templates/games/create_update.html @@ -55,12 +55,6 @@ - {% comment %} - - - - - {% endcomment %} - - - - - - - - - -
-
- {% include "partial/_navbar.html" %} - -
-
-
-
-
- -
-
- {{ user.mastodon_username }} {{ list_title }} -
-
-
    - - {% for mark in marks %} - -
  • -
    - - - -
    -
    - - {% comment %} - - {% endcomment %} - - {% if mark.book.pub_year %} - {{ mark.book.pub_year }}{% trans '年' %} / - {% if mark.book.pub_month %} - {{ mark.book.pub_month }}{% trans '月' %} / - {% endif %} - {% endif %} - - {% if mark.book.author %} - {% trans '作者' %} - {% for author in mark.book.author %} - {{ author }}{% if not forloop.last %},{% endif %} - {% endfor %}/ - {% endif %} - - {% if mark.book.translator %} - {% trans '译者' %} - {% for translator in mark.book.translator %} - {{ translator }}{% if not forloop.last %},{% endif %} - {% endfor %}/ - {% endif %} - - {% if mark.book.orig_title %} -  {% trans '原名' %} - {{ mark.book.orig_title }} - {% endif %} - -

    - {{ mark.book.brief }} -

    -
    - {% for tag_dict in mark.book.tag_list %} - {% for k, v in tag_dict.items %} - {% if k == 'content' %} - - {{ v }} - - {% endif %} - {% endfor %} - {% endfor %} -
    -
    -
    -
    -
      -
    • - - {% if mark.rating %} - - {% endif %} - {% if mark.visibility > 0 %} - - - - {% endif %} - - {% trans '于' %} {{ mark.edited_time }} - {% if status == 'reviewed' %} - {% trans '评论' %}: {{ mark.title }} - {% else %} - {% trans '标记' %} - {% endif %} - - {% if mark.text %} -

      {{ mark.text }}

      - {% endif %} -
    • -
    -
    -
    - -
  • - {% empty %} -
    {% trans '无结果' %}
    - {% endfor %} - - - -
-
- -
-
- -
-
- -
- -
-
- - - - - -
-
-
- -
-
- {% trans '关注的人' %} -
- {% trans '更多' %} - -
- -
-
- {% trans '被他们关注' %} -
- {% trans '更多' %} - -
- -
-
-
- -
-
-
-
- {% include "partial/_footer.html" %} -
- - - - - - {% if user == request.user %} - - {% else %} - - {% endif %} - - - - - - - diff --git a/users/templates/users/data.html b/users/templates/users/data.html index 7a0710c9..2250c690 100644 --- a/users/templates/users/data.html +++ b/users/templates/users/data.html @@ -274,38 +274,7 @@ -
-
- -
- - -
-
- - {% if user == request.user %} - {% endif %} - -
-
-
+ {% include "partial/_sidebar.html" with show_follow=False %} @@ -314,46 +283,9 @@ {% include "partial/_footer.html" %} - -
- - {% if user == request.user %} - - {% else %} - - {% endif %} - - - - - - diff --git a/users/templates/users/game_list.html b/users/templates/users/game_list.html deleted file mode 100644 index fe38db77..00000000 --- a/users/templates/users/game_list.html +++ /dev/null @@ -1,279 +0,0 @@ -{% load static %} -{% load i18n %} -{% load l10n %} -{% load humanize %} -{% load admin_url %} -{% load mastodon %} -{% load oauth_token %} -{% load truncate %} -{% load thumb %} - - - - - - - {{ site_name }} - {{ user.mastodon_username }} {{ list_title }} - - - - - - - - - - -
-
- {% include "partial/_navbar.html" %} - -
-
-
-
-
- -
-
- {{ user.mastodon_username }} {{ list_title }} -
-
-
    - - {% for mark in marks %} - -
  • -
    - - - -
    -
    - - - {% if mark.game.other_title %}{% trans '别名' %} - {% for other_title in mark.game.other_title %} - {{ other_title }}{% if not forloop.last %} {% endif %} - {% endfor %}/ - {% endif %} - - {% if mark.game.developer %}{% trans '开发商' %} - {% for developer in mark.game.developer %} - {{ developer }}{% if not forloop.last %} {% endif %} - {% endfor %}/ - {% endif %} - - {% if mark.game.genre %}{% trans '类型' %} - {% for genre in mark.game.genre %} - {{ genre }}{% if not forloop.last %} {% endif %} - {% endfor %}/ - {% endif %} - - {% if mark.game.platform %}{% trans '平台' %} - {% for platform in mark.game.platform %} - {{ platform }}{% if not forloop.last %} {% endif %} - {% endfor %}/ - {% endif %} - - -

    - {{ mark.game.brief }} -

    -
    - {% for tag_dict in mark.game.tag_list %} - {% for k, v in tag_dict.items %} - {% if k == 'content' %} - - {{ v }} - - {% endif %} - {% endfor %} - {% endfor %} -
    -
    -
    -
    -
      -
    • - - {% if mark.rating %} - - {% endif %} - {% if mark.visibility > 0 %} - - - - {% endif %} - - {% trans '于' %} {{ mark.edited_time }} - {% if status == 'reviewed' %} - {% trans '评论' %}: {{ mark.title }} - {% else %} - {% trans '标记' %} - {% endif %} - - {% if mark.text %} -

      {{ mark.text }}

      - {% endif %} -
    • -
    -
    -
    - -
  • - {% empty %} -
    {% trans '无结果' %}
    - {% endfor %} - - - -
-
- -
-
- -
-
- -
- -
-
- - - - - -
-
-
- -
-
- {% trans '关注的人' %} -
- {% trans '更多' %} - -
- -
-
- {% trans '被他们关注' %} -
- {% trans '更多' %} - -
- -
-
-
- -
-
-
-
- {% include "partial/_footer.html" %} -
- - - - - - {% if user == request.user %} - - {% else %} - - {% endif %} - - - - - - - diff --git a/users/templates/users/home.html b/users/templates/users/home.html index f7e430f4..f6229162 100644 --- a/users/templates/users/home.html +++ b/users/templates/users/home.html @@ -565,457 +565,84 @@ - {% if user == request.user %} - -
-
- - {% trans '编辑布局' %} - - - - - - - - - -
- -
- - {% include "partial/_footer.html" %} - - -
-
- - - {% if user == request.user %} - - {% else %} - - {% endif %} - - - - - {% if unread_announcements %} -
- - -
-
+ {% include "partial/_announcement.html" %} {% endif %} - - - - - - - - \ No newline at end of file diff --git a/users/templates/users/item_list.html b/users/templates/users/item_list.html index 25a0c00f..44a83e1d 100644 --- a/users/templates/users/item_list.html +++ b/users/templates/users/item_list.html @@ -75,110 +75,14 @@ - -
-
- -
- -
-
- - - - - -
-
-
- -
-
- {% trans '关注的人' %} -
- {% trans '更多' %} - -
- -
-
- {% trans '被他们关注' %} -
- {% trans '更多' %} - -
- -
-
-
- -
+ + {% include "partial/_sidebar.html" with show_follow=False %} {% include "partial/_footer.html" %} - - - - - {% if user == request.user %} - - {% else %} - - {% endif %} - - - - - - - - - - - -
-
- {% include "partial/_navbar.html" %} - -
-
-
-
-
- -
-
- {{ user.mastodon_username }} {{ list_title }} -
-
- -
- -
-
- -
-
- -
- -
-
- - - - - -
-
-
- -
-
- {% trans '关注的人' %} -
- {% trans '更多' %} - -
- -
-
- {% trans '被他们关注' %} -
- {% trans '更多' %} - -
- -
-
-
- -
-
-
-
- {% include "partial/_footer.html" %} -
- - - - - - {% if user == request.user %} - - {% else %} - - {% endif %} - - - - - - - diff --git a/users/templates/users/music_list.html b/users/templates/users/music_list.html deleted file mode 100644 index a101fe8d..00000000 --- a/users/templates/users/music_list.html +++ /dev/null @@ -1,302 +0,0 @@ -{% load static %} -{% load i18n %} -{% load l10n %} -{% load humanize %} -{% load admin_url %} -{% load mastodon %} -{% load oauth_token %} -{% load truncate %} -{% load thumb %} - - - - - - - - {{ site_name }} - {{ user.mastodon_username }} {{ list_title }} - - - - - - - - - - -
-
- {% include "partial/_navbar.html" %} - -
-
-
-
-
- -
-
- {{ user.mastodon_username }} {{ list_title }} -
-
-
    - - {% for mark in marks %} - - {% with mark.music as music %} - -
  • -
    - {% if music.category_name|lower == 'album' %} - - - - {% elif music.category_name|lower == 'song' %} - - - - {% endif %} -
    -
    -
    - {% if music.category_name|lower == 'album' %} - - {{ music.title }} - - {% elif music.category_name|lower == 'song' %} - - {{ music.title }} - - {% endif %} - - {{ music.get_source_site_display }} - -
    - - {% if music.artist %}{% trans '艺术家' %} - {% for artist in music.artist %} - {{ artist }} - {% if not forloop.last %} {% endif %} - {% endfor %} - {% endif %} - - {% if music.genre %}/ {% trans '流派' %} - {{ music.genre }} - {% endif %} - - {% if music.release_date %}/ {% trans '发行日期' %} - {{ music.release_date }} - {% endif %} - - {% if music.brief %} -

    - {{ music.brief }} -

    - {% elif music.category_name|lower == 'album' %} -

    - {% trans '曲目:' %}{{ music.track_list }} -

    - {% else %} - -

    - {% trans '所属专辑:' %}{{ music.album }} -

    - {% endif %} -
    - {% for tag_dict in music.tag_list %} - {% for k, v in tag_dict.items %} - {% if k == 'content' %} - - {{ v }} - - {% endif %} - {% endfor %} - {% endfor %} -
    -
    -
    -
    -
      -
    • - - {% if mark.rating %} - - {% endif %} - {% if mark.visibility > 0 %} - - - - {% endif %} - - {% trans '于' %} {{ mark.edited_time }} - {% if status == 'reviewed' %} - {% trans '评论' %}: - {% if music.category_name|lower == 'album' %} - {{ mark.title }} - {% else %} - {{ mark.title }} - {% endif %} - {% else %} - {% trans '标记' %} - {% endif %} - - {% if mark.text %} -

      {{ mark.text }}

      - {% endif %} -
    • -
    -
    -
    - -
  • - - {% endwith %} - - {% empty %} -
    {% trans '无结果' %}
    - {% endfor %} - - - -
-
- -
-
- -
-
- -
- -
-
- - - - - -
-
-
- -
-
- {% trans '关注的人' %} -
- {% trans '更多' %} - -
- -
-
- {% trans '被他们关注' %} -
- {% trans '更多' %} - -
- -
-
-
- -
-
-
-
- {% include "partial/_footer.html" %} -
- - - - - - {% if user == request.user %} - - {% else %} - - {% endif %} - - - - - - - diff --git a/users/templates/users/preferences.html b/users/templates/users/preferences.html index f2ea7b83..50d7f5c7 100644 --- a/users/templates/users/preferences.html +++ b/users/templates/users/preferences.html @@ -52,38 +52,7 @@ -
-
- -
- - -
-
- - {% if user == request.user %} - {% endif %} - -
-
-
+ {% include "partial/_sidebar.html" with show_follow=False %} @@ -92,72 +61,6 @@ {% include "partial/_footer.html" %} - - -
-
- - - {% if user == request.user %} - - {% else %} - - {% endif %} - - - - - - - - - diff --git a/users/templates/users/report.html b/users/templates/users/report.html index c5658f8a..c078b5a4 100644 --- a/users/templates/users/report.html +++ b/users/templates/users/report.html @@ -38,12 +38,6 @@ - {% comment %} - - - - - {% endcomment %}