Skip to content

Commit

Permalink
feat(ui): add tabby logo (#1258)
Browse files Browse the repository at this point in the history
* feat(ui): add tabby logo

* update
  • Loading branch information
wsxiaoys authored Jan 21, 2024
1 parent 4d833d4 commit f220ba9
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
20 changes: 16 additions & 4 deletions ee/tabby-ui/app/(dashboard)/components/sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
'use client'

import Image from 'next/image'
import Link from 'next/link'
import { usePathname } from 'next/navigation'
import logoDarkUrl from '@/assets/logo-dark.png'
import logoUrl from '@/assets/logo.png'
import { cva } from 'class-variance-authority'

import { useSession } from '@/lib/tabby/auth'
Expand All @@ -25,10 +28,19 @@ export default function Sidebar({ children, className }: SidebarProps) {
<div className="h-[12px]"></div>
<div className="flex-1">
<nav className="grid items-start gap-2 px-4 text-sm font-medium">
<Link href="/" className="pb-4">
<span className="hidden select-none px-2 font-logo text-xl font-semibold sm:inline-block">
Tabby
</span>
<Link href="/" className="flex justify-center pb-4">
<Image
src={logoUrl}
alt="logo"
width={128}
className="dark:hidden"
/>
<Image
src={logoDarkUrl}
alt="logo"
width={96}
className="hidden dark:block"
/>
</Link>
<SidebarButton href="/">
<IconHome /> Home
Expand Down
Binary file added ee/tabby-ui/assets/logo-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ee/tabby-ui/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 1 addition & 10 deletions ee/tabby-ui/lib/fonts.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import {
Azeret_Mono as FontLogo,
JetBrains_Mono as FontMono,
Inter as FontSans
} from 'next/font/google'
import { JetBrains_Mono as FontMono, Inter as FontSans } from 'next/font/google'

export const fontSans = FontSans({
subsets: ['latin'],
Expand All @@ -13,8 +9,3 @@ export const fontMono = FontMono({
subsets: ['latin'],
variable: '--font-mono'
})

export const fontLogo = FontLogo({
subsets: ['latin'],
variable: '--font-logo'
})
1 change: 0 additions & 1 deletion ee/tabby-ui/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ module.exports = {
extend: {
fontFamily: {
sans: ['var(--font-sans)', ...fontFamily.sans],
logo: ['var(--font-logo)', ...fontFamily.sans]
},
colors: {
border: 'hsl(var(--border))',
Expand Down

0 comments on commit f220ba9

Please sign in to comment.