animate the unhide and sort related books
This commit is contained in:
parent
41a98d77a6
commit
c703e2e4ff
3 changed files with 15 additions and 2 deletions
|
@ -171,6 +171,7 @@ class Edition(Item):
|
|||
.exclude(pk=self.pk)
|
||||
.exclude(is_deleted=True)
|
||||
.exclude(merged_to_item__isnull=False)
|
||||
.order_by("title")
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -84,9 +84,9 @@
|
|||
</div>
|
||||
{% if dup_items %}
|
||||
<p class="empty">
|
||||
已从结果中略去了来自同一著作或有相同标识号的 {{ dup_items|length }}个条目,<a href="#" _="on click toggle .hidden on #dup">点击这里可重新显示</a>
|
||||
已从结果中略去了来自同一著作或有相同标识号的 {{ dup_items|length }}个条目,<a _="on click toggle .unfold on #dup">点击这里可重新显示</a>
|
||||
</p>
|
||||
<div class="item-card-list hidden" id="dup">
|
||||
<div class="item-card-list folded" id="dup">
|
||||
{% for item in dup_items %}
|
||||
{% with "list_item_"|add:item.class_name|add:".html" as template %}
|
||||
{% include template with show_tags=1 %}
|
||||
|
|
|
@ -27,6 +27,18 @@
|
|||
visibility: hidden;
|
||||
}
|
||||
|
||||
.folded {
|
||||
max-height: 0;
|
||||
transform: scaleY(0);
|
||||
transform-origin: top;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.folded.unfold {
|
||||
max-height: max-content;
|
||||
transform: scaleY(1);
|
||||
}
|
||||
|
||||
a:not(:hover) {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue