Fix templates

This commit is contained in:
bakatrouble 2017-05-03 21:55:45 +03:00
parent 9902f86ee0
commit 304e84eba5
2 changed files with 24 additions and 20 deletions

View File

@ -5,6 +5,7 @@ from mimetypes import guess_type
base_hosts = [ base_hosts = [
'drop.bakatrouble.pw', 'drop.bakatrouble.pw',
'127.0.0.1.xip.io:8080',
] ]

View File

@ -13,12 +13,12 @@
position: relative; position: relative;
} }
table tbody tr a { table tbody tr a {
display: block; /*display: block;*/
position: absolute; /*position: absolute;*/
top: 0; /*top: 0;*/
left: 0; /*left: 0;*/
right: 0; /*right: 0;*/
bottom: 0; /*bottom: 0;*/
} }
</style> </style>
</head> </head>
@ -41,31 +41,34 @@
</thead> </thead>
<tbody> <tbody>
% if path: % if path:
<tr style="cursor: pointer"> <tr>
<td> <td class="selectable">
<a href="../{{ f'?{query}' if query else '' }}"></a> <a href="../{{ f'?{query}' if query else '' }}">
<i class="level up icon"></i> <i class="level up icon"></i>
../ ../
</a>
</td> </td>
<td></td> <td></td>
<td></td> <td></td>
</tr> </tr>
% end % end
% for item in lst: % for item in lst:
<tr style="cursor: pointer"> <tr>
% if item.isdir: % if item.isdir:
<td> <td class="selectable">
<a href="{{ item.name }}/{{ f'?{query}' if query else '' }}"></a> <a href="{{ item.name }}/{{ f'?{query}' if query else '' }}">
<i class="folder outline icon"></i> <i class="folder outline icon"></i>
{{ item.name }}/ {{ item.name }}/
</a>
</td> </td>
<td></td> <td></td>
<td></td> <td></td>
% else: % else:
<td> <td class="selectable">
<a href="/_/{{ path }}{{ item.name }}" target="_blank"></a> <a href="/_/{{ path }}{{ item.name }}" target="_blank">
<i class="file {{ get_file_icon(item.name) }} outline icon"></i> <i class="file {{ get_file_icon(item.name) }} outline icon"></i>
{{ item.name }} [{{ guess_type(item.name)[0] }}] {{ item.name }} [{{ guess_type(item.name)[0] }}]
</a>
</td> </td>
<td><span title="{{ item.size }} byte(s)">{{ format_size(item.size) }}</span></td> <td><span title="{{ item.size }} byte(s)">{{ format_size(item.size) }}</span></td>
<td>{{ format_date(item.created) }}</td> <td>{{ format_date(item.created) }}</td>