-
-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
680554e
commit 8fd035c
Showing
10 changed files
with
236 additions
and
69 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { Logo } from '@lobehub/ui'; | ||
import { createStyles, useThemeMode } from 'antd-style'; | ||
import { memo } from 'react'; | ||
import { Flexbox } from 'react-layout-kit'; | ||
import urlJoin from 'url-join'; | ||
|
||
import { OFFICIAL_SITE, STATUS_URL } from '@/const/url'; | ||
|
||
import Follow from './Follow'; | ||
|
||
export const COPYRIGHT = `© 2023-${new Date().getFullYear()} LobeHub, LLC`; | ||
|
||
const useStyles = createStyles(({ css, token }) => { | ||
return { | ||
container: css` | ||
font-size: 14px; | ||
`, | ||
description: css` | ||
color: ${token.colorTextDescription}; | ||
`, | ||
logo: css` | ||
display: flex; | ||
flex: none; | ||
align-items: center; | ||
color: inherit !important; | ||
`, | ||
status: css` | ||
color-scheme: none; | ||
background: transparent; | ||
border: none !important; | ||
`, | ||
}; | ||
}); | ||
|
||
const Brand = memo(() => { | ||
const { styles } = useStyles(); | ||
const { isDarkMode } = useThemeMode(); | ||
|
||
return ( | ||
<Flexbox className={styles.container} gap={16}> | ||
<a className={styles.logo} href={OFFICIAL_SITE}> | ||
<Logo type={'combine'} /> | ||
</a> | ||
<div>Empowering your AI dreams</div> | ||
<div className={styles.description}>{COPYRIGHT}</div> | ||
<Follow /> | ||
<iframe | ||
className={styles.status} | ||
height="30" | ||
loading={'lazy'} | ||
scrolling="no" | ||
src={urlJoin(STATUS_URL, `badge?theme=${isDarkMode ? 'dark' : 'light'}`)} | ||
width="250" | ||
/> | ||
</Flexbox> | ||
); | ||
}); | ||
|
||
export default Brand; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { SiDiscord, SiGithub, SiMedium, SiX } from '@icons-pack/react-simple-icons'; | ||
import { ActionIcon } from '@lobehub/ui'; | ||
import { createStyles } from 'antd-style'; | ||
import { memo } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { Flexbox } from 'react-layout-kit'; | ||
|
||
import { DISCORD_URL, GITHUB_REPO_URL, MEDIDUM_URL, X } from '@/const/url'; | ||
|
||
const useStyles = createStyles(({ css, token }) => { | ||
return { | ||
icon: css` | ||
svg { | ||
fill: ${token.colorTextDescription}; | ||
} | ||
&:hover { | ||
svg { | ||
fill: ${token.colorText}; | ||
} | ||
} | ||
`, | ||
}; | ||
}); | ||
|
||
const Follow = memo(() => { | ||
const { styles } = useStyles(); | ||
const { t } = useTranslation('common'); | ||
return ( | ||
<Flexbox gap={8} horizontal> | ||
<a href={GITHUB_REPO_URL} rel="noreferrer" target={'_blank'}> | ||
<ActionIcon | ||
className={styles.icon} | ||
icon={SiGithub as any} | ||
title={t('follow', { name: 'GitHub' })} | ||
/> | ||
</a> | ||
<a href={X} rel="noreferrer" target={'_blank'}> | ||
<ActionIcon className={styles.icon} icon={SiX as any} title={t('follow', { name: 'X' })} /> | ||
</a> | ||
<a href={DISCORD_URL} rel="noreferrer" target={'_blank'}> | ||
<ActionIcon | ||
className={styles.icon} | ||
icon={SiDiscord as any} | ||
title={t('follow', { name: 'Discord' })} | ||
/> | ||
</a> | ||
<a href={MEDIDUM_URL} rel="noreferrer" target={'_blank'}> | ||
<ActionIcon | ||
className={styles.icon} | ||
icon={SiMedium as any} | ||
title={t('follow', { name: 'Medium' })} | ||
/> | ||
</a> | ||
</Flexbox> | ||
); | ||
}); | ||
|
||
export default Follow; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters