perf: add github link

This commit is contained in:
molvqingtai 2024-09-27 05:54:03 +08:00
parent ca1ea11dcb
commit 7fb24a6899
5 changed files with 35 additions and 11 deletions

View file

@ -1,4 +1,4 @@
import { FC, forwardRef, useRef, useState, type ReactElement } from 'react' import { FC, useState, type ReactElement } from 'react'
import { type MessageItemProps } from './MessageItem' import { type MessageItemProps } from './MessageItem'
import { type PromptItemProps } from './PromptItem' import { type PromptItemProps } from './PromptItem'

View file

@ -98,7 +98,7 @@ const Setup: FC = () => {
}, []) }, [])
return ( return (
<div className="absolute inset-0 z-50 flex rounded-xl bg-black/10 shadow-2xl backdrop-blur-sm"> <div className="absolute inset-0 z-50 flex rounded-xl bg-black/10 shadow-2xl backdrop-blur-sm">
<div className="m-auto flex flex-col items-center justify-center gap-y-8 pb-40 drop-shadow-lg"> <div className="m-auto flex flex-col items-center justify-center gap-y-8 pb-40 drop-shadow-lg">
<BlurFade key={userInfo?.avatar} inView> <BlurFade key={userInfo?.avatar} inView>
<Avatar className="size-24 cursor-pointer border-4 border-white "> <Avatar className="size-24 cursor-pointer border-4 border-white ">

View file

@ -1,13 +1,17 @@
import { Toaster } from 'sonner' import { Toaster } from 'sonner'
import Layout from './components/Layout' import Main from './components/Main'
import ProfileForm from './components/ProfileForm' import ProfileForm from './components/ProfileForm'
import BadgeList from './components/BadgeList'
function App() { function App() {
return ( return (
<Layout> <>
<ProfileForm></ProfileForm> <BadgeList></BadgeList>
<Toaster richColors position="top-center" /> <Main>
</Layout> <ProfileForm></ProfileForm>
<Toaster richColors position="top-center" />
</Main>
</>
) )
} }

View file

@ -0,0 +1,20 @@
import { FC } from 'react'
import { Button } from '@/components/ui/Button'
import { GitHubLogoIcon } from '@radix-ui/react-icons'
const BadgeList: FC = () => {
return (
<div className="fixed inset-x-1 bottom-6 mx-auto flex w-fit font-sans">
<Button asChild size="lg" variant="ghost" className="rounded-full px-3 text-xl font-semibold text-primary">
<a href="https://github.com/molvqingtai/WebChat" target="https://github.com/molvqingtai/WebChat">
<GitHubLogoIcon className="mr-1 size-6"></GitHubLogoIcon>
Github
</a>
</Button>
</div>
)
}
BadgeList.displayName = 'BadgeList'
export default BadgeList

View file

@ -4,14 +4,14 @@ export interface AppLayoutProps {
children?: ReactNode children?: ReactNode
} }
const Layout: FC<AppLayoutProps> = ({ children }) => { const Main: FC<AppLayoutProps> = ({ children }) => {
return ( return (
<main className="grid min-h-screen min-w-screen items-center justify-center bg-gray-50 bg-[url(@/assets/images/texture.png)]"> <main className="grid min-h-screen min-w-screen items-center justify-center bg-gray-50 bg-[url(@/assets/images/texture.png)] font-sans">
<div className="relative rounded-xl bg-slate-50 shadow-lg">{children}</div> <div className="relative rounded-xl bg-slate-50 shadow-lg">{children}</div>
</main> </main>
) )
} }
Layout.displayName = 'Layout' Main.displayName = 'Main'
export default Layout export default Main