From 35b84697cd5659c4e28950e7877b6fd9f6b20f96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=91=AB?= <7176466@qq.com> Date: Sat, 27 Aug 2022 11:42:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0video=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/style.css | 9 +++++---- views/download.pug | 8 +++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/public/style.css b/public/style.css index 0655590..0ab6bf9 100644 --- a/public/style.css +++ b/public/style.css @@ -6,7 +6,7 @@ body { user-select: none; - max-width: 360px; + max-width: 480px; margin: 0 auto; } @@ -33,12 +33,13 @@ form button { font-size: xx-small; } -audio { - width: 360px; +audio, +video { + width: 480px; } img { - width: 360px; + width: 480px; object-fit: cover; } diff --git a/views/download.pug b/views/download.pug index 52de649..263b98f 100644 --- a/views/download.pug +++ b/views/download.pug @@ -28,12 +28,14 @@ html(lang='zh') input(id='password_input' name='password' type='password' autocomplete='off' required) button(id='download_button' type='submit') 下载 if !file.password - - var mimetype = file.mimetype.split('/')[0] - - var src = '/file/' + file.md5 + - const mimetype = file.mimetype.split('/')[0] + - const src = '/file/' + file.md5 if mimetype == 'image' p 预览 img(src=src) if mimetype == 'audio' p 预览 audio(controls src=src) - script(src='/client.js') + if mimetype == 'video' + p 预览 + video(controls src=src)