mirror of
https://github.com/onionshare/onionshare.git
synced 2025-08-01 10:56:22 -04:00
Allow directory listing work with or without trailing slash (removing trailing slash by default), and make directory listing links absolute instead of relative
This commit is contained in:
parent
8a45de8241
commit
e950cc5fe8
3 changed files with 75 additions and 60 deletions
|
@ -1,55 +1,59 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>OnionShare</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon" />
|
||||
<link href="{{ static_url_path }}/css/style.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header class="clearfix">
|
||||
<img class="logo" src="{{ static_url_path }}/img/logo.png" title="OnionShare">
|
||||
<h1>OnionShare</h1>
|
||||
</header>
|
||||
<head>
|
||||
<title>OnionShare</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon" />
|
||||
<link href="{{ static_url_path }}/css/style.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
|
||||
{% if breadcrumbs %}
|
||||
<ul class="breadcrumbs">
|
||||
{% for breadcrumb in breadcrumbs %}<li><a href="{{ breadcrumb[1] }}">{{ breadcrumb[0] }}</a> <span class="sep">‣</span></li>{% endfor %}<li>{{ breadcrumbs_leaf }}</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
<body>
|
||||
|
||||
<table class="file-list" id="file-list">
|
||||
<tr>
|
||||
<th id="filename-header">Filename</th>
|
||||
<th id="size-header">Size</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<header class="clearfix">
|
||||
<img class="logo" src="{{ static_url_path }}/img/logo.png" title="OnionShare">
|
||||
<h1>OnionShare</h1>
|
||||
</header>
|
||||
|
||||
{% for info in dirs %}
|
||||
<tr>
|
||||
<td>
|
||||
<img width="30" height="30" title="" alt="" src="{{ static_url_path }}/img/web_folder.png" />
|
||||
<a href="{{ info.basename }}">
|
||||
{{ info.basename }}
|
||||
</a>
|
||||
</td>
|
||||
<td>—</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% if breadcrumbs %}
|
||||
<ul class="breadcrumbs">
|
||||
{% for breadcrumb in breadcrumbs %}<li><a href="{{ breadcrumb[1] }}">{{ breadcrumb[0] }}</a> <span
|
||||
class="sep">‣</span></li>{% endfor %}<li>{{ breadcrumbs_leaf }}</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% for info in files %}
|
||||
<tr>
|
||||
<td>
|
||||
<img width="30" height="30" title="" alt="" src="{{ static_url_path }}/img/web_file.png" />
|
||||
<a href="{{ info.basename }}">
|
||||
{{ info.basename }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ info.size_human }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
<table class="file-list" id="file-list">
|
||||
<tr>
|
||||
<th id="filename-header">Filename</th>
|
||||
<th id="size-header">Size</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
{% for info in dirs %}
|
||||
<tr>
|
||||
<td>
|
||||
<img width="30" height="30" title="" alt="" src="{{ static_url_path }}/img/web_folder.png" />
|
||||
<a href="{{ info.link }}">
|
||||
{{ info.basename }}
|
||||
</a>
|
||||
</td>
|
||||
<td>—</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
{% for info in files %}
|
||||
<tr>
|
||||
<td>
|
||||
<img width="30" height="30" title="" alt="" src="{{ static_url_path }}/img/web_file.png" />
|
||||
<a href="{{ info.link }}">
|
||||
{{ info.basename }}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ info.size_human }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue