moved over to new ENTRY based data structures for loading from DB and viewing content

This commit is contained in:
2021-01-19 17:33:10 +11:00
parent 2bd25c3e18
commit 31d45e80b6
4 changed files with 63 additions and 23 deletions

View File

@@ -24,15 +24,15 @@
</div>
<br>
<div class="row">
{% for obj in file_data %}
{% if obj.type != "Directory" %}
{% for obj in entry_data %}
{% if obj.type.name != "Directory" %}
<center>
<figure class="figure px-2" font-size: 24px;>
{% if obj.type=="Image" %}
<a href="{{obj.path_prefix}}/{{obj.name}}"><img class="thumb" height="128" src="data:image/jpeg;base64,{{obj.thumbnail}}"></img></a>
{% elif obj.type == "Video" %}
{% if obj.type.name=="Image" %}
<a href="{{obj.in_dir[0].path_prefix}}/{{obj.name}}"><img class="thumb" height="128" src="data:image/jpeg;base64,{{obj.file_details[0].thumbnail}}"></img></a>
{% elif obj.type.name == "Video" %}
<div style="position:relative; width:100%">
<img class="thumb" style="display:block" height="128" src="data:image/jpeg;base64,{{obj.thumbnail}}"></img>
<img class="thumb" style="display:block" height="128" src="data:image/jpeg;base64,{{obj.file_details[0].thumbnail}}"></img>
<div style="position:absolute; top: 2; left: 2;">
<i style="font-size:32;background-color:black;color:white" class="fas fa-film"></i>
</div>