tweak item card

This commit is contained in:
Your Name 2023-05-21 15:30:32 -04:00 committed by Henri Dickson
parent aeea2e8f02
commit ca5342c827
5 changed files with 35 additions and 22 deletions

View file

@ -34,23 +34,25 @@
<div>
<div class="metadata">
{% if item.rating %}
{{ item.rating | floatformat:1 }}分
<span>{{ item.rating | floatformat:1 }}分({{ item.rating_count }}人)</span>
{% else %}
{% endif %}
{% include '_people.html' with people=item.author role='' max=2 %}
{% include '_people.html' with people=item.translator role='' max=2 %}
{% include '_people.html' with people=item.director role='' max=2 %}
{% include '_people.html' with people=item.author role='作者' max=2 %}
{% include '_people.html' with people=item.translator role='译者' max=2 %}
{% include '_people.html' with people=item.director role='导演' max=2 %}
{% include '_people.html' with people=item.hosts role='' max=2 %}
{% include '_people.html' with people=item.artist role='' max=2 %}
{% include '_people.html' with people=item.developer role='' max=2 %}
{% if item.pub_house %}/ {{ item.pub_house }}{% endif %}
{% if item.pub_house %}<span>{{ item.pub_house }}</span>{% endif %}
{% if item.pub_year %}
/ {{ item.pub_year }}{% trans '年' %}
{% if item.pub_month %}
{{ item.pub_month }}{% trans '月' %}
{% endif %}
<span>
{{ item.pub_year }}{% trans '年' %}
{% if item.pub_month %}
{{ item.pub_month }}{% trans '月' %}
{% endif %}
</span>
{% endif %}
{% if item.release_date %}/ {{ item.release_date }}{% endif %}
{% if item.release_date %}<span>{{ item.release_date }}</span>{% endif %}
{% include '_people.html' with people=item.genre role='' max=10 %}
{% include '_people.html' with people=item.platform role='' max=10 %}
</div>

View file

@ -1,11 +1,13 @@
{% if people %}
{% if role %}{{ role }}:{% endif %}
{% for p in people %}
{% if forloop.counter <= max %}
{% if not forloop.first %}、{% endif %}
<span>{{ p }}</span>
{% elif forloop.last %}
{% endif %}
{% endfor %}
<span>
{% if role %}{{ role }}:{% endif %}
{% for p in people %}
{% if forloop.counter <= max %}
{% if not forloop.first %}、{% endif %}
<span>{{ p }}</span>
{% elif forloop.last %}
{% endif %}
{% endfor %}
</span>
{% endif %}

View file

@ -9,6 +9,6 @@
</a>
</div>
<footer>
<div>{% include "_item_card_metadata.html" with hide_brief=1 %}</div>
<div>{% include "_item_card_metadata.html" with hide_brief=1 hide_category=1 %}</div>
</footer>
</article>

View file

@ -33,6 +33,10 @@ div.item {
-webkit-box-orient: vertical;
overflow: hidden;
font-size: 80%;
>span {
margin-right: 1rem;
}
}
.brief {

View file

@ -217,8 +217,13 @@
<input type="input"
name="verification"
value=""
placeholder="user@mastodon.social">
<input type="submit" value="{% trans '永久删除' %}" id="uploadBtn" />
required
placeholder="Gargron@mastodon.social">
{% if import_status.douban_pending %}
<input type="submit" value="暂时无法删除,因为有导入任务正在进行" disabled />
{% else %}
<input type="submit" value="{% trans '永久删除' %}" id="uploadBtn" />
{% endif %}
</div>
<div>删除将无法撤销</div>
</form>