Starting to refactor website sharing so set_file_info builds a dict of all files, and path_logic will display any arbitrary file, or directory listing if no index.html is present

This commit is contained in:
Micah Lee 2019-05-10 13:43:46 -07:00
parent c378a32c51
commit 65a7a1790c
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
2 changed files with 102 additions and 90 deletions

View file

@ -8,11 +8,6 @@
<body>
<header class="clearfix">
<div class="right">
<ul>
<li>Total size: <strong>{{ filesize_human }}</strong></li>
</ul>
</div>
<img class="logo" src="/static/img/logo.png" title="OnionShare">
<h1>OnionShare</h1>
</header>
@ -24,17 +19,29 @@
<th></th>
</tr>
{% for info in file_info.files %}
{% for info in dirs %}
<tr>
<td>
<img width="30" height="30" title="" alt="" src="/static/img/web_folder.png" />
<a href="/{{ path }}/{{ info.basename }}">
{{ info.basename }}
</a>
</td>
<td></td>
</tr>
{% endfor %}
{% for info in files %}
<tr>
<td>
<img width="30" height="30" title="" alt="" src="/static/img/web_file.png" />
{{ info.basename }}
<a href="/{{ path }}/{{ info.basename }}">
{{ info.basename }}
</a>
</td>
<td>{{ info.size_human }}</td>
<td><a href="/download/{{ info.basename }}">download</td>
</tr>
{% endfor %}
</table>
<script src="/static/js/send.js"></script>
</body>
</html>