Skip to content

Commit

Permalink
theme match settings modal, fix home animation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderjoe committed Apr 28, 2024
1 parent aad15eb commit acfde32
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
19 changes: 13 additions & 6 deletions ui/src/components/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,30 @@ export function Settings(props: SettingsProps) {
<AlertDialogTrigger>
<OcGear3 class="w-6 h-6" />
</AlertDialogTrigger>
<AlertDialogContent>
<AlertDialogTitle>Settings</AlertDialogTitle>
<AlertDialogContent
class={`bg-primary dark:bg-blackout text-100 dark:text-white ${props.theme}`}
>
<AlertDialogTitle class="font-bold text-100 light:text-black underline underline-offset-2">
Settings
</AlertDialogTitle>
<AlertDialogDescription>
<label class="block text-sm font-medium mb-2">Theme</label>
<label class="block text-sm font-medium mb-2 text-100 light:text-black">Theme</label>
<Select
value={props.theme}
onChange={props.callback}
options={availableThemes}
placeholder="Select a theme"
itemComponent={props => (
<SelectItem item={props.item}>{props.item.rawValue}</SelectItem>
<SelectItem item={props.item} class="focus:bg-400 focus:font-bold light:focus:bg-800">
{props.item.rawValue}
</SelectItem>
)}
class="text-100 light:text-black"
>
<SelectTrigger aria-label="Theme" class="w-[180px]">
<SelectTrigger aria-label="Theme" class="w-[180px] bg-secondary">
<SelectValue<string>>{state => state.selectedOption()}</SelectValue>
</SelectTrigger>
<SelectContent />
<SelectContent class={`bg-secondary text-100 light:text-black ${props.theme}`} />
</Select>
</AlertDialogDescription>
</AlertDialogContent>
Expand Down
15 changes: 9 additions & 6 deletions ui/src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Link } from "~/components/link.tsx";
import { Motion } from "solid-motionone";
import { Button } from "~/components/ui/button.tsx";
import { AiFillGithub } from 'solid-icons/ai';
import { AnimationDiv } from '~/components/animated-div.tsx';

export const Home = () => {
return (
Expand All @@ -11,10 +12,11 @@ export const Home = () => {
<section class="w-full py-12 md:py-24 lg:py-32">
<div class="container px-4 md:px-6">
<div class="grid gap-6 lg:grid-cols-[1fr_400px] lg:gap-12 xl:grid-cols-[1fr_600px]">
<Motion.div
<AnimationDiv
class="flex flex-col justify-center space-y-4"
animate={{ x: [-200, 0], opacity: [0, 1] }}
transition={{ duration: 1, easing: "ease-in-out" }}
duration={1}
easing={"ease-in-out"}
>
<div class="space-y-2">
<h1 class="text-3xl text-100 light:text-white font-bold tracking-tighter sm:text-5xl xl:text-6xl/none">
Expand All @@ -26,10 +28,11 @@ export const Home = () => {
predict the outcome.
</p>
</div>
</Motion.div>
<Motion.div
</AnimationDiv>
<AnimationDiv
animate={{ y: [-200, 0], opacity: [0, 1] }}
transition={{ duration: 1, easing: "ease-in-out" }}
duration={1}
easing={"ease-in-out"}
>
<img
alt="Hero"
Expand All @@ -38,7 +41,7 @@ export const Home = () => {
src="https://placeholder.pics/svg/300/F97EFF-8589FF/Placedholder"
width="550"
/>
</Motion.div>
</AnimationDiv>
</div>
</div>
</section>
Expand Down

0 comments on commit acfde32

Please sign in to comment.