fix: 提交视频

This commit is contained in:
speakeloudest 2025-07-26 01:37:32 -07:00
parent 28c72a36fa
commit 4a0d4ff1c9
3 changed files with 12 additions and 17 deletions

View File

@ -10,6 +10,7 @@ import { redirect } from 'next/navigation';
import FooterCopyright from '@/components/main/FooterCopyright';
import FullScreenVideoBackground from '@/components/main/FullScreenVideoBackground';
import HomeContent from '@/components/main/HomeContent';
import Image from 'next/image';
export default async function Home() {
const Authorization = (await cookies()).get('Authorization')?.value;
@ -38,6 +39,14 @@ export default async function Home() {
<HomeContent />
</main>
<FooterCopyright />
<Image
src={'./logo.png'}
height={37}
width={28}
className={'fixed bottom-8 left-1/2 -translate-x-1/2'}
alt='logo'
unoptimized
></Image>
</>
);
}

View File

@ -2,35 +2,21 @@
const FullScreenVideoBackground = ({}: {}) => {
return (
<div
style={{
position: 'relative',
width: '100vw',
height: '100vh',
margin: 0,
padding: 0,
overflow: 'hidden',
}}
>
<div className='fixed inset-0 h-full w-full overflow-hidden'>
<video
autoPlay
muted
loop
playsInline
className='absolute inset-0 h-full w-full object-cover'
style={{
position: 'fixed',
top: '50%',
left: '50%',
minWidth: '100%',
minHeight: '100%',
width: 'auto',
height: 'auto',
transform: 'translate(-50%, -50%)',
zIndex: -1,
}}
>
<source src={'/video.mp4'} type='video/mp4' /> {/* 传入本地视频路径,如 '/video.mp4' */}
Your browser does not support the video tag.
<source src='/video.mp4' type='video/mp4' />
</video>
</div>
);

BIN
apps/user/public/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB