151 lines
No EOL
7.7 KiB
HTML
151 lines
No EOL
7.7 KiB
HTML
{% load static %}
|
|
{% load i18n %}
|
|
{% load l10n %}
|
|
{% load humanize %}
|
|
{% load admin_url %}
|
|
{% load mastodon %}
|
|
{% load oauth_token %}
|
|
{% load truncate %}
|
|
{% load thumb %}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta property="og:title" content="{{ site_name }}乐评 - {{ review.title }}">
|
|
<meta property="og:type" content="article">
|
|
<meta property="og:article:author" content="{{ review.owner.username }}">
|
|
<meta property="og:url" content="{{ request.build_absolute_uri }}">
|
|
<meta property="og:image" content="{{ album.cover|thumb:'normal' }}">
|
|
<title>{{ site_name }}乐评 - {{ review.title }}</title>
|
|
<script src="https://cdn.staticfile.org/jquery/3.6.1/jquery.min.js"></script>
|
|
<script src="{% static 'lib/js/rating-star.js' %}"></script>
|
|
<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' %}">
|
|
<link rel="stylesheet" href="{% static 'lib/css/collection.css' %}">
|
|
</head>
|
|
|
|
<body>
|
|
<div id="page-wrapper">
|
|
<div id="content-wrapper">
|
|
{% include "partial/_navbar.html" %}
|
|
|
|
<section id="content">
|
|
<div class="grid">
|
|
<div class="grid__main" id="main">
|
|
<div class="main-section-wrapper">
|
|
<div class="review-head">
|
|
<h5 class="review-head__title">
|
|
{{ review.title }}
|
|
</h5>
|
|
{% if review.visibility > 0 %}
|
|
<span class="icon-lock"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
|
|
<path
|
|
d="M17,8.48h-.73V6.27a6.27,6.27,0,1,0-12.53,0V8.48H3a.67.67,0,0,0-.67.67V19.33A.67.67,0,0,0,3,20H17a.67.67,0,0,0,.67-.67V9.15A.67.67,0,0,0,17,8.48ZM6.42,6.27h0a3.57,3.57,0,0,1,7.14,0h0V8.48H6.42Z" />
|
|
</svg></span>
|
|
{% endif %}
|
|
<div class="review-head__body">
|
|
<div class="review-head__info">
|
|
|
|
<a href="{% url 'users:home' review.owner.mastodon_username %}"
|
|
class="review-head__owner-link">{{ review.owner.username }}</a>
|
|
|
|
{% if mark %}
|
|
|
|
{% if mark.rating %}
|
|
<span class="review-head__rating-star rating-star"
|
|
data-rating-score="{{ mark.rating | floatformat:" 0" }}"></span>
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
<span class="review-head__time">{{ review.edited_time }}</span>
|
|
|
|
</div>
|
|
<div class="review-head__actions">
|
|
{% if request.user == review.owner %}
|
|
<a class="review-head__action-link"
|
|
href="{% url 'music:update_album_review' review.id %}">{% trans '编辑' %}</a>
|
|
<a class="review-head__action-link"
|
|
href="{% url 'music:delete_album_review' review.id %}">{% trans '删除' %}</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<!-- <div class="dividing-line"></div> -->
|
|
<div id="rawContent">
|
|
{{ form.content }}
|
|
</div>
|
|
{{ form.media }}
|
|
{% csrf_token %}
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="grid__aside" id="aside">
|
|
<div class="aside-section-wrapper">
|
|
<div class="entity-card">
|
|
<div class="entity-card__img-wrapper">
|
|
<a href="{% url 'music:retrieve_album' album.id %}"><img src="{{ album.cover|thumb:'normal' }}"
|
|
alt="" class="entity-card__img"></a>
|
|
</div>
|
|
<div class="entity-card__info-wrapper">
|
|
<h5 class="entity-card__title"><a href="{% url 'music:retrieve_album' album.id %}">
|
|
{{ album.title }}
|
|
</a>
|
|
<a href="{{ album.source_url }}">
|
|
<span class="source-label source-label__{{ album.source_site }}">
|
|
{{ album.get_source_site_display }}
|
|
</span>
|
|
</a>
|
|
</h5>
|
|
|
|
<div>{% if album.artist %}{% trans '艺术家:' %}
|
|
{% for artist in album.artist %}
|
|
<span {% if forloop.counter > 5 %}style="display: none;" {% endif %}>
|
|
<span class="artist">{{ artist }}</span>
|
|
{% if not forloop.last %} / {% endif %}
|
|
</span>
|
|
{% endfor %}
|
|
{% if album.artist|length > 5 %}
|
|
<a href="javascript:void(0);" id="artistMore">{% trans '更多' %}</a>
|
|
<script>
|
|
$("#artistMore").on('click', function (e) {
|
|
$("span.artist:not(:visible)").each(function (e) {
|
|
$(this).parent().removeAttr('style');
|
|
});
|
|
$(this).remove();
|
|
})
|
|
</script>
|
|
{% endif %}
|
|
{% endif %}
|
|
</div>
|
|
<div>{% if album.genre %}{% trans '流派:' %}{{ album.genre }}{% endif %}</div>
|
|
|
|
<div>{% if album.release_date %}{% trans '发行日期:' %}{{ album.release_date}}{% endif %}</div>
|
|
{% if album.rating %}
|
|
{% trans '评分: ' %}<span class="entity-card__rating-star rating-star"
|
|
data-rating-score="{{ album.rating | floatformat:" 0" }}"></span>
|
|
<span class="entity-card__rating-score rating-score">{{ album.rating }}</span>
|
|
{% endif %}
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
{% include "partial/_footer.html" %}
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
$(".markdownx textarea").hide();
|
|
</script>
|
|
</body>
|
|
|
|
|
|
</html> |