ui improvement
This commit is contained in:
parent
fec1212f88
commit
89052c2b4b
13 changed files with 83 additions and 11 deletions
|
@ -4,7 +4,7 @@
|
|||
{% block brief %}
|
||||
<div class="multi-fields">
|
||||
{% if item.rating %}
|
||||
<span class="solo-hidden">{{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分)</span>
|
||||
<span class="solo-hidden">{{ item.rating | floatformat:1 }} <small>({{ item.rating_count }}人评分)</small></span>
|
||||
{% endif %}
|
||||
{% include '_people.html' with people=item.artist role='' max=2 %}
|
||||
{% include '_people.html' with people=item.genre role='流派' max=5 %}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{% load i18n %}
|
||||
{% block brief %}
|
||||
{% if item.rating %}
|
||||
<span class="solo-hidden">{{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分)</span>
|
||||
<span class="solo-hidden">{{ item.rating | floatformat:1 }} <small>({{ item.rating_count }}人评分)</small></span>
|
||||
{% endif %}
|
||||
{% include '_people.html' with people=item.author role='作者' max=2 %}
|
||||
{% include '_people.html' with people=item.translator role='译者' max=2 %}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% block brief %}
|
||||
<div class="multi-fields">
|
||||
{% if item.rating %}
|
||||
<span class="solo-hidden">{{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分)</span>
|
||||
<span class="solo-hidden">{{ item.rating | floatformat:1 }} <small>({{ item.rating_count }}人评分)</small></span>
|
||||
{% endif %}
|
||||
{% if item.other_title %}
|
||||
{% include '_people.html' with people=item.other_title role='又名' max=2 %}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% block brief %}
|
||||
<div class="multi-fields">
|
||||
{% if item.rating %}
|
||||
<span class="solo-hidden">{{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分)</span>
|
||||
<span class="solo-hidden">{{ item.rating | floatformat:1 }} <small>({{ item.rating_count }}人评分)</small></span>
|
||||
{% endif %}
|
||||
{% include '_people.html' with people=item.director role='导演' max=2 %}
|
||||
{% include '_people.html' with people=item.actor role='主演' max=2 %}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% block brief %}
|
||||
<div class="multi-fields">
|
||||
{% if item.rating %}
|
||||
<span class="solo-hidden">{{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分)</span>
|
||||
<span class="solo-hidden">{{ item.rating | floatformat:1 }} <small>({{ item.rating_count }}人评分)</small></span>
|
||||
{% endif %}
|
||||
{% include '_people.html' with people=item.genre role='类型' max=2 %}
|
||||
{% include '_people.html' with people=item.playwright role='编剧' max=2 %}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% block brief %}
|
||||
<div class="multi-fields">
|
||||
{% if item.rating %}
|
||||
<span class="solo-hidden">{{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分)</span>
|
||||
<span class="solo-hidden">{{ item.rating | floatformat:1 }} <small>({{ item.rating_count }}人评分)</small></span>
|
||||
{% endif %}
|
||||
{% include '_people.html' with people=item.genre role='类型' max=2 %}
|
||||
{% include '_people.html' with people=item.language role='语言' max=5 %}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% block brief %}
|
||||
<div class="multi-fields">
|
||||
{% if item.rating %}
|
||||
<span class="solo-hidden">{{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分)</span>
|
||||
<span class="solo-hidden">{{ item.rating | floatformat:1 }} <small>({{ item.rating_count }}人评分)</small></span>
|
||||
{% endif %}
|
||||
{% include '_people.html' with people=item.hosts role='主播' max=5 %}
|
||||
</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% block brief %}
|
||||
<div class="multi-fields">
|
||||
{% if item.rating %}
|
||||
<span class="solo-hidden">{{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分)</span>
|
||||
<span class="solo-hidden">{{ item.rating | floatformat:1 }} <small>({{ item.rating_count }}人评分)</small></span>
|
||||
{% endif %}
|
||||
{% include '_people.html' with people=item.director role='导演' max=2 %}
|
||||
{% include '_people.html' with people=item.actor role='主演' max=2 %}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% block brief %}
|
||||
<div class="multi-fields">
|
||||
{% if item.rating %}
|
||||
<span class="solo-hidden">{{ item.rating | floatformat:1 }} ({{ item.rating_count }}人评分)</span>
|
||||
<span class="solo-hidden">{{ item.rating | floatformat:1 }} <small>({{ item.rating_count }}人评分)</small></span>
|
||||
{% endif %}
|
||||
{% include '_people.html' with people=item.director role='导演' max=2 %}
|
||||
{% include '_people.html' with people=item.actor role='主演' max=2 %}
|
||||
|
|
|
@ -27,6 +27,14 @@
|
|||
</head>
|
||||
<body>
|
||||
{% include "_header.html" with current="discover" %}
|
||||
<script>
|
||||
function _scroll_left(el){
|
||||
el.scrollBy(0-el.offsetWidth, 0);
|
||||
}
|
||||
function _scroll_right(el){
|
||||
el.scrollBy(el.offsetWidth, 0);
|
||||
}
|
||||
</script>
|
||||
<main>
|
||||
<div class="grid__main">
|
||||
<div class="sortable">
|
||||
|
@ -34,6 +42,18 @@
|
|||
<section class="entity-sort shelf"
|
||||
id="{{ gallery.name }}"
|
||||
{% if not gallery.items %}style="display:none;"{% endif %}>
|
||||
<span class="action">
|
||||
<span>
|
||||
<a _="on click set el to the next
|
||||
<ul/>
|
||||
then call el.scrollBy({left:-el.offsetWidth, behavior:'smooth'})"><i class="fa-solid fa-circle-left"></i></a>
|
||||
</span>
|
||||
<span>
|
||||
<a _="on click set el to the next
|
||||
<ul/>
|
||||
then call el.scrollBy({left:el.offsetWidth, behavior:'smooth'})"><i class="fa-solid fa-circle-right"></i></a>
|
||||
</span>
|
||||
</span>
|
||||
<h5>{{ gallery.title }}</h5>
|
||||
<ul class="cards">
|
||||
{% for item in gallery.items %}
|
||||
|
|
|
@ -106,6 +106,12 @@ details {
|
|||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.shelf {
|
||||
.action {
|
||||
margin-top: 0.1em;
|
||||
}
|
||||
}
|
||||
|
||||
.action {
|
||||
width: max-content;
|
||||
float: right;
|
||||
|
|
|
@ -42,6 +42,18 @@
|
|||
<div class="sortable">
|
||||
{% if request.user.is_authenticated %}
|
||||
<section class="entity-sort shelf" id="calendar_grid">
|
||||
<span class="action">
|
||||
<span>
|
||||
<a _="on click set el to the next
|
||||
<ul/>
|
||||
then call el.scrollBy({left:-el.offsetWidth, behavior:'smooth'})"><i class="fa-solid fa-circle-left"></i></a>
|
||||
</span>
|
||||
<span>
|
||||
<a _="on click set el to the next
|
||||
<ul/>
|
||||
then call el.scrollBy({left:el.offsetWidth, behavior:'smooth'})"><i class="fa-solid fa-circle-right"></i></a>
|
||||
</span>
|
||||
</span>
|
||||
<h5>
|
||||
书影音日历
|
||||
{% if year %}
|
||||
|
@ -67,6 +79,18 @@
|
|||
<section class="entity-sort shelf"
|
||||
id="{{ category }}_{{ shelf_type }}"
|
||||
{% if not shelf.count %}style="display:none;"{% endif %}>
|
||||
<span class="action">
|
||||
<span>
|
||||
<a _="on click set el to the next
|
||||
<ul/>
|
||||
then call el.scrollBy({left:-el.offsetWidth, behavior:'smooth'})"><i class="fa-solid fa-circle-left"></i></a>
|
||||
</span>
|
||||
<span>
|
||||
<a _="on click set el to the next
|
||||
<ul/>
|
||||
then call el.scrollBy({left:el.offsetWidth, behavior:'smooth'})"><i class="fa-solid fa-circle-right"></i></a>
|
||||
</span>
|
||||
</span>
|
||||
<h5>
|
||||
{{ shelf.title }}
|
||||
<small>
|
||||
|
@ -94,6 +118,18 @@
|
|||
<section class="entity-sort shelf"
|
||||
id="collection_created"
|
||||
{% if not collections_count %}style="display:none;"{% endif %}>
|
||||
<span class="action">
|
||||
<span>
|
||||
<a _="on click set el to the next
|
||||
<ul/>
|
||||
then call el.scrollBy({left:-el.offsetWidth, behavior:'smooth'})"><i class="fa-solid fa-circle-left"></i></a>
|
||||
</span>
|
||||
<span>
|
||||
<a _="on click set el to the next
|
||||
<ul/>
|
||||
then call el.scrollBy({left:el.offsetWidth, behavior:'smooth'})"><i class="fa-solid fa-circle-right"></i></a>
|
||||
</span>
|
||||
</span>
|
||||
<h5>
|
||||
{% trans '创建的收藏单' %}
|
||||
<small>
|
||||
|
@ -122,6 +158,18 @@
|
|||
<section class="entity-sort shelf"
|
||||
id="collection_marked"
|
||||
{% if not liked_collections_count %}style="display:none;"{% endif %}>
|
||||
<span class="action">
|
||||
<span>
|
||||
<a _="on click set el to the next
|
||||
<ul/>
|
||||
then call el.scrollBy({left:-el.offsetWidth, behavior:'smooth'})"><i class="fa-solid fa-circle-left"></i></a>
|
||||
</span>
|
||||
<span>
|
||||
<a _="on click set el to the next
|
||||
<ul/>
|
||||
then call el.scrollBy({left:el.offsetWidth, behavior:'smooth'})"><i class="fa-solid fa-circle-right"></i></a>
|
||||
</span>
|
||||
</span>
|
||||
<h5>
|
||||
{% trans '喜欢的收藏单' %}
|
||||
<small>
|
||||
|
|
|
@ -310,7 +310,6 @@ def collection_edit(request: AuthedHttpRequest, collection_uuid=None):
|
|||
raise BadRequest()
|
||||
|
||||
|
||||
@login_required
|
||||
@target_identity_required
|
||||
def user_collection_list(request: AuthedHttpRequest, user_name):
|
||||
target = request.target_identity
|
||||
|
@ -332,7 +331,6 @@ def user_collection_list(request: AuthedHttpRequest, user_name):
|
|||
)
|
||||
|
||||
|
||||
@login_required
|
||||
@target_identity_required
|
||||
def user_liked_collection_list(request: AuthedHttpRequest, user_name):
|
||||
target = request.target_identity
|
||||
|
|
Loading…
Add table
Reference in a new issue