From ae4d75ecde063f8902bdb99cf18dfc5d55dff221 Mon Sep 17 00:00:00 2001 From: Kfir Hadas Date: Thu, 25 May 2017 15:16:29 +0300 Subject: [PATCH] Show first level's items based on amount Currently set to show when list has 20 items or less --- nyaa/static/css/main.css | 7 +++++++ nyaa/templates/view.html | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/nyaa/static/css/main.css b/nyaa/static/css/main.css index 1204d03..7be8108 100755 --- a/nyaa/static/css/main.css +++ b/nyaa/static/css/main.css @@ -295,13 +295,20 @@ a.text-purple:hover, a.text-purple:active, a.text-purple:focus { color: #a760e0; .torrent-file-list ul { padding: 5px 20px 0px 20px; list-style: none; + display: none; } .torrent-file-list > ul { + display: block; /* First level always visible */ padding: 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) { margin-bottom: 5px; } diff --git a/nyaa/templates/view.html b/nyaa/templates/view.html index 19ef6bc..8ddb923 100644 --- a/nyaa/templates/view.html +++ b/nyaa/templates/view.html @@ -98,7 +98,7 @@ {% if value is iterable %}
  • {{ key }} -
  • {% else %}