Skip to content

Commit 89ac039

Browse files
committed
Tweaks and fixes
1 parent 6b22991 commit 89ac039

5 files changed

Lines changed: 67 additions & 21 deletions

File tree

app/globals.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
--input: oklch(0.922 0 0);
6868
--ring: oklch(0.708 0 0);
6969
--chart-1: oklch(0.905 0.182 98.111);
70-
--chart-2: oklch(0.795 0.184 86.047);
70+
--chart-2: oklch(0.7121 0.1365 95.37);
7171
--chart-3: oklch(0.681 0.162 75.834);
7272
--chart-4: oklch(0.554 0.135 66.442);
7373
--chart-5: oklch(0.476 0.114 61.907);
@@ -89,7 +89,7 @@
8989
--card-foreground: oklch(0.985 0 0);
9090
--popover: oklch(0.205 0 0);
9191
--popover-foreground: oklch(0.985 0 0);
92-
--primary: oklch(0.795 0.184 86.047);
92+
--primary: oklch(0.7121 0.1365 95.37);
9393
--primary-foreground: oklch(0.421 0.095 57.708);
9494
--secondary: oklch(0.274 0.006 286.033);
9595
--secondary-foreground: oklch(0.985 0 0);
@@ -102,13 +102,13 @@
102102
--input: oklch(1 0 0 / 15%);
103103
--ring: oklch(0.556 0 0);
104104
--chart-1: oklch(0.905 0.182 98.111);
105-
--chart-2: oklch(0.795 0.184 86.047);
105+
--chart-2: oklch(0.7121 0.1365 95.37);
106106
--chart-3: oklch(0.681 0.162 75.834);
107107
--chart-4: oklch(0.554 0.135 66.442);
108108
--chart-5: oklch(0.476 0.114 61.907);
109109
--sidebar: oklch(0.205 0 0);
110110
--sidebar-foreground: oklch(0.985 0 0);
111-
--sidebar-primary: oklch(0.795 0.184 86.047);
111+
--sidebar-primary: oklch(0.7121 0.1365 95.37);
112112
--sidebar-primary-foreground: oklch(0.987 0.026 102.212);
113113
--sidebar-accent: oklch(0.269 0 0);
114114
--sidebar-accent-foreground: oklch(0.985 0 0);

app/home/page.tsx

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
"use client";
22
import TypeIt from "typeit-react";
3+
import { Button } from "@/components/ui/button";
34

4-
export default function Home() {
5+
export default function Home({ setCurrentTab }: { setCurrentTab?: (tab: string) => void }) {
56
return (
6-
<div className="relative flex flex-col w-full h-full justify-center items-center">
7-
<div className="absolute top-0 left-0 right-0 h-[30vh] bg-linear-to-b from-primary/4 to-transparent pointer-events-none" />
7+
<div className="relative flex flex-col w-full items-center">
8+
<div className="absolute top-0 left-0 right-0 h-[60vh] bg-linear-to-b from-primary/11 dark:from-primary/6 to-transparent pointer-events-none" />
89

9-
<img className="rounded-md mt-10 mb-6" width={570} height={240} src="./banner.png" alt="PySplanner Logo" />
10-
<div className="w-1/2 text-center">
10+
<img className="rounded-md mt-8 mb-6" width={570} height={240} src="./banner.png" alt="PySplanner Logo" />
11+
<div className="w-3/8 text-center">
1112
<TypedHeading />
12-
<p className="text-lg text-muted-foreground mt-4">PySplanner is a powerful tool that generates optimized movement plans for LEGO robots, ensuring efficient and effective performance.</p>
13+
<p className="text-lg text-muted-foreground mt-4">
14+
PySplanner is a powerful, free, and open source tool for optimized autonomous movement on LEGO MINDSTORMS EV3 and SPIKE Prime robots.
15+
Creating smooth and consistent movements for your robot has never been easier. Say goodbye to guesswork and hello to precision with PySplanner.
16+
</p>
17+
</div>
18+
19+
<div className="flex items-center gap-4 mt-8">
20+
<Button className="text-white" size="lg" onClick={() => setCurrentTab?.('docs')}>Get Started</Button>
21+
<Button variant="outline" size="lg" onClick={() => setCurrentTab?.('dashboard')}>Go To Dashboard</Button>
1322
</div>
1423
</div>
1524
)
@@ -18,7 +27,7 @@ export default function Home() {
1827
function TypedHeading() {
1928
return (
2029
<h2 className="font-bold text-4xl tracking-tight">
21-
LEGO Robot Movement,&nbsp;
30+
LEGO robot movement,&nbsp;
2231
<TypeIt
2332
options={{
2433
speed: 70,
@@ -34,28 +43,31 @@ function TypedHeading() {
3443
.type("made for FLL.")
3544
.pause(1500)
3645
.delete()
46+
.type("free and open source, always.")
47+
.pause(1500)
48+
.delete()
3749
.type("crazy easy.")
3850
.pause(1500)
3951
.delete()
4052
.type("that doesn't suck.")
4153
.pause(1500)
4254
.delete()
43-
.type("repeatable.")
55+
.type("that's repeatable.")
4456
.pause(1500)
4557
.delete()
4658
.type("built different.")
4759
.pause(1500)
4860
.delete()
49-
.type("revolutionized.")
61+
.type("that's precise.")
5062
.pause(1500)
5163
.delete()
52-
.type("precise.")
64+
.type("revolutionized.")
5365
.pause(1500)
5466
.delete()
55-
.type("optimized.")
67+
.type("that's optimized.")
5668
.pause(1500)
5769
.delete()
58-
.type("no guesswork.")
70+
.type("with no guesswork.")
5971
.pause(1500)
6072
.delete()
6173
}

app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default function Home() {
2121
<div className="flex flex-col min-h-screen min-w-screen bg-background">
2222
<MenuBar currentTab={currentTab} onTabChange={setCurrentTab} />
2323
<div className="flex-1 flex flex-col w-full">
24-
<Content />
24+
<Content setCurrentTab={setCurrentTab} />
2525
</div>
2626
<Footer className="w-full mt-auto shrink-0" />
2727
</div>

components/menu-bar.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"
44
import { Discord, Github } from "@/components/media-buttons";
5+
import ThemeSwitch from "@/components/theme-switch";
6+
import { Separator } from "@/components/ui/separator";
57

68
interface MenuBarProps {
79
currentTab: string;
810
onTabChange: (tab: string) => void;
911
}
1012

1113
export function MenuBar({ currentTab, onTabChange }: MenuBarProps) {
12-
1314
return (
1415
<div className="w-full h-16 border-b flex items-center justify-between px-6 bg-background shrink-0">
1516
{/* Logo and Title */}
@@ -27,9 +28,13 @@ export function MenuBar({ currentTab, onTabChange }: MenuBarProps) {
2728
</TabsList>
2829
</Tabs>
2930

30-
<div className="flex flex-1 items-center justify-end space-x-4">
31-
<Discord />
32-
<Github />
31+
<div className="flex flex-1 items-center justify-end">
32+
<ThemeSwitch />
33+
<Separator orientation="vertical" className="h-8" />
34+
<div className="flex ml-4 gap-4">
35+
<Discord />
36+
<Github />
37+
</div>
3338
</div>
3439
</div>
3540
);

components/theme-switch.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
'use client'
2+
3+
import { Sun, Moon } from 'lucide-react'
4+
import { Switch } from '@/components/ui/switch'
5+
import { useTheme } from 'next-themes';
6+
7+
// Derived from: https://shadcnstudio.com/docs/components/switch 12
8+
export default function ThemeSwitch() {
9+
const { theme, setTheme } = useTheme();
10+
11+
return (
12+
<div>
13+
<div className='relative inline-grid h-7 grid-cols-[1fr_1fr] items-center text-sm font-medium'>
14+
<Switch
15+
checked={theme === 'light'}
16+
onCheckedChange={(checked) => setTheme(checked ? 'light' : 'dark')}
17+
className='peer data-[state=checked]:bg-input/50 data-[state=unchecked]:bg-input/50 [&_span]:bg-background! absolute inset-0 data-[size=default]:h-[inherit] data-[size=default]:w-14 [&_span]:transition-transform [&_span]:duration-300 [&_span]:ease-[cubic-bezier(0.16,1,0.3,1)] [&_span]:group-data-[size=default]/switch:size-6.5 [&_span]:data-[state=checked]:translate-x-7 [&_span]:data-[state=checked]:rtl:-translate-x-7'
18+
aria-label='Switch with icon indicators'
19+
/>
20+
<span className='peer-data-[state=checked]:text-muted-foreground/70 pointer-events-none relative ml-1.75 flex min-w-7 items-center text-center'>
21+
<Moon className='size-4' aria-hidden='true' />
22+
</span>
23+
<span className='peer-data-[state=unchecked]:text-muted-foreground/70 pointer-events-none relative -ms-px flex min-w-7 items-center text-center'>
24+
<Sun className='size-4' aria-hidden='true' />
25+
</span>
26+
</div>
27+
</div>
28+
)
29+
}

0 commit comments

Comments
 (0)