Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve file list #66

Merged
merged 3 commits into from May 15, 2017
Merged

Improve file list #66

merged 3 commits into from May 15, 2017

Conversation

sharkykh
Copy link
Contributor

@sharkykh sharkykh commented May 15, 2017

This is very, very simple, based on the table that currently exists.
Ideally, it should be done using <li> & <ul>, and allow for collapsing every directory tree (separately).
But I don't think I'm capable of doing that.

This configuration should be good in the meantime.

Preview:
image

@ReimuHakurei
Copy link
Contributor

That looks awesome!

One tiny thing: It'd be nice, based on your screenshots, for there to be a space in between the folder icons and the filenames.

@sharkykh
Copy link
Contributor Author

sharkykh commented May 15, 2017

@ReimuHakurei Well, there is a space character after the icon. I'll try something else.

Thanks!

@TheAMM
Copy link
Contributor

TheAMM commented May 15, 2017

👍
I haven't fiddled with Bootstrap much, but does collapse and relevant classes work? If you want to test that I'll wait a bit until I merge, but I can prod it later as well.

@sharkykh
Copy link
Contributor Author

@TheAMM
I did try with collapse before opening the PR. It's a bit more complicated since it's a table and the items are not nested like you can do with HTML lists.

@TheAMM
Copy link
Contributor

TheAMM commented May 15, 2017

Ah, right. Well, that can be iterated upon later, for now this looks a whole lot better than a flat list.

@TheAMM TheAMM merged commit 7b78bcc into nyaadevs:master May 15, 2017
@sharkykh
Copy link
Contributor Author

@TheAMM
Just a small fix you can push yourself (fixes the spacing between the icon and the folder name)

nyaa/templates/view.html

@@ -89,11 +89,11 @@
        <tr> 
          {%- if value is iterable %} 
          <td colspan="2" {% if loop.depth0 is greaterthan 0 %}style="padding-left: {{ loop.depth0 * 20 }}px"{% endif %}> 
-            <i class="glyphicon glyphicon-folder-open"></i> <b>{{ key }}</b></td> 
+            <i class="glyphicon glyphicon-folder-open"></i>&nbsp;&nbsp;<b>{{ key }}</b></td> 
          {{ loop(value.items()) }} 
          {%- else %} 
          <td style="padding-left: {{ loop.depth0 * 20 }}px"> 
-            <i class="glyphicon glyphicon-file"></i> {{ key }}</td> 
+            <i class="glyphicon glyphicon-file"></i>&nbsp;{{ key }}</td> 
          <td class="col-md-2">{{ value | filesizeformat(True) }}</td> 
          {%- endif %} 
        </tr> 

@sharkykh sharkykh deleted the improve-file-list branch May 15, 2017 06:45
TheAMM added a commit that referenced this pull request May 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants