{% extends base.html %} {% block content %} {% import urllib.parse, re %} {% if handler.show_upload %}

点击上传或将文件拖拽到此处

{% end %}
{% set paths = handler.request.path.rstrip('/').split('/') %}
{% for i, path in enumerate(paths) %} {% if i >= (2 if handler.opt.auth else 1) %} {% if (i == 2 and handler.opt.auth) or i == 1 %}主页{% else %}{{ urllib.parse.unquote(path) }}{% end %} {% end %} {% end %}
{# #} {% if handler.show_upload %} {% end %} {# #} {% if handler.show_delete %} {% end %} {% if handler.show_share %} {% end %}
{% if handler.get_cookie('table') %}
{% set col = 2 %} {% for doc in entries %}
{% set icon = 'folder.png' if doc.is_dir else handler.icon.get(doc.path.suffix.lower(), 'file.png') %} {% set suffix = doc.path.suffix.lower()[1:] %} {% if handler.is_preview and re.match('(jpeg|jpg|png|gif|bmp|webp|svg|tif|webp|ai|ico)$', suffix) %} {% else %} {% set icon = 'folder.png' if doc.is_dir else handler.icon.get(doc.path.suffix.lower(), 'file.png') %} {% end %} {{ doc.path.name }}
{% if handler.show_delete %} {% end %}
{% end %}
{% else %} {% if handler.request.path.startswith('/share') %} {% else %} {% end %} {% for doc in entries %} {% set suffix = doc.path.suffix.lower()[1:] %} {% if handler.request.path.startswith('/share') %} {% else %} {% end %} {% end %}
文件名{% if handler.args.sort == 'name' and handler.args.order == 1 %}{% elif handler.args.sort == 'name' and handler.args.order == - 1 %}{% end %}过期时间修改时间{% if handler.args.sort == 'mtime' and handler.args.order == 1 %}{% elif handler.args.sort == 'mtime' and handler.args.order == - 1 %}{% end %}文件大小{% if handler.args.sort == 'size' and handler.args.order == 1 %}{% elif handler.args.sort == 'size' and handler.args.order == - 1 %}{% end %} 文件操作
{% if handler.is_preview and re.match('(jpeg|jpg|png|gif|bmp|webp|svg|tif|webp|ai|ico)$', suffix) %} {% elif handler.is_preview and re.match('(mp3|ogg|amr|wav)$', suffix) %} {% else %} {% set icon = 'folder.png' if doc.is_dir else handler.icon.get(doc.path.suffix.lower(), 'file.png') %} {% end %} {{ doc.path if handler.args.q else doc.path.name }} {{ doc.expired_at or '2099-12-31 00:00:00' }} {{ handler.convert_time(doc.mtime) }}{{ handler.convert_size(doc.size) }} {% if handler.show_delete %} {% end %} {% if handler.show_share %} {% end %} {% if False %} {% end %}
{% end %}
{% end %}