mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
fix(website): align home page controls on mobile
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
import { useStore } from '@nanostores/react';
|
||||
import clsx from 'clsx';
|
||||
import { framework, media, skin } from '@/stores/homePageDemos';
|
||||
import ToggleGroup from '../ToggleGroup';
|
||||
|
||||
export default function HomePageControls() {
|
||||
export default function HomePageControls({ className }: { className?: string }) {
|
||||
const $framework = useStore(framework);
|
||||
const $skin = useStore(skin);
|
||||
const $media = useStore(media);
|
||||
|
||||
return (
|
||||
<>
|
||||
<section className={clsx('flex flex-col sm:flex-row sm:gap-20 items-center justify-center', className)}>
|
||||
<ToggleGroup
|
||||
className="mx-auto sm:mx-0 col-span-full grid grid-cols-2 justify-center sm:flex"
|
||||
value={$skin}
|
||||
onChange={value => skin.set(value)}
|
||||
options={[
|
||||
@@ -20,6 +22,7 @@ export default function HomePageControls() {
|
||||
/>
|
||||
|
||||
<ToggleGroup
|
||||
className="mx-auto sm:mx-0 col-span-full grid grid-cols-2 justify-center sm:flex"
|
||||
value={$framework}
|
||||
onChange={value => framework.set(value)}
|
||||
options={[
|
||||
@@ -30,6 +33,7 @@ export default function HomePageControls() {
|
||||
/>
|
||||
|
||||
<ToggleGroup
|
||||
className="mx-auto sm:mx-0 col-span-full grid grid-cols-2 justify-center sm:flex"
|
||||
value={$media}
|
||||
onChange={value => media.set(value)}
|
||||
options={[
|
||||
@@ -38,6 +42,6 @@ export default function HomePageControls() {
|
||||
]}
|
||||
aria-label="Select media element"
|
||||
/>
|
||||
</>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -43,9 +43,7 @@ const poster = `https://image.mux.com/${PLAYBACK_ID}/thumbnail.webp?time=0`;
|
||||
</header>
|
||||
<!-- padding corresponds to negative margin on player -->
|
||||
<main class="@container pt-11 pb-36 md:pt-21 lg:pt-32 px-6 md:px-10 w-full max-w-7xl mx-auto min-h-64">
|
||||
<section class="col-span-full flex flex-col sm:flex-row sm:gap-20 items-center justify-center mt-10 mb-20">
|
||||
<HomePageControls client:idle />
|
||||
</section>
|
||||
<HomePageControls client:idle className="col-span-full my-10 sm:mb-20" />
|
||||
<section class="grid gap-x-9 gap-y-6 lg:grid-cols-2 mb-6 lg:mb-30">
|
||||
<section class="grid grid-rows-subgrid row-span-2 mb-6">
|
||||
<header class="max-w-3xl">
|
||||
|
||||
Reference in New Issue
Block a user