Skip to content

Commit 7f30428

Browse files
authored
Style/overhaul (#98)
* style(navbar): homogenize with the rest of the ui * style(navbar): homogenize with the rest of the ui * style(navbar): improve styling * style: improve styling * style: overhaul * chore: delete old unused pages
1 parent 4c16608 commit 7f30428

36 files changed

+264
-481
lines changed

src/app.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { Theme } from '@/pages/theme/theme.tsx';
1414
import { useAnalysisStore } from '@/store/analysis.ts';
1515
import { Profile } from '@/pages/profile/profile.tsx';
1616
import { useAuthStore } from '@/store/auth.ts';
17-
import { History } from '@/pages/history/history-page';
1817

1918
import '@/assets/themes/piece-css/index.ts';
2019
import '@/assets/themes/board-css/index.css';
@@ -54,27 +53,25 @@ function App() {
5453
}
5554
/>
5655
<Route path="/documentation" element={<Documentation />} />
57-
5856
{/* Authentication */}
5957
<Route path="/register" element={<Register />} />
6058
<Route path="/login" element={<Login />} />
6159

6260
{/* Connected */}
63-
<Route path="/" element={<Dashboard />} />
6461
<Route
65-
path="/profile"
62+
path="/"
6663
element={
67-
<ProtectedRoute allow={!!user} redirect="/dashboard">
68-
<Profile />
64+
<ProtectedRoute allow={!!user} redirect="/start-analysis">
65+
<Dashboard />
6966
</ProtectedRoute>
7067
}
7168
/>
7269

7370
<Route
74-
path="/dashboard"
71+
path="/profile"
7572
element={
76-
<ProtectedRoute allow={!!user} redirect="/login">
77-
<History />
73+
<ProtectedRoute allow={!!user} redirect="/dashboard">
74+
<Profile />
7875
</ProtectedRoute>
7976
}
8077
/>

src/assets/icons/chess_logo.png

-32.2 KB
Binary file not shown.

src/assets/icons/chesscom.svg

Lines changed: 47 additions & 0 deletions
Loading

src/assets/icons/lichess.png

-292 KB
Binary file not shown.

src/assets/icons/lichess.svg

Lines changed: 4 additions & 0 deletions
Loading

src/assets/icons/react.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/components/navbar/navbar.tsx

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -73,34 +73,18 @@ export const Navbar = () => {
7373

7474
<NavigationMenu>
7575
<NavigationMenuList className="gap-2">
76-
{location.pathname === '/' ? (
77-
<NavigationMenuItem>
78-
<NavigationMenuLink asChild className={navigationMenuTriggerStyle()}>
79-
<Link to="/dashboard" className="hover:no-underline text-castled-accent">
80-
{t('navbar.dashboard')}
81-
</Link>
82-
</NavigationMenuLink>
83-
</NavigationMenuItem>
84-
) : (
85-
<NavigationMenuItem>
86-
<NavigationMenuLink asChild className={navigationMenuTriggerStyle()}>
87-
<Link to="/dashboard" className="hover:no-underline hover:text-castled-accent">
88-
{t('navbar.dashboard')}
89-
</Link>
90-
</NavigationMenuLink>
91-
</NavigationMenuItem>
92-
)}
9376
<NavigationMenuItem>
9477
<NavigationMenuLink asChild className={navigationMenuTriggerStyle()}>
95-
{location.pathname === '/start-analysis' ? (
96-
<Link to="/start-analysis" className="hover:no-underline text-castled-accent">
97-
{t('navbar.analysis')}
98-
</Link>
99-
) : (
100-
<Link to="/start-analysis" className="hover:no-underline hover:text-castled-accent">
101-
{t('navbar.analysis')}
102-
</Link>
103-
)}
78+
<Link to="/" className="hover:no-underline">
79+
{t('navbar.dashboard')}
80+
</Link>
81+
</NavigationMenuLink>
82+
</NavigationMenuItem>
83+
<NavigationMenuItem>
84+
<NavigationMenuLink asChild className={navigationMenuTriggerStyle()}>
85+
<Link to="/start-analysis" className="hover:no-underline">
86+
{t('navbar.analysis')}
87+
</Link>
10488
</NavigationMenuLink>
10589
</NavigationMenuItem>
10690
<NavigationMenuItem>

src/components/ui/button.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,22 @@ import { cva, type VariantProps } from 'class-variance-authority';
55
import { cn } from '@/lib/utils';
66

77
const buttonVariants = cva(
8-
'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
8+
'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
99
{
1010
variants: {
1111
variant: {
12-
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
12+
default: 'bg-castled-accent text-foreground hover:bg-castled-accent/90',
1313
destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
1414
outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
15-
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
15+
secondary:
16+
'border bg-gradient-to-br from-castled-secondary/30 to-castled-secondary text-secondary-foreground hover:bg-secondary/80',
1617
ghost: 'hover:bg-accent hover:text-accent-foreground',
1718
link: 'text-primary underline-offset-4 hover:underline',
1819
},
1920
size: {
2021
default: 'h-10 px-4 py-2',
21-
sm: 'h-9 rounded-md px-3',
22-
lg: 'h-11 rounded-md px-8',
22+
sm: 'h-9 rounded-xl px-3',
23+
lg: 'h-11 rounded-xl px-8',
2324
icon: 'h-10 w-10',
2425
},
2526
},

src/components/ui/calendar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function Calendar({ className, classNames, showOutsideDays = true, ...props }: C
2626
nav_button_next: 'absolute right-1',
2727
table: 'w-full border-collapse space-y-1',
2828
head_row: 'flex',
29-
head_cell: 'text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]',
29+
head_cell: 'text-muted-foreground rounded-xl w-9 font-normal text-[0.8rem]',
3030
row: 'flex w-full mt-2',
3131
cell: 'h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20',
3232
day: cn(buttonVariants({ variant: 'ghost' }), 'h-9 w-9 p-0 font-normal aria-selected:opacity-100'),

0 commit comments

Comments
 (0)