From adbe32746a0a4005131096f61d5fe3afdd1304ef Mon Sep 17 00:00:00 2001 From: shufeng2012 <277665039@qq.com> Date: Wed, 22 Jul 2026 20:10:36 +0800 Subject: [PATCH 01/16] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8Djs?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E6=9C=AA=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/public/dnfs.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/public/dnfs.html b/static/public/dnfs.html index 0b4bdd0..7637f0d 100644 --- a/static/public/dnfs.html +++ b/static/public/dnfs.html @@ -53,7 +53,7 @@ - - + + From 779d6ec887d28d70292bde826f0d11aa06d5cb13 Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Wed, 22 Jul 2026 20:18:45 +0800 Subject: [PATCH 02/16] =?UTF-8?q?=E8=A7=A3=E8=80=A6=E8=A7=86=E5=9B=BE?= =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/fsys.py | 404 +++++--------------------------------- static/public/__view.html | 331 +++++++++++++++++++++++++++++++ 2 files changed, 378 insertions(+), 357 deletions(-) create mode 100644 static/public/__view.html diff --git a/static/fsys.py b/static/fsys.py index d3f52a0..81ad4fb 100644 --- a/static/fsys.py +++ b/static/fsys.py @@ -60,6 +60,9 @@ SSL_ENABLED = file_config['ssl'].get('enabled', 'false').lower() == 'true' SSL_CERT_FILE = file_config['ssl'].get('cert_file', 'cert.pem') SSL_KEY_FILE = file_config['ssl'].get('key_file', 'key.pem') +# 视图文件名:根路径与目录访问时固定返回此静态文件,由前端 JS 调用 /api/filelist 拉取数据 +VIEW_FILE = '__view.html' + # ==================== 视频文件支持 ==================== VIDEO_MIME_TYPES = { '.mp4': 'video/mp4', '.webm': 'video/webm', '.ogg': 'video/ogg', @@ -106,29 +109,29 @@ def get_file_list(): try: if not FILESYSTEM_ENABLED: return jsonify({'error': '文件系统未启用'}), 403 - + requested_path = request.args.get('path', '') full_path = safe_path_join(HTML_ROOT_DIR, requested_path) - + if full_path is None: return jsonify({'error': '无效的路径'}), 403 - + if not os.path.exists(full_path) or not os.path.isdir(full_path): return jsonify({'error': '目录不存在'}), 404 - + items = [] for item in os.listdir(full_path): if item == '__pycache__': continue - + item_path = os.path.join(full_path, item) item_stat = os.stat(item_path) is_dir = os.path.isdir(item_path) - + item_rel_path = os.path.join(requested_path, item) if requested_path else item - + file_type = 'dir' if is_dir else ('video' if is_video_file(item) else ('audio' if is_audio_file(item) else 'file')) - + items.append({ 'name': item, 'type': file_type, @@ -137,9 +140,9 @@ def get_file_list(): 'size_formatted': format_file_size(item_stat.st_size) if not is_dir else '', 'modified': datetime.datetime.fromtimestamp(item_stat.st_mtime).strftime('%Y-%m-%d %H:%M:%S') }) - + items.sort(key=lambda x: (x['type'] != 'dir', x['name'].lower())) - + return jsonify({ 'success': True, 'path': requested_path or '/', @@ -155,33 +158,33 @@ def stream_video(file_path): try: if not FILESYSTEM_ENABLED: return jsonify({'error': '文件系统未启用'}), 403 - + full_path = safe_path_join(HTML_ROOT_DIR, file_path) if full_path is None or not os.path.exists(full_path) or not os.path.isfile(full_path): return jsonify({'error': '文件不存在'}), 404 - + if not is_video_file(full_path) and not is_audio_file(full_path): return jsonify({'error': '不支持的文件类型'}), 400 - + file_size = os.path.getsize(full_path) mime_type = get_media_mime_type(full_path) - + range_header = request.headers.get('Range', None) - + if range_header: byte_range = range_header.replace('bytes=', '').split('-') start = int(byte_range[0]) if byte_range[0] else 0 end = int(byte_range[1]) if len(byte_range) > 1 and byte_range[1] else file_size - 1 - + if start >= file_size: return jsonify({'error': '请求范围超出文件大小'}), 416 - + length = end - start + 1 - + with open(full_path, 'rb') as f: f.seek(start) data = f.read(length) - + response = Response(data, 206, mimetype=mime_type, direct_passthrough=True) response.headers.add('Content-Range', f'bytes {start}-{end}/{file_size}') response.headers.add('Accept-Ranges', 'bytes') @@ -194,342 +197,38 @@ def stream_video(file_path): logger.error(f"Video streaming error: {str(e)}") return jsonify({'error': str(e)}), 500 -# ==================== 极简版HTML页面(使用字符串拼接,避免花括号问题) ==================== -def get_html_template(path, breadcrumb_html): - """生成HTML页面""" - return f''' - - - - - 文件浏览 - - - -
-

📁 文件浏览

-
- 🏠 - 🔄 -
-
- - - - - -
- 📊 共 0 项 - 📁 0 - 📄 0 - 🎬 0 - 🎵 0 -
- -
-
- ⏳ -
加载中...
-
-
- -
- - - -''' - # ==================== 主路由 ==================== -@app.route('/', defaults={'path': ''}) +@app.route('/') +def serve_view(): + """根路径固定返回 __view.html 静态文件,由前端 JS 调用 /api/filelist 拉取文件系统信息""" + if not FILESYSTEM_ENABLED: + return "文件系统未启用", 403 + view_path = os.path.join(HTML_ROOT_DIR, VIEW_FILE) + if not os.path.exists(view_path): + return f"视图文件 {VIEW_FILE} 不存在", 500 + return send_file(view_path, mimetype='text/html') + @app.route('/') -def serve_file(path=''): +def serve_file(path): try: if not FILESYSTEM_ENABLED: return "文件系统未启用", 403 - + full_path = safe_path_join(HTML_ROOT_DIR, path) if full_path is None: return "无效的路径", 403 - + if not os.path.exists(full_path): return "路径不存在", 404 - + # 文件处理 if os.path.isfile(full_path): if request.args.get('download') == 'true': return send_file(full_path, as_attachment=True, download_name=os.path.basename(full_path)) - + if is_video_file(full_path) or is_audio_file(full_path): return send_file(full_path, mimetype=get_media_mime_type(full_path)) - + # 普通文件 with open(full_path, 'rb') as f: content = f.read() @@ -541,23 +240,13 @@ def serve_file(path=''): '.pdf': 'application/pdf', '.svg': 'image/svg+xml', '.ico': 'image/x-icon' } return Response(content, mimetype=mime_map.get(ext, 'application/octet-stream')) - - # 目录处理 - 生成面包屑 - breadcrumb = '' - if path: - parts = path.split('/') - current = '' - for i, part in enumerate(parts): - if i == len(parts) - 1: - breadcrumb += f'›{part}' - else: - current += part + '/' - breadcrumb += f'›{part}' - - # 使用函数生成HTML,避免字符串格式化问题 - html = get_html_template(path, breadcrumb) - return Response(html, mimetype='text/html') - + + # 目录处理:返回 __view.html,由前端 JS 根据 URL 路径调用 /api/filelist 拉取文件列表 + view_path = os.path.join(HTML_ROOT_DIR, VIEW_FILE) + if os.path.exists(view_path): + return send_file(view_path, mimetype='text/html') + return "目录无法浏览", 404 + except Exception as e: logger.error(f"Error: {str(e)}") import traceback @@ -575,7 +264,7 @@ def health_check(): if __name__ == '__main__': host = file_config['server']['host'] port = int(file_config['server']['port']) - + print("\n" + "="*50) print("📁 文件托管服务器 (极简版)") print("="*50) @@ -589,3 +278,4 @@ if __name__ == '__main__': app.run(host=host, port=port, ssl_context=(SSL_CERT_FILE, SSL_KEY_FILE), debug=False) else: app.run(host=host, port=port, debug=False) + diff --git a/static/public/__view.html b/static/public/__view.html new file mode 100644 index 0000000..e7a6318 --- /dev/null +++ b/static/public/__view.html @@ -0,0 +1,331 @@ + + + + + + 文件浏览 + + + +
+

📁 文件浏览

+
+ 🏠 + 🔄 +
+
+ + + + + +
+ 📊 共 0 项 + 📁 0 + 📄 0 + 🎬 0 + 🎵 0 +
+ +
+
+ ⏳ +
加载中...
+
+
+ +
+ + + + + From 7d8956f0fd22b8c5849d8ef9899a4c2349db9cf6 Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Wed, 22 Jul 2026 12:28:00 +0800 Subject: [PATCH 03/16] =?UTF-8?q?fix(fsys):=20=E4=BC=98=E5=8C=96=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E8=A7=84=E5=88=99=EF=BC=8C=E8=BF=87=E6=BB=A4=E6=89=80?= =?UTF-8?q?=E6=9C=89=E5=8F=8C=E4=B8=8B=E5=88=92=E7=BA=BF=E5=BC=80=E5=A4=B4?= =?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6=E6=96=87=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将原先仅过滤__pycache__的逻辑改为过滤所有以双下划线开头的文件和文件夹,覆盖更多系统内置目录文件 --- static/fsys.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/fsys.py b/static/fsys.py index 81ad4fb..5048bb3 100644 --- a/static/fsys.py +++ b/static/fsys.py @@ -121,7 +121,8 @@ def get_file_list(): items = [] for item in os.listdir(full_path): - if item == '__pycache__': + # 过滤系统项目:以双下划线开头的文件和文件夹(如 __pycache__、__view.html、__icons 等) + if item.startswith('__'): continue item_path = os.path.join(full_path, item) From 85e782128bcedde8aad84a6ea3630fb2acb79163 Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Wed, 22 Jul 2026 12:40:46 +0800 Subject: [PATCH 04/16] =?UTF-8?q?style(webui):=20=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=B5=8F=E8=A7=88=E9=A1=B5=E9=9D=A2UI?= =?UTF-8?q?=E4=B8=8E=E4=BA=A4=E4=BA=92=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 改用CSS变量实现亮色/暗色主题自动切换 2. 将列表布局改为自适应网格卡片布局 3. 优化整体配色与交互动效,提升视觉体验 4. 添加XSS转义处理,增强安全性 5. 重构代码结构,拆分功能模块提升可维护性 6. 优化移动端适配效果 --- static/public/__view.html | 380 ++++++++++++++++++++++++-------------- 1 file changed, 244 insertions(+), 136 deletions(-) diff --git a/static/public/__view.html b/static/public/__view.html index e7a6318..f861606 100644 --- a/static/public/__view.html +++ b/static/public/__view.html @@ -5,146 +5,230 @@ 文件浏览 -
+

📁 文件浏览

-
+
-
+ 🔄 + + - + -
+
⏳
加载中...
-
+
-
+ - From 981430c28ef80ea2c37d3eca9ad5c865cf1d619f Mon Sep 17 00:00:00 2001 From: shufeng2012 <277665039@qq.com> Date: Wed, 22 Jul 2026 16:39:15 +0800 Subject: [PATCH 05/16] =?UTF-8?q?=F0=9F=8E=A8=20=E6=9B=B4=E6=94=B9index.ht?= =?UTF-8?q?ml=E4=B8=AD=E7=9A=84css=20link?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dnfs/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnfs/index.html b/dnfs/index.html index 44262df..3b55581 100644 --- a/dnfs/index.html +++ b/dnfs/index.html @@ -9,7 +9,7 @@ - +
From 2b3125e48fd6ecb287b3d398f4d7e2252ed61c35 Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Wed, 22 Jul 2026 17:15:17 +0800 Subject: [PATCH 06/16] =?UTF-8?q?=E5=88=86=E9=9A=94=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/public/dnfs.html | 2 +- static/public/js/dnfs.js | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/static/public/dnfs.html b/static/public/dnfs.html index c720319..9b4742a 100644 --- a/static/public/dnfs.html +++ b/static/public/dnfs.html @@ -44,7 +44,7 @@
hello

-

其他推荐

+
    diff --git a/static/public/js/dnfs.js b/static/public/js/dnfs.js index aaba971..8f3f8d4 100644 --- a/static/public/js/dnfs.js +++ b/static/public/js/dnfs.js @@ -131,8 +131,7 @@ function load_notes(main_node) { recommend_list.replaceChildren(); //alert(stack.length) if (stack.length > 0) { /* 如果不在根节点 */ - var bak = document.createElement('a'); - //ttl.href = '/dnfs.html'; + var bak = document.createElement('center'); bak.addEventListener('click', function (event) { stack.pop(); var id = (stack.length > 1) ? stack[stack.length - 1] : 0; @@ -145,8 +144,7 @@ function load_notes(main_node) { } for (i in main_node) { item = main_node[i] - var ttl = document.createElement('a'); - //ttl.href ="/dnfs.html"; + var ttl = document.createElement('center'); ttl.addEventListener('click', function(event) { var id = Number(item.id) stack.push(id) @@ -160,6 +158,7 @@ function load_notes(main_node) { renderMarkdown(ctt, item.content); recommend_list.appendChild(ctt) recommend_list.appendChild(document.createElement('br')) + recommend_list.appendChild(document.createElement('hr')) } }; From 7d923fd9a0e720ab652cff8b58c296b8e0d1783d Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Wed, 22 Jul 2026 17:16:32 +0800 Subject: [PATCH 07/16] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/public/dnfs.html | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/static/public/dnfs.html b/static/public/dnfs.html index 9b4742a..0b4bdd0 100644 --- a/static/public/dnfs.html +++ b/static/public/dnfs.html @@ -43,18 +43,7 @@
    hello

    -
    - -
    - +

    节点操作

    From 20f4d61975be38dd925fdb5309429d84380f4b2f Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Wed, 22 Jul 2026 19:29:22 +0800 Subject: [PATCH 08/16] =?UTF-8?q?=E5=A2=9E=E5=8A=A0CSS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/public/dnfs.html | 99 +++++++++++++++++++++++++++++----------- static/public/js/dnfs.js | 9 ++-- 2 files changed, 78 insertions(+), 30 deletions(-) diff --git a/static/public/dnfs.html b/static/public/dnfs.html index 0b4bdd0..60e5bfd 100644 --- a/static/public/dnfs.html +++ b/static/public/dnfs.html @@ -23,37 +23,82 @@ margin-right: 0px; background-color: #cfcfcf; } + + /* by qing */ + body { + min-height: 100vh; + display: flex; + justify-content: center; + align-items: center; + background: #c2ccd0; + font-family: system-ui, -apple-system, "Segoe UI", Roboto,sans-serif; + padding: 1rem; + } + + .box { + width: 90%; + } + + .card { + background-color: #eedeb0; + border: 1px solid #000000; + border-radius: 1.125rem; + padding: 1.5rem 1.25rem; + box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.02); + /*max-width: 480px;*/ + width: 90%; + color: #4d3e2b; + transition: box-shadow 0.2s, border-color 0.2s; + overflow-wrap: break-word; + } + + .card:hover { + border-color: #c7b38a; + box-shadow: 0 10px 24px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.03); + } + + /* 移动端微调 */ + @media (max-width: 480px) { + body { + padding: 0.8rem; + } + + .card { + padding: 1.2rem, 1rem; + border-radius: 1rem; + border-width: 1px; + } + } + + /* 极小屏 (宽度 < 360px) */ + @media (max-width: 360px) { + .card { + padding: 1rem 0.8rem; + border-radius: 0.9rem; + } + } + -
    - -

    title

    +
    +

    title

    - -
    - 发布时间:2026-1-1 +
    +
    hello
    +
    +
    +
    +
    +

    节点操作

    +
    +
    + + +
    + + +
    -
    - 浏览:999 - 点赞:999 - 分享:999 -
    - - -
    hello
    -
    -
    -
    -

    节点操作

    -
    -
    -
    - - -
    - - - diff --git a/static/public/js/dnfs.js b/static/public/js/dnfs.js index 8f3f8d4..392efa8 100644 --- a/static/public/js/dnfs.js +++ b/static/public/js/dnfs.js @@ -144,19 +144,22 @@ function load_notes(main_node) { } for (i in main_node) { item = main_node[i] + var card = document.createElement('div'); + card.className = "card"; var ttl = document.createElement('center'); ttl.addEventListener('click', function(event) { var id = Number(item.id) stack.push(id) getNode(token, id).then(load_notes) }); - var ttl1 =document.createElement('h1'); + var ttl1 =document.createElement('h3'); ttl1.textContent = item.title ttl.appendChild(ttl1) - recommend_list.appendChild(ttl) + card.appendChild(ttl) var ctt = document.createElement('p'); renderMarkdown(ctt, item.content); - recommend_list.appendChild(ctt) + card.appendChild(ctt) + recommend_list.appendChild(card) recommend_list.appendChild(document.createElement('br')) recommend_list.appendChild(document.createElement('hr')) } From 03efcf5ee2749d048ca219d86207663b5d45bcc1 Mon Sep 17 00:00:00 2001 From: qingss0 Date: Wed, 22 Jul 2026 19:34:10 +0800 Subject: [PATCH 09/16] =?UTF-8?q?update:=20=E6=9B=B4=E6=96=B0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=20dnfs.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: qingss0 --- static/public/dnfs.html | 75 +---------------------------------------- 1 file changed, 1 insertion(+), 74 deletions(-) diff --git a/static/public/dnfs.html b/static/public/dnfs.html index 60e5bfd..bee22d1 100644 --- a/static/public/dnfs.html +++ b/static/public/dnfs.html @@ -5,80 +5,7 @@ DNFS · 树状笔记 - +
    From 1d02bd226684098360e4df11e9b258f2510d9d7e Mon Sep 17 00:00:00 2001 From: qingss0 Date: Wed, 22 Jul 2026 19:34:44 +0800 Subject: [PATCH 10/16] =?UTF-8?q?new:=20=E6=96=B0=E5=BB=BA=E6=96=87?= =?UTF-8?q?=E4=BB=B6=20qing.css?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: qingss0 --- static/public/css/qing.css | 71 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 static/public/css/qing.css diff --git a/static/public/css/qing.css b/static/public/css/qing.css new file mode 100644 index 0000000..15168dd --- /dev/null +++ b/static/public/css/qing.css @@ -0,0 +1,71 @@ +code { + color: red; + background-color: rgb(254, 235, 238); + padding: 5px; + border-radius: 5px; +} +pre > code { + display: block; + color: white; + background-color: rgb(96, 96, 96); + padding: 5px; + border-radius: 5px; +} +blockquote { + margin-right: 0px; + background-color: #cfcfcf; +} + +/* by qing */ +body { + min-height: 100vh; + display: flex; + justify-content: center; + align-items: center; + background: #c2ccd0; + font-family: system-ui, -apple-system, "Segoe UI", Roboto,sans-serif; + padding: 1rem; +} + +.box { + width: 90%; +} + +.card { + background-color: #eedeb0; + border: 1px solid #000000; + border-radius: 1.125rem; + padding: 1.5rem 1.25rem; + box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.02); + /*max-width: 480px;*/ + width: 90%; + color: #4d3e2b; + transition: box-shadow 0.2s, border-color 0.2s; + overflow-wrap: break-word; +} + +.card:hover { + border-color: #c7b38a; + box-shadow: 0 10px 24px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.03); +} + +/* 移动端微调 */ +@media (max-width: 480px) { + body { + padding: 0.8rem; + } + + .card { + padding: 1.2rem, 1rem; + border-radius: 1rem; + border-width: 1px; + } +} + +/* 极小屏 (宽度 < 360px) */ +@media (max-width: 360px) { + .card { + padding: 1rem 0.8rem; + border-radius: 0.9rem; + } +} \ No newline at end of file From 96c500d5016f8fda12c0cb5e3ab3935ab6530867 Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Wed, 22 Jul 2026 19:43:03 +0800 Subject: [PATCH 11/16] css --- static/public/css/qing.css | 4 +-- static/public/dnfs.html | 7 ++--- static/public/js/dnfs.js | 1 - static/public/login.html | 63 +++++++++++++++++++------------------ static/public/register.html | 57 +++++++++++++++++---------------- 5 files changed, 68 insertions(+), 64 deletions(-) diff --git a/static/public/css/qing.css b/static/public/css/qing.css index 15168dd..3874be6 100644 --- a/static/public/css/qing.css +++ b/static/public/css/qing.css @@ -22,7 +22,7 @@ body { display: flex; justify-content: center; align-items: center; - background: #c2ccd0; + background: #fffbf0; font-family: system-ui, -apple-system, "Segoe UI", Roboto,sans-serif; padding: 1rem; } @@ -68,4 +68,4 @@ body { padding: 1rem 0.8rem; border-radius: 0.9rem; } -} \ No newline at end of file +} diff --git a/static/public/dnfs.html b/static/public/dnfs.html index bee22d1..c47e70b 100644 --- a/static/public/dnfs.html +++ b/static/public/dnfs.html @@ -5,15 +5,14 @@ DNFS · 树状笔记 - +
    -

    title

    +

    -
    hello
    -
    +

    diff --git a/static/public/js/dnfs.js b/static/public/js/dnfs.js index 392efa8..c233085 100644 --- a/static/public/js/dnfs.js +++ b/static/public/js/dnfs.js @@ -161,7 +161,6 @@ function load_notes(main_node) { card.appendChild(ctt) recommend_list.appendChild(card) recommend_list.appendChild(document.createElement('br')) - recommend_list.appendChild(document.createElement('hr')) } }; diff --git a/static/public/login.html b/static/public/login.html index d995f3b..c4aef65 100644 --- a/static/public/login.html +++ b/static/public/login.html @@ -5,6 +5,7 @@ 登录 + -

    用户登录

    -
    -
    - - - -
    - - - -
    -
    - - - - - - -
    -
    - - - -
    -
    - - - -
    -
    +
    +

    用户登录

    +
    +
    + + + +
    + + + +
    +
    + + + + + + +
    +
    + + + +
    +
    + + + +
    +
    +
    diff --git a/static/public/register.html b/static/public/register.html index 82157fa..e4ffc1f 100644 --- a/static/public/register.html +++ b/static/public/register.html @@ -4,6 +4,7 @@ 注册页面 + -

    注册页面

    -
    -
    - - - -
    - - -
    验证码: - - - +
    +

    注册页面

    + +
    + + + +
    + + +
    验证码: + + + +
    + +
    + + + + +
    - -
    - - - - - -
    -
    - - - -
    - +
    + + + +
    + +
    From 17b4da1f69ecc46126251eec14cd7d516bc2495a Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Wed, 22 Jul 2026 20:31:26 +0800 Subject: [PATCH 12/16] fixup --- static/public/dnfs.html | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/static/public/dnfs.html b/static/public/dnfs.html index 73a14a3..7dd21a0 100644 --- a/static/public/dnfs.html +++ b/static/public/dnfs.html @@ -26,26 +26,6 @@
    -
    - 浏览:999 - 点赞:999 - 分享:999 -
    - - -
    hello
    -
    -
    -
    -

    节点操作

    -
    -
    -
    - - -
    - - - + From 6885d5a2a232c63433e84f1495386780fd7c96a0 Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Wed, 22 Jul 2026 20:32:04 +0800 Subject: [PATCH 13/16] fix2 --- static/public/dnfs.html | 1 - 1 file changed, 1 deletion(-) diff --git a/static/public/dnfs.html b/static/public/dnfs.html index 7dd21a0..2d6ee90 100644 --- a/static/public/dnfs.html +++ b/static/public/dnfs.html @@ -11,7 +11,6 @@

    -

    From 2a2a3fc2b7dc1e8a2d5f8c9a97879c129c287839 Mon Sep 17 00:00:00 2001 From: shufeng2012 <277665039@qq.com> Date: Wed, 22 Jul 2026 20:35:39 +0800 Subject: [PATCH 14/16] =?UTF-8?q?=F0=9F=9A=91=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E5=A4=B1=E8=AF=AF=E5=AF=BC=E8=87=B4=E7=9A=84?= =?UTF-8?q?ui=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/public/dnfs.html | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/static/public/dnfs.html b/static/public/dnfs.html index c47e70b..96c94ed 100644 --- a/static/public/dnfs.html +++ b/static/public/dnfs.html @@ -9,10 +9,21 @@
    -

    +
    + +

    title

    + +
    + 发布时间:2026-1-1 +
    +
    + 浏览:999 + 点赞:999 + 分享:999 +
    -
    +
    hello

    @@ -23,8 +34,8 @@
    - - + +
    From 2d3c7e5c54e97e715382c892716d39c00b99ee13 Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Wed, 22 Jul 2026 12:45:33 +0800 Subject: [PATCH 15/16] style(frontend): remove unnecessary closing center tag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除了多余的闭合标签,修复页面结构不规范问题 --- static/public/dnfs.html | 1 - 1 file changed, 1 deletion(-) diff --git a/static/public/dnfs.html b/static/public/dnfs.html index 77857bb..09bfc29 100644 --- a/static/public/dnfs.html +++ b/static/public/dnfs.html @@ -22,7 +22,6 @@ 点赞:999 分享:999
    -
    hello

    From 004f0cd3df3a4591da24c21958968a36f0491ac6 Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Wed, 22 Jul 2026 12:46:50 +0800 Subject: [PATCH 16/16] =?UTF-8?q?style:=20=E4=BC=98=E5=8C=96=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E9=A1=B5=E9=9D=A2=E6=95=B4=E4=BD=93UI=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=B8=8E=E4=BA=A4=E4=BA=92=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整了头部按钮、面包屑、搜索框、文件卡片等组件的内边距、圆角和间距,新增了hover交互效果,统一了卡片和加载空态的视觉样式,适配移动端布局细节 --- static/public/__view.html | 112 +++++++++++++++++++++++++++----------- 1 file changed, 79 insertions(+), 33 deletions(-) diff --git a/static/public/__view.html b/static/public/__view.html index f861606..e4bed51 100644 --- a/static/public/__view.html +++ b/static/public/__view.html @@ -67,36 +67,43 @@ .header-actions a { color: white; text-decoration: none; - padding: 4px 10px; + padding: 6px 14px; background: var(--accent-bg); - border-radius: 6px; + border-radius: 20px; font-size: 14px; transition: background 0.15s; } .header-actions a:active { background: var(--accent-bg-active); } .breadcrumb { - padding: 8px 16px; + padding: 10px 16px; background: var(--card); font-size: 13px; overflow-x: auto; white-space: nowrap; border-bottom: 1px solid var(--border); } - .breadcrumb a { color: var(--accent); text-decoration: none; padding: 2px 6px; } + .breadcrumb a { + color: var(--accent); + text-decoration: none; + padding: 3px 10px; + border-radius: 12px; + transition: background 0.15s; + } + .breadcrumb a:hover { background: var(--card-hover); } .breadcrumb .sep { color: var(--muted); margin: 0 4px; } - .breadcrumb .current { color: var(--fg); font-weight: 500; } + .breadcrumb .current { color: var(--fg); font-weight: 500; padding: 3px 10px; } .search-box { - padding: 8px 16px; + padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--border); } .search-box input { width: 100%; - padding: 8px 12px; + padding: 10px 16px; border: 1px solid var(--border-light); - border-radius: 6px; + border-radius: 24px; font-size: 14px; outline: none; background: var(--bg); @@ -105,22 +112,28 @@ } .search-box input:focus { border-color: var(--accent); - box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.2); + box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2); } .stats { - padding: 6px 16px; + padding: 8px 16px; background: var(--bg); font-size: 12px; color: var(--subtle); border-bottom: 1px solid var(--border); display: flex; - gap: 12px; + gap: 10px; flex-wrap: wrap; } + .stats span { + padding: 3px 10px; + background: var(--card); + border-radius: 12px; + border: 1px solid var(--border-light); + } .container { - padding: 12px; + padding: 14px; max-width: 1200px; margin: 0 auto; } @@ -129,13 +142,13 @@ .file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); - gap: 12px; + gap: 14px; } .item { background: var(--card); - border-radius: 10px; - padding: 14px 10px; + border-radius: 20px; + padding: 16px 12px; cursor: pointer; border: 1px solid var(--border-light); box-shadow: var(--shadow); @@ -144,16 +157,20 @@ flex-direction: column; align-items: center; text-align: center; - gap: 6px; + gap: 8px; } .item:hover { background: var(--card-hover); box-shadow: var(--shadow-hover); } .item:active { transform: scale(0.97); } .item .icon { - font-size: 40px; - width: 100%; + font-size: 42px; + width: 64px; + height: 64px; + line-height: 64px; text-align: center; - line-height: 1; + background: var(--bg); + border-radius: 50%; + border: 1px solid var(--border-light); } .item .info { width: 100%; @@ -179,41 +196,70 @@ } .item .actions { display: flex; - gap: 4px; + gap: 6px; justify-content: center; - margin-top: 4px; + margin-top: 6px; } .item .actions button { - padding: 5px 10px; + padding: 6px 14px; font-size: 12px; border: none; - border-radius: 5px; + border-radius: 16px; cursor: pointer; color: white; - transition: opacity 0.15s; + transition: opacity 0.15s, transform 0.1s; } .item .actions button:hover { opacity: 0.85; } .item .actions button:active { transform: scale(0.92); } .btn-play { background: var(--play); } .btn-download { background: var(--accent); } - .loading { text-align: center; padding: 40px; color: var(--muted); } - .loading .spinner { display: inline-block; animation: spin 1s linear infinite; font-size: 28px; } + .loading { text-align: center; padding: 50px; color: var(--muted); } + .loading .spinner { + display: inline-block; + animation: spin 1s linear infinite; + font-size: 32px; + width: 56px; + height: 56px; + line-height: 56px; + background: var(--card); + border-radius: 50%; + box-shadow: var(--shadow); + margin-bottom: 8px; + } @keyframes spin { 100% { transform: rotate(360deg); } } - .empty { text-align: center; padding: 60px 20px; color: var(--muted); } - .empty .icon { font-size: 48px; display: block; margin-bottom: 12px; } + .empty { text-align: center; padding: 70px 20px; color: var(--muted); } + .empty .icon { + font-size: 56px; + display: inline-block; + width: 80px; + height: 80px; + line-height: 80px; + background: var(--card); + border-radius: 50%; + box-shadow: var(--shadow); + margin-bottom: 16px; + } - .error { text-align: center; padding: 40px 20px; color: var(--error); } + .error { + text-align: center; + padding: 50px 20px; + color: var(--error); + background: var(--card); + border-radius: 20px; + margin: 20px 0; + } @media (max-width: 480px) { - .file-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; } - .item { padding: 10px 8px; } - .item .icon { font-size: 32px; } + .file-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; } + .item { padding: 12px 8px; border-radius: 16px; } + .item .icon { font-size: 32px; width: 52px; height: 52px; line-height: 52px; } .item .name { font-size: 13px; } .item .meta { font-size: 10px; gap: 4px; } - .item .actions button { padding: 4px 8px; font-size: 11px; } + .item .actions button { padding: 5px 10px; font-size: 11px; border-radius: 14px; } .header h1 { font-size: 16px; } + .search-box input { border-radius: 20px; } }