mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-12-22 18:39:59 +00:00
Show first level's items based on amount
Currently set to show when list has 20 items or less
This commit is contained in:
parent
e0ffadb08c
commit
ae4d75ecde
|
@ -295,13 +295,20 @@ a.text-purple:hover, a.text-purple:active, a.text-purple:focus { color: #a760e0;
|
||||||
.torrent-file-list ul {
|
.torrent-file-list ul {
|
||||||
padding: 5px 20px 0px 20px;
|
padding: 5px 20px 0px 20px;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.torrent-file-list > ul {
|
.torrent-file-list > ul {
|
||||||
|
display: block; /* First level always visible */
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.torrent-file-list ul[data-show] {
|
||||||
|
/* Used to show first level's items based on amount */
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
.torrent-file-list li:not(:last-of-type) {
|
.torrent-file-list li:not(:last-of-type) {
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
{% if value is iterable %}
|
{% if value is iterable %}
|
||||||
<li>
|
<li>
|
||||||
<a href="" class="folder"><i class="fa fa-folder-open"></i>{{ key }}</a>
|
<a href="" class="folder"><i class="fa fa-folder-open"></i>{{ key }}</a>
|
||||||
<ul>{{ '\n' + loop(value.items()) }}
|
<ul{% if not loop.depth0 and value.items()|length <= 20 %} data-show="yes"{% endif %}>{{ '\n' + loop(value.items()) }}
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
Loading…
Reference in a new issue