Files
photoassistant/templates/file_list.html

41 lines
1.7 KiB
HTML

{% extends "base.html" %} {% block main_content %}
<div class="container">
<h3 class="offset-lg-2">{{page_title}} -- {{file_data.view_path}}</h3>
<div class="row">
<table class="table table-striped table-sm col-xl-12">
<thead><tr class="thead-light"><th>Name</th><th>Size (MB)</th><th>Path Prefix</th><th>Hash</th></tr></thead><tbody>
{% for obj in file_data.view_list %}
<tr><td>
{% 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.path_prefix}}</td><td>{{obj.hash}}</tr>
{% endfor %}
</tbody></table>
</div class="row">
</div class="container">
{% endblock main_content %}