2022-12-15 17:29:35 -05:00
|
|
|
{% load static %}
|
|
|
|
{% load i18n %}
|
|
|
|
{% load l10n %}
|
|
|
|
{% load humanize %}
|
|
|
|
{% load mastodon %}
|
|
|
|
{% load strip_scheme %}
|
|
|
|
{% load thumb %}
|
2023-02-11 20:40:00 -05:00
|
|
|
{% load user_actions %}
|
2023-05-20 11:01:18 -04:00
|
|
|
{% load duration %}
|
2022-12-15 17:29:35 -05:00
|
|
|
<!DOCTYPE html>
|
2023-05-23 08:08:07 -04:00
|
|
|
<html lang="zh" class="item-page">
|
2023-05-20 11:01:18 -04:00
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<meta property="og:title"
|
2024-06-13 20:44:15 -04:00
|
|
|
content="{% trans item.category.label %} - {{ item.display_title }}">
|
2023-05-20 11:01:18 -04:00
|
|
|
<meta property="og:type" content="{{ item.category }}">
|
2024-04-06 11:53:31 -04:00
|
|
|
<meta property="og:url" content="{{ item.absolute_url }}">
|
2023-05-20 11:01:18 -04:00
|
|
|
{% if item.has_cover %}<meta property="og:image" content="{{ item.cover_image_url }}">{% endif %}
|
|
|
|
<meta property="og:site_name" content="{{ site_name }}">
|
2024-07-14 10:45:27 -04:00
|
|
|
<meta property="og:description" content="{{ item.brief_description }}">
|
2023-05-20 11:01:18 -04:00
|
|
|
{% if item.is_deleted or item.merged_to_item %}<meta name="robots" content="noindex">{% endif %}
|
2023-06-05 02:46:26 -04:00
|
|
|
<title>{{ site_name }} - {% trans item.category.label %} | {{ item.display_title }}</title>
|
2024-01-07 17:24:34 -05:00
|
|
|
{% include "common_libs.html" %}
|
2023-05-20 11:01:18 -04:00
|
|
|
{% block head %}{% endblock %}
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
{% include "_header.html" %}
|
2023-05-21 09:41:51 -04:00
|
|
|
<main>
|
2023-05-20 11:01:18 -04:00
|
|
|
<div id="item-title" class="middle">
|
|
|
|
{% if item.is_deleted %}[DELETED]{% endif %}
|
|
|
|
{% if item.merged_to_item %}
|
2024-07-13 00:16:47 -04:00
|
|
|
[MERGED TO <a href="{{ item.merged_to_item.url }}">{{ item.merged_to_item.display_title }}</a>]
|
2023-05-20 11:01:18 -04:00
|
|
|
{% endif %}
|
|
|
|
<h1>
|
2023-06-05 02:46:26 -04:00
|
|
|
{{ item.display_title }}
|
2023-05-20 11:01:18 -04:00
|
|
|
<small>
|
|
|
|
{% if item.year %}({{ item.year }}){% endif %}
|
|
|
|
</small>
|
|
|
|
</h1>
|
|
|
|
<span class="site-list">
|
|
|
|
{% for res in item.external_resources.all %}
|
2023-07-20 21:59:49 -04:00
|
|
|
<a href="{{ res.url }}" class="{{ res.site_name }}">{{ res.site_label }}</a>
|
2023-05-20 11:01:18 -04:00
|
|
|
{% endfor %}
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div id="item-cover" class="left">
|
2024-04-06 11:53:31 -04:00
|
|
|
<img src="{{ item.cover_image_url|default:item.cover.url|relative_uri }}"
|
2024-07-13 01:36:18 -04:00
|
|
|
alt="{{ item.display_title }}">
|
2023-05-20 11:01:18 -04:00
|
|
|
</div>
|
|
|
|
{% if request.user.is_authenticated and not mark.shelf_type %}
|
|
|
|
<div id="item-primary-action" class="right mark">
|
2023-05-21 17:14:35 -04:00
|
|
|
<div class="item-action item-mark-buttons">
|
2024-05-29 10:50:41 -04:00
|
|
|
{% for k, v in shelf_statuses %}
|
2024-01-20 22:52:08 -05:00
|
|
|
{% if v and k != 'dropped' %}
|
2023-05-20 11:01:18 -04:00
|
|
|
<button class="primary"
|
|
|
|
data-status="{{ k }}"
|
2023-06-09 02:45:27 -04:00
|
|
|
hx-get="{% url 'journal:mark' item.uuid %}?shelf_type={{ k }}"
|
2023-05-20 11:01:18 -04:00
|
|
|
hx-target="body"
|
|
|
|
hx-swap="beforeend">{% trans v %}</button>
|
2023-02-01 22:40:34 -05:00
|
|
|
{% endif %}
|
2023-05-20 11:01:18 -04:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2023-05-21 17:14:35 -04:00
|
|
|
<div class="tv-tip" style="display:none;">
|
2024-05-19 16:32:59 -04:00
|
|
|
{% trans 'select one of the seasons to comment' %}
|
2023-05-21 17:43:05 -04:00
|
|
|
{% if item.class_name == 'tvshow' %}
|
|
|
|
{% with item.all_seasons as seasons %}
|
|
|
|
{% if seasons %}
|
|
|
|
<div _="init hide .item-mark-buttons then hide .item-mark-icon then show .tv-tip end">
|
|
|
|
{% for s in seasons %}
|
|
|
|
<span class="season-number">
|
|
|
|
<a href="{{ s.url }}">{{ s.season_number|default:"#" }}</a>
|
|
|
|
</span>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endwith %}
|
|
|
|
{% endif %}
|
2023-05-21 17:14:35 -04:00
|
|
|
</div>
|
2023-05-20 11:01:18 -04:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% if request.user.is_authenticated and mark.shelf_type %}
|
|
|
|
<div id="item-primary-mark" class="right mark">
|
|
|
|
<div class="item-action">
|
|
|
|
<button class="outline edit"
|
2023-06-09 02:45:27 -04:00
|
|
|
hx-get="{% url 'journal:mark' item.uuid %}"
|
2023-05-20 11:01:18 -04:00
|
|
|
hx-target="body"
|
|
|
|
hx-swap="beforeend">
|
2024-05-29 10:50:41 -04:00
|
|
|
<strong>{% trans mark.status_label %}</strong>
|
|
|
|
<br>
|
2023-06-02 21:54:48 -04:00
|
|
|
{% if mark.rating_grade %}
|
|
|
|
{{ mark.rating_grade | rating_star }}
|
2024-05-29 10:50:41 -04:00
|
|
|
<br>
|
|
|
|
{% endif %}
|
|
|
|
<small>{{ mark.created_time | date }}</small>
|
|
|
|
<!-- <span style="white-space: nowrap;">
|
2023-05-20 11:01:18 -04:00
|
|
|
<i class="fa-solid fa-star"></i><i class="fa-solid fa-star"></i><i class="fa-solid fa-star"></i><i class="fa-solid fa-star-half-stroke"></i><i class="fa-regular fa-star"></i>
|
|
|
|
</span> -->
|
|
|
|
</button>
|
2022-12-15 17:29:35 -05:00
|
|
|
</div>
|
2023-05-20 11:01:18 -04:00
|
|
|
<div class="small-only" style="margin-top:2vh;">
|
2024-05-19 16:32:59 -04:00
|
|
|
<a href="#item-sidebar">{% trans 'mark, comment and collect' %}</a>
|
2023-05-20 11:01:18 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<div id="item-sidebar" class="right">
|
|
|
|
{% if request.user.is_authenticated %}
|
2023-06-19 15:40:27 -04:00
|
|
|
{% include "_item_user_pieces.html" %}
|
2023-05-20 11:01:18 -04:00
|
|
|
{% else %}
|
|
|
|
<section>
|
|
|
|
<p class="empty">
|
2024-05-19 16:32:59 -04:00
|
|
|
<span><a href="{% url 'users:login' %}?next={{ request.path }}">
|
|
|
|
{% trans 'Login or register to review or add this item to your collection.' %}
|
|
|
|
</a></span>
|
2023-05-20 11:01:18 -04:00
|
|
|
</p>
|
|
|
|
</section>
|
|
|
|
{% endif %}
|
|
|
|
{% block sidebar %}{% endblock %}
|
|
|
|
{% if collection_list %}
|
|
|
|
<section>
|
2024-05-19 16:32:59 -04:00
|
|
|
<h5>{% trans 'Related Collections' %}</h5>
|
2023-05-20 11:01:18 -04:00
|
|
|
<div>
|
|
|
|
{% for c in collection_list %}
|
|
|
|
<p>
|
|
|
|
<a href="{{ c.url }}">{{ c.title }}</a>
|
|
|
|
{% if c.visibility > 0 %}<i class="fa-solid fa-lock"></i>{% endif %}
|
|
|
|
</p>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div id="item-metadata" class="left">
|
2023-05-21 09:41:51 -04:00
|
|
|
<section>
|
|
|
|
{% block details %}
|
2024-05-19 16:32:59 -04:00
|
|
|
<div>{% trans 'Unsupported item type.' %}</div>
|
|
|
|
<div>UUID: {{ item.uuid }}</div>
|
|
|
|
<div>Class: {{ item.class_name }}</div>
|
|
|
|
<div>Category: {{ item.category }}</div>
|
2023-05-21 09:41:51 -04:00
|
|
|
{% endblock %}
|
|
|
|
{% if request.user.is_authenticated %}
|
|
|
|
<div class="item-edit">
|
|
|
|
<span class="action inline">
|
|
|
|
<a href="{% url 'catalog:edit' item.url_path item.uuid %}"
|
2024-05-29 10:50:41 -04:00
|
|
|
title="{% trans 'Edit this item' %}"><i class="fa-regular fa-pen-to-square"></i></a>
|
2023-05-20 11:01:18 -04:00
|
|
|
</span>
|
2023-05-21 09:41:51 -04:00
|
|
|
{% if item.last_editor and item.last_editor.preference.show_last_edit %}
|
|
|
|
<span>
|
2024-05-19 16:32:59 -04:00
|
|
|
{% trans 'Last edited' %}:
|
2023-08-11 16:14:44 -04:00
|
|
|
<a href="{{ item.last_editor.url }}">{{ item.last_editor.display_name | default:"" }}</a>
|
2023-05-21 09:41:51 -04:00
|
|
|
</span>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2023-06-09 10:17:48 -04:00
|
|
|
<div class="rating solo-hidden {% if not item.rating %}unavailable{% endif %}">
|
2023-05-21 09:41:51 -04:00
|
|
|
<div class="display">
|
|
|
|
<div>
|
|
|
|
<hgroup>
|
|
|
|
<h3>
|
|
|
|
{{ item.rating | floatformat:1 }} <small>/ 10</small>
|
|
|
|
</h3>
|
2024-05-19 16:32:59 -04:00
|
|
|
<p>{{ item.rating_count }} {% trans 'ratings' %}</p>
|
2023-05-21 09:41:51 -04:00
|
|
|
</hgroup>
|
|
|
|
</div>
|
|
|
|
<div data-placement="top">
|
|
|
|
<ul class="chart">
|
|
|
|
<li data-tooltip="{{ item.rating_dist.0 }}%" data-placement="left">
|
|
|
|
<span style="height:{{ item.rating_dist.0 }}%"></span>
|
|
|
|
</li>
|
|
|
|
<li data-tooltip="{{ item.rating_dist.1 }}%" data-placement="left">
|
|
|
|
<span style="height:{{ item.rating_dist.1 }}%"></span>
|
|
|
|
</li>
|
|
|
|
<li data-tooltip="{{ item.rating_dist.2 }}%" data-placement="left">
|
|
|
|
<span style="height:{{ item.rating_dist.2 }}%"></span>
|
|
|
|
</li>
|
|
|
|
<li data-tooltip="{{ item.rating_dist.3 }}%" data-placement="left">
|
|
|
|
<span style="height:{{ item.rating_dist.3 }}%"></span>
|
|
|
|
</li>
|
|
|
|
<li data-tooltip="{{ item.rating_dist.4 }}%" data-placement="left">
|
|
|
|
<span style="height:{{ item.rating_dist.4 }}%"></span>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2023-05-20 11:01:18 -04:00
|
|
|
</div>
|
2023-05-21 09:41:51 -04:00
|
|
|
<div class="undisplay">
|
2024-05-19 16:32:59 -04:00
|
|
|
<span>{% trans 'No enough ratings' %}</span>
|
2022-12-15 17:29:35 -05:00
|
|
|
</div>
|
2023-05-20 11:01:18 -04:00
|
|
|
</div>
|
2023-06-09 10:17:48 -04:00
|
|
|
<div class="tag-list solo-hidden">
|
2023-05-21 09:41:51 -04:00
|
|
|
{% for tag in item.tags %}
|
|
|
|
<span>
|
|
|
|
<a href="{% url 'catalog:search' %}?tag={{ tag }}">{{ tag }}</a>
|
|
|
|
</span>
|
|
|
|
{% endfor %}
|
2022-12-15 17:29:35 -05:00
|
|
|
</div>
|
2023-05-21 09:41:51 -04:00
|
|
|
</section>
|
2023-05-20 11:01:18 -04:00
|
|
|
{% block left_sidebar %}{% endblock %}
|
|
|
|
</div>
|
|
|
|
<div id="item-title-more" class="middle">
|
|
|
|
<hgroup>
|
2024-07-14 13:36:52 -04:00
|
|
|
<p>
|
|
|
|
{% if item.display_subtitle %}{{ item.display_subtitle }}{% endif %}
|
|
|
|
{% if item.orig_title and item.orig_title != item.display_title %}
|
|
|
|
<p>
|
|
|
|
{{ item.orig_title }}
|
|
|
|
<small>
|
|
|
|
{% if item.season_number %}Season {{ item.season_number }}{% endif %}
|
|
|
|
</small>
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
{% if item.parent_item %}
|
2024-07-13 01:36:18 -04:00
|
|
|
{% trans 'part of' %} {{ item.parent_item.type.label }}: <span><a href="{{ item.parent_item.url }}"></span>{{ item.parent_item.display_title }}</a>
|
2024-07-14 13:36:52 -04:00
|
|
|
{% endif %}
|
|
|
|
</p>
|
2023-05-20 11:01:18 -04:00
|
|
|
{% if item.author or item.translator %}
|
|
|
|
<p>
|
|
|
|
<i>
|
2024-05-19 16:32:59 -04:00
|
|
|
{% include '_people.html' with people=item.author _role='author' max=2 %}
|
2023-05-20 11:01:18 -04:00
|
|
|
</i>
|
|
|
|
|
|
|
|
<i>
|
2024-05-29 10:50:41 -04:00
|
|
|
{% include '_people.html' with people=item.translator role='translator' max=2 %}
|
2023-05-20 11:01:18 -04:00
|
|
|
</i>
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
</hgroup>
|
|
|
|
</div>
|
|
|
|
<div id="item-detail" class="middle">
|
2023-05-21 11:12:40 -04:00
|
|
|
<section id="item-content">
|
2024-05-19 16:32:59 -04:00
|
|
|
<h5>{% trans 'overview' %}</h5>
|
2024-07-14 10:45:27 -04:00
|
|
|
{% if item.display_description %}
|
|
|
|
<p class="tldr" _="on click toggle .tldr on me">{{ item.display_description | linebreaksbr }}</p>
|
|
|
|
{% elif item.parent_item.display_description %}
|
|
|
|
<p class="tldr" _="on click toggle .tldr on me">{{ item.parent_item.display_description | linebreaksbr }}</p>
|
2023-05-20 11:01:18 -04:00
|
|
|
{% else %}
|
2024-05-19 16:32:59 -04:00
|
|
|
<p class="empty">{% trans 'nothing so far.' %}</p>
|
2023-05-20 11:01:18 -04:00
|
|
|
{% endif %}
|
2023-05-21 11:12:40 -04:00
|
|
|
{% block content %}{% endblock %}
|
2023-05-20 11:01:18 -04:00
|
|
|
</section>
|
2023-06-09 10:17:48 -04:00
|
|
|
<section class="solo-hidden">
|
2023-12-29 01:34:17 -05:00
|
|
|
<div>
|
|
|
|
<h5>
|
2024-05-19 16:32:59 -04:00
|
|
|
{% trans 'comments' %}
|
2023-12-29 01:34:17 -05:00
|
|
|
<small>
|
|
|
|
{% if request.user.is_authenticated %}
|
2024-05-19 16:32:59 -04:00
|
|
|
| <a href="{% url 'catalog:mark_list' item.url_path item.uuid %}">{% trans 'marks' %}</a>
|
|
|
|
| <a href="{% url 'catalog:mark_list' item.url_path item.uuid 'following' %}">{% trans 'marks from who you follow' %}</a>
|
2023-12-29 01:34:17 -05:00
|
|
|
{% endif %}
|
|
|
|
</small>
|
|
|
|
</h5>
|
|
|
|
<div id="comments">
|
|
|
|
<div hx-swap="outerHTML"
|
|
|
|
hx-get="{% if request.GET.focus and item.class_name == "tvseason" %}{% url 'catalog:comments_by_episode' item.url_path item.uuid %}?episode_uuid={{ request.GET.focus }}{% else %}{% url 'catalog:comments' item.url_path item.uuid %}{% endif %}"
|
|
|
|
hx-trigger="intersect once">
|
|
|
|
<i class="fa-solid fa-compact-disc fa-spin loading"></i>
|
2023-05-20 11:01:18 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-12-29 01:34:17 -05:00
|
|
|
</div>
|
2023-05-20 11:01:18 -04:00
|
|
|
</section>
|
2023-06-09 10:17:48 -04:00
|
|
|
<section class="solo-hidden">
|
2024-05-19 16:32:59 -04:00
|
|
|
<h5>{% trans 'reviews' %}</h5>
|
2023-12-29 01:34:17 -05:00
|
|
|
<div>
|
|
|
|
<div hx-get="{% url 'catalog:reviews' item.url_path item.uuid %}"
|
|
|
|
hx-trigger="intersect once"
|
|
|
|
hx-swap="outerHTML">
|
|
|
|
<i class="fa-solid fa-compact-disc fa-spin loading"></i>
|
2023-05-20 11:01:18 -04:00
|
|
|
</div>
|
2023-12-29 01:34:17 -05:00
|
|
|
</div>
|
2023-05-20 11:01:18 -04:00
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
<div id="item-more" class="middle">
|
|
|
|
<!-- test more content -->
|
|
|
|
</div>
|
|
|
|
<div style="clear: both;display: table;"></div>
|
|
|
|
</main>
|
2023-06-09 03:01:17 -04:00
|
|
|
{% include "_footer.html" %}
|
2023-05-20 11:01:18 -04:00
|
|
|
</body>
|
2022-12-15 17:29:35 -05:00
|
|
|
</html>
|