feat(layout): 添加视频壁纸组件并优化布局结构
- 引入 VideoWallpaper 组件作为全局视频背景- 调整主内容区域层级和定位方式 - 更新窗口尺寸配置为 1280x720 - 优化 Header 组件层级防止被遮挡 - 移除页面级视频壁纸实现逻辑
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
|
||||
</script>
|
||||
|
||||
<header class="h-8 w-full backdrop-blur absolute top-0 window-controls flex gap-10 px-3 items-center" data-tauri-drag-region>
|
||||
<header class="h-8 z-50 w-full backdrop-blur absolute top-0 window-controls flex gap-10 px-3 items-center" data-tauri-drag-region>
|
||||
|
||||
<div class="flex-1" data-tauri-drag-region></div>
|
||||
|
||||
|
||||
14
src/lib/components/layout/VideoWallpaper.svelte
Normal file
14
src/lib/components/layout/VideoWallpaper.svelte
Normal file
@@ -0,0 +1,14 @@
|
||||
<script lang="ts">
|
||||
import video from '$lib/assets/video/c9df6498_517c_4fee_a39d_72b43f3425fd.mp4';
|
||||
</script>
|
||||
|
||||
<div class="app-wallpaper absolute top-0 -z-10" >
|
||||
<video class=" h-screen object-cover select-none -z-10 " autoplay muted loop playsinline>
|
||||
<source src="{video}" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
|
||||
</style>
|
||||
@@ -3,6 +3,7 @@
|
||||
import favicon from '$lib/assets/favicon.svg';
|
||||
import Header from '$lib/components/layout/Header.svelte';
|
||||
import Sprite from '$lib/components/ui/Sprite.svelte';
|
||||
import VideoWallpaper from '$lib/components/layout/VideoWallpaper.svelte';
|
||||
|
||||
|
||||
let { children } = $props();
|
||||
@@ -12,11 +13,13 @@
|
||||
<link rel="icon" href={favicon} />
|
||||
<Sprite />
|
||||
</svelte:head>
|
||||
|
||||
<Header/>
|
||||
<div class="app-container">
|
||||
<main class="main-content">
|
||||
<div class="relative">
|
||||
<main class="relative z-10">
|
||||
{@render children()}
|
||||
</main>
|
||||
<VideoWallpaper/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
<script lang="ts">
|
||||
import video from '$lib/assets/video/c9df6498_517c_4fee_a39d_72b43f3425fd.mp4';
|
||||
</script>
|
||||
|
||||
<div class="app-wallpaper" >
|
||||
<video class="absolute h-screen object-cover -z-10" autoplay muted loop playsinline>
|
||||
<source src="{video}" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
|
||||
</style>
|
||||
<div class="relative pt-10 px-4 ">
|
||||
<h1>123</h1>
|
||||
haisdjiasjd
|
||||
as
|
||||
dasdasd
|
||||
as
|
||||
d
|
||||
asd
|
||||
asd
|
||||
as
|
||||
d
|
||||
</div>
|
||||
Reference in New Issue
Block a user