autoindex/filelist.tpl

60 lines
2.4 KiB
Smarty
Raw Normal View History

2017-04-29 03:17:22 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
2019-03-08 15:35:21 +00:00
<title>Directory Index: /{{ path }}</title>
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" />
<link href="/~static/darkly.css" rel="stylesheet" type="text/css" />
<link href="/~static/icons.css" rel="stylesheet" type="text/css" />
2017-04-29 03:17:22 +00:00
<style>
2019-03-08 15:35:21 +00:00
table tbody tr td {
padding: 0 !important;
}
table tbody tr td a,
table tbody tr td span {
2017-04-29 03:17:22 +00:00
display: block;
2019-03-08 15:35:21 +00:00
padding: .3rem;
2017-04-29 03:17:22 +00:00
}
</style>
</head>
<body>
2019-03-08 15:35:21 +00:00
<div class="container" style="padding: 15px 0">
<h1 class="h3">Directory Index: /{{ path }}</h1>
<table class="table table-hover table-bordered table-sm">
2017-04-29 03:17:22 +00:00
<thead>
<tr>
<th><a href="{{ get_sort_link(sort, 'name', hidden) }}">
2019-03-08 15:35:21 +00:00
Name {{ get_sort_icon('name', sort) | safe }}
2017-04-29 03:17:22 +00:00
</a></th>
<th style="width: 100px;"><a href="{{ get_sort_link(sort, 'size', hidden) }}">
2019-03-08 15:35:21 +00:00
Size {{ get_sort_icon('size', sort) | safe }}
2017-04-29 03:17:22 +00:00
</a></th>
<th style="width: 170px;"><a href="{{ get_sort_link(sort, 'created', hidden) }}">
2019-03-08 15:35:21 +00:00
Created {{ get_sort_icon('created', sort) | safe }}
2017-04-29 03:17:22 +00:00
</a></th>
</tr>
</thead>
<tbody>
2019-03-08 15:35:21 +00:00
{% for item in lst %}
{% with dir=item.is_dir, file=not item.is_dir %}
2017-04-29 17:19:39 +00:00
<tr>
2019-03-08 15:35:21 +00:00
<td>
<a href="{{ item.link_name }}{% if dir %}{{ query }}{% endif %}" {% if file %}target="_blank"{% endif %}>
2019-03-08 15:35:21 +00:00
{{ item.icon | safe }} {{ item.display_name }}
2017-04-29 17:19:39 +00:00
</a>
2017-04-29 03:17:22 +00:00
</td>
2019-03-08 15:35:21 +00:00
<td>{% if file %}<span title="{{ item.size }} bytes">{{ item.formatted_size }}</span>{% endif %}</td>
<td><span>{{ item.formatted_date }}</span></td>
2017-04-29 03:17:22 +00:00
</tr>
2019-03-08 15:35:21 +00:00
{% endwith %}
{% endfor %}
2017-04-29 03:17:22 +00:00
</tbody>
</table>
2019-03-08 16:17:53 +00:00
<small class="d-flex text-muted">
<a href="https://t.me/bakatrouble" target="_blank" class="mr-auto">@bakatrouble</a>
<a href="https://gitea.bakatrouble.me/bakatrouble/autoindex" target="_blank">Source code</a>
</small>
2017-04-29 03:17:22 +00:00
</div>
</body>
</html>