fix tag display

This commit is contained in:
Their Name 2022-05-13 19:46:34 +00:00
parent 4ca1465fe8
commit a994d9e893
3 changed files with 17 additions and 8 deletions

View file

@ -78,8 +78,7 @@
<h5 class="user-relation__label">
{% trans '常用标签' %}
</h5>
<a href="{% url 'users:tag_list' user.mastodon_username %}"
class="user-relation__more-link mast-following-more">{% trans '更多' %}</a>
<a href="{% url 'users:tag_list' user.mastodon_username %}">{% trans '更多' %}</a>
<div class="tag-collection" style="margin-left: 0;">
{% if book_tags %}
<div>{% trans '书籍' %}</div>

View file

@ -20,6 +20,8 @@
<script src="{% static 'js/rating-star-readonly.js' %}"></script>
<link rel="stylesheet" href="{% static 'lib/css/rating-star.css' %}">
<link rel="stylesheet" href="{% static 'css/boofilsic.min.css' %}">
<script src="{% static 'js/mastodon.js' %}"></script>
<script src="{% static 'js/home.js' %}"></script>
</head>
<body>
@ -35,10 +37,12 @@
<div class="tag-collection entity-reviews__review-list">
<h5>{% trans '书籍' %}</h5>
{% for v in book_tags %}
<span class="tag-collection__tag">
<span style="display: inline-block;margin: 4px;">
<span class="tag-collection__tag" style="display:inline;float:none;">
<a href="{% url 'users:book_list' user.mastodon_username 'tagged' %}?t={{ v.content }}">{{ v.content }}</a>
</span>
<span class="entity-reviews__review-time">({{ v.total }})</span>
<span class="entity-reviews__review-time">({{ v.total }})</span>
</span>
{% empty %}
{% trans '暂无标签' %}
{% endfor %}
@ -46,10 +50,12 @@
<h5>{% trans '电影和剧集' %}</h5>
{% for v in movie_tags %}
<span class="tag-collection__tag">
<span style="display: inline-block;margin: 4px;">
<span class="tag-collection__tag" style="display:inline;float:none;">
<a href="{% url 'users:movie_list' user.mastodon_username 'tagged' %}?t={{ v.content }}">{{ v.content }}</a>
</span>
<span class="entity-reviews__review-time">({{ v.total }})</span>
</span>
{% empty %}
{% trans '暂无标签' %}
{% endfor %}
@ -57,10 +63,12 @@
<h5>{% trans '音乐' %}</h5>
{% for v in music_tags %}
<span class="tag-collection__tag">
<span style="display: inline-block;margin: 4px;">
<span class="tag-collection__tag" style="display:inline;float:none;">
<a href="{% url 'users:music_list' user.mastodon_username 'tagged' %}?t={{ v.content }}">{{ v.content }}</a>
</span>
<span class="entity-reviews__review-time">({{ v.total }})</span>
</span>
{% empty %}
{% trans '暂无标签' %}
{% endfor %}
@ -68,10 +76,12 @@
<h5>{% trans '游戏' %}</h5>
{% for v in game_tags %}
<span class="tag-collection__tag">
<span style="display: inline-block;margin: 4px;">
<span class="tag-collection__tag" style="display:inline;float:none;">
<a href="{% url 'users:game_list' user.mastodon_username 'tagged' %}?t={{ v.content }}">{{ v.content }}</a>
</span>
<span class="entity-reviews__review-time">({{ v.total }})</span>
</span>
{% empty %}
{% trans '暂无标签' %}
{% endfor %}

View file

@ -5,7 +5,7 @@ from django.contrib import auth
from django.contrib.auth import authenticate
from django.core.paginator import Paginator
from django.utils.translation import gettext_lazy as _
from django.core.exceptions import ObjectDoesNotExist
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
from django.db.models import Count
from .models import User, Report, Preference
from .forms import ReportForm