fix bug where back button goes missing if you go into an empty folder
This commit is contained in:
@@ -110,10 +110,29 @@
|
|||||||
{% if folders or grouping == "None" %}
|
{% if folders or grouping == "None" %}
|
||||||
<div class="row pl-3">
|
<div class="row pl-3">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{# rare event of empty folder, still need to show back button #}
|
||||||
|
{% if folders and entry_data|length == 0 %}
|
||||||
|
{% if cwd != root %}
|
||||||
|
<figure class="px-1 dir" dir="{{cwd|ParentPath}}">
|
||||||
|
<span style="font-size:{{(size|int-22)/2}}" class="fa-stack">
|
||||||
|
<i style="color:grey" class="fas fa-folder fa-stack-2x"></i>
|
||||||
|
<i class="fas fa-level-up-alt fa-flip-horizontal fa-stack-1x fa-inverse"></i>
|
||||||
|
</span>
|
||||||
|
<figcaption class="figure-caption text-center">Back</figcaption>
|
||||||
|
</figure class="figure">
|
||||||
|
{% else %}
|
||||||
|
{# create an even lighter-grey, unclickable back button - so folders dont jump around when you go into them #}
|
||||||
|
<span style="font-size:{{(size|int-22)/2}}" class="fa-stack">
|
||||||
|
<i style="color:lightgrey" class="fas fa-folder fa-stack-2x"></i>
|
||||||
|
<i class="fas fa-level-up-alt fa-flip-horizontal fa-stack-1x fa-inverse"></i>
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% for obj in entry_data %}
|
{% for obj in entry_data %}
|
||||||
{% if loop.index==1 and folders %}
|
{% if loop.index==1 and folders %}
|
||||||
{% if cwd != root %}
|
{% if cwd != root %}
|
||||||
<figure class="px-1 dir" dir={{cwd|ParentPath}}>
|
<figure class="px-1 dir" dir="{{cwd|ParentPath}}">
|
||||||
<span style="font-size:{{(size|int-22)/2}}" class="fa-stack">
|
<span style="font-size:{{(size|int-22)/2}}" class="fa-stack">
|
||||||
<i style="color:grey" class="fas fa-folder fa-stack-2x"></i>
|
<i style="color:grey" class="fas fa-folder fa-stack-2x"></i>
|
||||||
<i class="fas fa-level-up-alt fa-flip-horizontal fa-stack-1x fa-inverse"></i>
|
<i class="fas fa-level-up-alt fa-flip-horizontal fa-stack-1x fa-inverse"></i>
|
||||||
@@ -196,7 +215,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{# if this dir is the toplevel of the cwd, show the folder icon #}
|
{# if this dir is the toplevel of the cwd, show the folder icon #}
|
||||||
{% if dirname| TopLevelFolderOf(cwd) %}
|
{% if dirname| TopLevelFolderOf(cwd) %}
|
||||||
<figure class="px-1 dir" dir={{dirname}}>
|
<figure class="px-1 dir" dir="{{dirname}}">
|
||||||
<i style="font-size:{{size|int-22}};" class="fas fa-folder"></i>
|
<i style="font-size:{{size|int-22}};" class="fas fa-folder"></i>
|
||||||
<figcaption class="figure-caption text-center">{{obj.name}}</figcaption>
|
<figcaption class="figure-caption text-center">{{obj.name}}</figcaption>
|
||||||
</figure class="figure">
|
</figure class="figure">
|
||||||
|
|||||||
Reference in New Issue
Block a user