made file_list.html better as well
This commit is contained in:
@@ -6,19 +6,32 @@
|
||||
<thead><tr class="thead-light"><th>Name</th><th>Size (MB)</th><th>Hash</th></tr></thead><tbody>
|
||||
{% for obj in file_data.view_list %}
|
||||
<tr><td>
|
||||
{% if obj.type=="Directory" %}
|
||||
<i class="fas fa-folder"></i>
|
||||
{% elif obj.type=="Image" %}
|
||||
<i class="fas fa-file-image"></i>
|
||||
{% elif obj.type=="Video" %}
|
||||
<i class="fas fa-file-video"></i>
|
||||
{% else %}
|
||||
<i class="fas fa-question-circle"></i>
|
||||
{% endif %}
|
||||
{% if obj.type=="Image" %}
|
||||
<a href="{{file_data.symlink}}/{{obj.name}}"><img width="128" height="128" src="data:image/jpeg;base64,{{obj.thumbnail}}"></img></a>
|
||||
{% endif %}
|
||||
{{obj.name}}
|
||||
{% if obj.type == "Directory" %}
|
||||
<i style="font-size:48;" class="fas fa-folder"></i><br><span class="figure-caption">{{obj.name}}</span>
|
||||
{% else %}
|
||||
<figure class="figure" font-size: 24px;>
|
||||
<div style="position:relative; width:100%">
|
||||
{% if obj.type=="Image" %}
|
||||
{% set icon="fa-file-image" %}
|
||||
<a href="{{obj.path_prefix}}/{{obj.name}}">
|
||||
{% elif obj.type == "Video" %}
|
||||
{% set icon="fa-film" %}
|
||||
{% elif obj.type == "Directory" %}
|
||||
{% set icon="fa-folder" %}
|
||||
{% else %}
|
||||
{% set icon="fa-question-circle" %}
|
||||
{% endif %}
|
||||
<img class="thumb" style="display:block" height="48" src="data:image/jpeg;base64,{{obj.thumbnail}}"></img>
|
||||
{% if obj.type=="Image" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
<div style="position:absolute; top: 2; left: 2;">
|
||||
<i style="font-size:16;background-color:black;color:white" class="fas {{icon}}"></i>
|
||||
</div>
|
||||
</div>
|
||||
<figcaption class="figure-caption">{{obj.name}}</figcaption>
|
||||
</figure>
|
||||
{% endif %}
|
||||
</td></td><td>{{obj.size_mb}}</td><td>{{obj.hash}}</tr>
|
||||
{% endfor %}
|
||||
</tbody></table>
|
||||
|
||||
Reference in New Issue
Block a user