270 lines
16 KiB
HTML
270 lines
16 KiB
HTML
{% load static %}
|
|
{% load i18n %}
|
|
{% load admin_url %}
|
|
{% load mastodon %}
|
|
{% load oauth_token %}
|
|
{% load truncate %}
|
|
{% load highlight %}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% trans 'Nicedb - ' %}{{ user.username }}{{ list_title }}</title>
|
|
<script src="https://cdn.staticfile.org/jquery/3.5.0/jquery.min.js"></script>
|
|
<script src="{% static 'lib/js/rating-star.js' %}"></script>
|
|
<script src="{% static 'js/rating-star-readonly.js' %}"></script>
|
|
<script src="{% static 'js/mastodon.js' %}"></script>
|
|
<script src="{% static 'js/home.js' %}"></script>
|
|
<link rel="stylesheet" href="{% static 'lib/css/rating-star.css' %}">
|
|
<link rel="stylesheet" href="{% static 'css/boofilsic.css' %}">
|
|
<!-- <link rel="stylesheet" href="{% static 'css/boofilsic_browse.css' %}"> -->
|
|
<!-- <link rel="stylesheet" href="{% static 'lib/css/milligram.css' %}"> -->
|
|
</head>
|
|
|
|
<body>
|
|
<div id="page-wrapper">
|
|
<div id="content-wrapper">
|
|
{% include "partial/_navbar.html" %}
|
|
|
|
<section id="content" class="container">
|
|
<div class="grid grid--reverse-order">
|
|
<div class="grid__main grid__main--reverse-order">
|
|
<div class="main-section-wrapper">
|
|
<div class="entity-list">
|
|
|
|
<div class="set">
|
|
<h5 class="entity-list__title">
|
|
{{ user.username }}{{ list_title }}
|
|
</h5>
|
|
</div>
|
|
<ul class="entity-list__entities">
|
|
|
|
{% for mark in marks %}
|
|
|
|
<li class="entity-list__entity">
|
|
<div class="entity-list__entity-img-wrapper">
|
|
<a href="{% url 'books:retrieve' mark.book.id %}">
|
|
<img src="{{ mark.book.cover.url }}" alt="" class="entity-list__entity-img">
|
|
</a>
|
|
</div>
|
|
<div class="entity-list__entity-text">
|
|
<div class="entity-list__entity-title">
|
|
<a href="{% url 'books:retrieve' mark.book.id %}" class="entity-list__entity-link">
|
|
{{ mark.book.title }}
|
|
</a>
|
|
</div>
|
|
{% comment %}
|
|
<!-- {% if mark.book.rating %}
|
|
<div class="rating-star entity-list__rating-star" data-rating-score="{{ mark.book.rating | floatformat:"0" }}"></div>
|
|
<span class="entity-list__rating-score rating-score">
|
|
{{ mark.book.rating }}
|
|
</span>
|
|
{% else %}
|
|
<div class="entity-list__rating entity-list__rating--empty"> {% trans '暂无评分' %}</div>
|
|
{% endif %} -->
|
|
{% endcomment %}
|
|
<span class="entity-list__entity-info entity-list__entity-info--full-length">
|
|
{% 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 %}
|
|
</span>
|
|
<p class="entity-list__entity-brief">
|
|
{{ mark.book.brief | truncate:170 }}
|
|
</p>
|
|
<div class="entity-marks" style="margin-bottom: 0;">
|
|
<ul class="entity-marks__mark-list">
|
|
<li class="entity-marks__mark">
|
|
|
|
{% if mark.rating %}
|
|
<span class="entity-marks__rating-star rating-star"
|
|
data-rating-score="{{ mark.rating | floatformat:"0" }}" style="left: -4px;"></span>
|
|
{% endif %}
|
|
{% if mark.is_private %}
|
|
<span class="icon-lock"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><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 %}
|
|
<span class="entity-marks__mark-time">{{ mark.edited_time }}</span>
|
|
{% if mark.text %}
|
|
<p class="entity-marks__mark-content">{{ mark.text }}</p>
|
|
{% endif %}
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
</li>
|
|
{% empty %}
|
|
<div>{% trans '无结果' %}</div>
|
|
{% endfor %}
|
|
<!-- user mark -->
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
<div class="pagination">
|
|
|
|
{% if marks.pagination.has_prev %}
|
|
<a href="?page=1" class="pagination__nav-link pagination__nav-link">«</a>
|
|
<a href="?page={{ marks.previous_page_number }}"
|
|
class="pagination__nav-link pagination__nav-link--right-margin pagination__nav-link">‹</a>
|
|
{% endif %}
|
|
|
|
{% for page in marks.pagination.page_range %}
|
|
|
|
{% if page == marks.pagination.current_page %}
|
|
<a href="?page={{ page }}" class="pagination__page-link pagination__page-link--current">{{ page }}</a>
|
|
{% else %}
|
|
<a href="?page={{ page }}" class="pagination__page-link">{{ page }}</a>
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% if marks.pagination.has_next %}
|
|
<a href="?page={{ marks.next_page_number }}"
|
|
class="pagination__nav-link pagination__nav-link--left-margin">›</a>
|
|
<a href="?page={{ marks.pagination.last_page }}" class="pagination__nav-link">»</a>
|
|
{% endif %}
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="grid__aside grid__aside--reverse-order grid__aside--tablet-column">
|
|
<div class="aside-section-wrapper aside-section-wrapper--no-margin">
|
|
<div class="user-profile" id="userInfoCard">
|
|
<div class="user-profile__header">
|
|
<!-- <img src="" class="user-profile__avatar mast-avatar" alt="{{ user.username }}"> -->
|
|
<img src="" class="user-profile__avatar mast-avatar">
|
|
<a href="{% url 'users:home' user.id %}">
|
|
<h5 class="user-profile__username mast-displayname"></h5>
|
|
</a>
|
|
</div>
|
|
<p class="user-profile__bio mast-brief"></p>
|
|
<!-- <a href="#" class="follow">{% trans '关注TA' %}</a> -->
|
|
|
|
{% if request.user != user %}
|
|
<a href="{% url 'users:report' %}?user_id={{ user.id }}"
|
|
class="user-profile__report-link">{% trans '举报用户' %}</a>
|
|
{% endif %}
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="relation-dropdown">
|
|
<div class="relation-dropdown__button">
|
|
<span class="icon-arrow">
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10">
|
|
<path d="M8.12,3.29,5,6.42,1.86,3.29H.45L5,7.84,9.55,3.29Z" />
|
|
</svg>
|
|
</span>
|
|
</div>
|
|
<div class="relation-dropdown__body">
|
|
<div class="aside-section-wrapper aside-section-wrapper--transparent aside-section-wrapper--collapse">
|
|
|
|
<div class="user-relation" id="followings">
|
|
<h5 class="user-relation__label">
|
|
{% trans '关注的人' %}
|
|
</h5>
|
|
<a href="{% url 'users:following' user.id %}"
|
|
class="user-relation__more-link mast-following-more">{% trans '更多' %}</a>
|
|
<ul class="user-relation__related-user-list mast-following">
|
|
<li class="user-relation__related-user">
|
|
<a>
|
|
<img src="" alt="" class="user-relation__related-user-avatar">
|
|
<div class="user-relation__related-user-name mast-displayname">
|
|
</div>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="user-relation" id="followers">
|
|
<h5 class="user-relation__label">
|
|
{% trans '被他们关注' %}
|
|
</h5>
|
|
<a href="{% url 'users:followers' user.id %}"
|
|
class="user-relation__more-link mast-followers-more">{% trans '更多' %}</a>
|
|
<ul class="user-relation__related-user-list mast-followers">
|
|
<li class="user-relation__related-user">
|
|
<a>
|
|
<img src="" alt="" class="user-relation__related-user-avatar">
|
|
<div class="user-relation__related-user-name mast-displayname">
|
|
</div>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
{% include "partial/_footer.html" %}
|
|
</div>
|
|
|
|
|
|
<div id="oauth2Token" hidden="true">{% oauth_token %}</div>
|
|
<div id="mastodonURI" hidden="true">{% mastodon %}</div>
|
|
<!--current user mastodon id-->
|
|
<div id="userMastodonID" hidden="true">{{ user.mastodon_id }}</div>
|
|
<div id="userPageURL" hidden="true">{% url 'users:home' 0 %}?is_mastodon_id=true</div>
|
|
<div id="spinner" hidden>
|
|
<div class="spinner">
|
|
<div></div>
|
|
<div></div>
|
|
<div></div>
|
|
<div></div>
|
|
<div></div>
|
|
<div></div>
|
|
<div></div>
|
|
<div></div>
|
|
<div></div>
|
|
<div></div>
|
|
<div></div>
|
|
<div></div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$("#searchInput").on('keyup', function (e) {
|
|
if (e.keyCode === 13) {
|
|
let q = $(this).val();
|
|
if (q)
|
|
location.href = "{% url 'common:search' %}" + "?q=" + q;
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
|
|
</html>
|