Skip to content

Commit d4146ba

Browse files
committed
logo update
1 parent 3b2ab31 commit d4146ba

File tree

7 files changed

+59
-27
lines changed

7 files changed

+59
-27
lines changed
31.3 KB
Loading
16.4 KB
Loading
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 90.48 122.88"><title>text-file</title><path d="M35.27.78a3,3,0,0,1,2-.78,1.54,1.54,0,0,1,.47.05h46.2A6.59,6.59,0,0,1,88.56,2a6.52,6.52,0,0,1,1.92,4.64v109.7a6.57,6.57,0,0,1-6.56,6.56H6.67a6.57,6.57,0,0,1-6.56-6.56v-78A3.07,3.07,0,0,1,0,37.56a3.19,3.19,0,0,1,1-2.24L34.9,1a1.5,1.5,0,0,1,.26-.21ZM84.65,6.62a.5.5,0,0,0-.21-.47A.67.67,0,0,0,84,5.94H40.22V31.62a8.89,8.89,0,0,1-8.91,8.91H6.1v75.79a.58.58,0,0,0,.2.47.69.69,0,0,0,.47.21H84a.58.58,0,0,0,.47-.21.73.73,0,0,0,.21-.47V6.62Zm-62,94.73a2.64,2.64,0,0,1,0-5.28h28a2.64,2.64,0,0,1,0,5.28Zm0-17.75a2.64,2.64,0,0,1,0-5.28H65.46a2.64,2.64,0,0,1,0,5.28Zm0-17.76a2.64,2.64,0,0,1,0-5.28H72a2.64,2.64,0,0,1,0,5.28Zm11.7-34.22V10.11L10.11,34.64h21.2a3.16,3.16,0,0,0,2.13-.88,3.06,3.06,0,0,0,.89-2.14Z"/></svg>

frontend/src/components/Common/Logo.tsx

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import { Link } from "@tanstack/react-router"
22

3-
import { useTheme } from "@/components/theme-provider"
43
import { cn } from "@/lib/utils"
5-
import icon from "/assets/images/fastapi-icon.svg"
6-
import iconLight from "/assets/images/fastapi-icon-light.svg"
7-
import logo from "/assets/images/fastapi-logo.svg"
8-
import logoLight from "/assets/images/fastapi-logo-light.svg"
4+
import logo from "/assets/images/forge_ai_logo.png"
95

106
interface LogoProps {
117
variant?: "full" | "icon" | "responsive"
@@ -18,38 +14,39 @@ export function Logo({
1814
className,
1915
asLink = true,
2016
}: LogoProps) {
21-
const { resolvedTheme } = useTheme()
22-
const isDark = resolvedTheme === "dark"
23-
24-
const fullLogo = isDark ? logoLight : logo
25-
const iconLogo = isDark ? iconLight : icon
26-
2717
const content =
2818
variant === "responsive" ? (
2919
<>
3020
<img
31-
src={fullLogo}
32-
alt="FastAPI"
21+
src={logo}
22+
alt="Forge AI"
3323
className={cn(
3424
"h-6 w-auto group-data-[collapsible=icon]:hidden",
3525
className,
3626
)}
3727
/>
38-
<img
39-
src={iconLogo}
40-
alt="FastAPI"
28+
<span
4129
className={cn(
42-
"size-5 hidden group-data-[collapsible=icon]:block",
43-
className,
30+
"hidden size-5 overflow-hidden rounded-sm group-data-[collapsible=icon]:inline-flex",
4431
)}
45-
/>
32+
>
33+
<img
34+
src={logo}
35+
alt="Forge AI"
36+
className={cn("h-full w-full object-cover object-left", className)}
37+
/>
38+
</span>
4639
</>
40+
) : variant === "full" ? (
41+
<img src={logo} alt="Forge AI" className={cn("h-6 w-auto", className)} />
4742
) : (
48-
<img
49-
src={variant === "full" ? fullLogo : iconLogo}
50-
alt="FastAPI"
51-
className={cn(variant === "full" ? "h-6 w-auto" : "size-5", className)}
52-
/>
43+
<span className={cn("inline-flex size-5 overflow-hidden rounded-sm")}>
44+
<img
45+
src={logo}
46+
alt="Forge AI"
47+
className={cn("h-full w-full object-cover object-left", className)}
48+
/>
49+
</span>
5350
)
5451

5552
if (!asLink) {

frontend/src/components/Sidebar/AppSidebar.tsx

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Link } from "@tanstack/react-router"
12
import {
23
Briefcase,
34
FileText,
@@ -9,11 +10,14 @@ import {
910

1011
import { SidebarAppearance } from "@/components/Common/Appearance"
1112
import { Logo } from "@/components/Common/Logo"
13+
import { Button } from "@/components/ui/button"
1214
import {
1315
Sidebar,
1416
SidebarContent,
1517
SidebarFooter,
1618
SidebarHeader,
19+
SidebarTrigger,
20+
useSidebar,
1721
} from "@/components/ui/sidebar"
1822
import useAuth from "@/hooks/useAuth"
1923
import { type Item, Main } from "./Main"
@@ -29,15 +33,45 @@ const baseItems: Item[] = [
2933

3034
export function AppSidebar() {
3135
const { user: currentUser } = useAuth()
36+
const { state, toggleSidebar } = useSidebar()
3237

3338
const items = currentUser?.is_superuser
3439
? [...baseItems, { icon: Users, title: "Admin", path: "/admin" }]
3540
: baseItems
3641

3742
return (
3843
<Sidebar collapsible="icon">
39-
<SidebarHeader className="px-4 py-6 group-data-[collapsible=icon]:px-0 group-data-[collapsible=icon]:items-center">
40-
<Logo variant="responsive" />
44+
<SidebarHeader className="px-3 py-4">
45+
<div className="flex items-center justify-between gap-2 group-data-[collapsible=icon]:justify-center">
46+
{state === "collapsed" ? (
47+
<Button
48+
type="button"
49+
variant="ghost"
50+
size="icon"
51+
className="size-9 rounded-xl"
52+
onClick={toggleSidebar}
53+
aria-label="Open sidebar"
54+
title="Open sidebar"
55+
>
56+
<Logo variant="icon" asLink={false} />
57+
</Button>
58+
) : (
59+
<>
60+
<Link
61+
to="/"
62+
className="inline-flex items-center rounded-[var(--radius-control)] px-1 py-1 outline-none focus-visible:ring-2 focus-visible:ring-ring"
63+
>
64+
<Logo variant="full" asLink={false} />
65+
<span className="sr-only">Go to dashboard</span>
66+
</Link>
67+
<SidebarTrigger
68+
className="text-muted-foreground hover:text-foreground size-9 rounded-xl"
69+
aria-label="Collapse sidebar"
70+
title="Collapse sidebar"
71+
/>
72+
</>
73+
)}
74+
</div>
4175
</SidebarHeader>
4276
<SidebarContent>
4377
<Main items={items} />

frontend/src/routes/_layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function Layout() {
2525
<SidebarProvider>
2626
<AppSidebar />
2727
<SidebarInset>
28-
<header className="sticky top-0 z-10 flex h-16 shrink-0 items-center gap-2 border-b px-4">
28+
<header className="sticky top-0 z-10 flex h-16 shrink-0 items-center gap-2 border-b px-4 md:hidden">
2929
<SidebarTrigger className="-ml-1 text-muted-foreground" />
3030
</header>
3131
<main className="flex-1 p-6 md:p-8">

img/forge_ai_logo.jpg

31.3 KB
Loading

0 commit comments

Comments
 (0)