From d89e1ec563b17455fa2b80f5f889858480e9fd57 Mon Sep 17 00:00:00 2001 From: taroj1205 Date: Fri, 31 Jan 2025 07:58:53 +1300 Subject: [PATCH] fix(feature): fix video preloading in feature section --- src/components/Features.astro | 44 +++++++++++++++++++++-------------- src/components/Video.astro | 40 +++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 17 deletions(-) create mode 100644 src/components/Video.astro diff --git a/src/components/Features.astro b/src/components/Features.astro index a0f37f5d..e8bd7a94 100644 --- a/src/components/Features.astro +++ b/src/components/Features.astro @@ -1,7 +1,5 @@ --- -import Title from '../components/Title.astro' import Description from '../components/Description.astro' -import { Image } from 'astro:assets' import browserSidebar from '../assets/browser-sidebar.webm' import browserWorkspaces from '../assets/browser-workspaces.webm' @@ -10,7 +8,8 @@ import browserGlance from '../assets/browser-glance.webm' import browserSplitViews from '../assets/browser-splitview.webm' import { motion } from 'motion/react' -import { getTitleAnimation, getZoomInAnimation } from '../animations' +import { getTitleAnimation } from '../animations' +import Video from './Video.astro' ---
- Zen
helps you stay organized
+ How does zen
keep you always organized?
- Stay organized and focused with Zen Browser. Our innovative features are designed to help you prioritize what matters most in your online experience. + /> of the features that help you stay focused.
@@ -41,14 +46,15 @@ import { getTitleAnimation, getZoomInAnimation } from '../animations' organized.

- + class="rounded-xl border-4 border-white object-cover shadow" + />
@@ -60,14 +66,15 @@ import { getTitleAnimation, getZoomInAnimation } from '../animations' distractions.

- + class="rounded-xl border-4 border-white object-cover shadow" + />
@@ -81,34 +88,36 @@ import { getTitleAnimation, getZoomInAnimation } from '../animations' opening them.

- + class="rounded-xl border-4 border-white object-cover shadow" + />
- Split View + Split Views

Zen's split view feature allows you to view multiple tabs at once.

- + class="rounded-xl border-4 border-white object-cover shadow" + />
@@ -119,14 +128,15 @@ import { getTitleAnimation, getZoomInAnimation } from '../animations' Zen's sidebar feature allows you to view all your tabs in one place.

- + class="rounded-xl border-4 border-white object-cover shadow" + />
diff --git a/src/components/Video.astro b/src/components/Video.astro new file mode 100644 index 00000000..008d49c9 --- /dev/null +++ b/src/components/Video.astro @@ -0,0 +1,40 @@ +--- +const { src, class: className, ...rest } = Astro.props +const type = src.split('.').pop() || 'webm' +--- + + + +