diff --git a/src/components/Features.astro b/src/components/Features.astro index 73527b5..2374529 100644 --- a/src/components/Features.astro +++ b/src/components/Features.astro @@ -2,6 +2,7 @@ import { motion } from 'motion/react' import { getTitleAnimation } from '~/animations' import Description from '~/components/Description.astro' +import Video from './Video.astro' import CompactModeVideo from '~/assets/CompactMode.webm' import GlanceVideo from '~/assets/Glance.webm' @@ -9,7 +10,6 @@ import SplitViewsVideo from '~/assets/SplitViews.webm' import WorkspacesVideo from '~/assets/Workspaces.webm' import { getLocale, getUI } from '~/utils/i18n' -import Video from './Video.astro' const locale = getLocale(Astro) @@ -21,12 +21,32 @@ const { const { title1 = features.title1, title2 = features.title2, title3 = features.title3 } = Astro.props -const descriptions = Object.values(features.featureTabs).map((tab) => tab.description) +const featureList = [ + { + key: 'workspaces', + video: WorkspacesVideo, + ...features.featureTabs.workspaces, + }, + { + key: 'compactMode', + video: CompactModeVideo, + ...features.featureTabs.compactMode, + }, + { + key: 'glance', + video: GlanceVideo, + ...features.featureTabs.glance, + }, + { + key: 'splitView', + video: SplitViewsVideo, + ...features.featureTabs.splitView, + }, +] ---
@@ -39,277 +59,33 @@ const descriptions = Object.values(features.featureTabs).map((tab) => tab.descri {title3} - + {features.description} -
-
- -
- - {features.featureTabs.workspaces.title} - - - {features.featureTabs.compactMode.title} - - - {features.featureTabs.glance.title} - - - {features.featureTabs.splitView.title} - -
- - - - - -
+ {featureList.map((feature, i) => ( + -
-
- -
-
-
+ + {feature.title} + + + {feature.description} +
-
-
+ + ))}
- - -