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)