Skip to content

Commit

Permalink
✨ feat(assets): add assets cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Jun 19, 2023
1 parent eebc06e commit 5e3e62c
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default defineConfig({
},
],
],
favicons: ['https://raw.githubusercontent.com/lobehub/favicon/main/dist/favicon.ico'],
favicons: ['https://npm.elemecdn.com/@lobehub/assets/favicons/favicon.ico'],
locales: [{ id: 'en-US', name: 'English' }],
mfsu: isWin
? undefined
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div align="center">

<img width="160" src="https://raw.githubusercontent.com/lobehub/.github/main/profile/Logo.webp">
<img width="160" src="https://npm.elemecdn.com/@lobehub/assets/logo/logo-3d.webp">

<h1>Lobe UI</h1>

Expand All @@ -21,7 +21,7 @@ Lobe UI is an open-source UI component library for building _AIGC_ web apps
[![stargazers][stargazers-shield]][stargazers-url]
[![issues][issues-shield]][issues-url]

![](https://github.com/othneildrew/Best-README-Template/raw/master/images/screenshot.png)
![](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png)

</div>

Expand Down
30 changes: 30 additions & 0 deletions packages/dumi-theme-lobehub/src/layouts/DocLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,36 @@ const DocumentLayout = memo(() => {
{fm.title} - {siteTitle}
</title>
)}
<link
href="https://npm.elemecdn.com/@lobehub/assets/favicons/apple-touch-icon.png"
rel="apple-touch-icon"
sizes="180x180"
/>
<link
href="https://npm.elemecdn.com/@lobehub/assets/favicons/favicon-32x32.png"
rel="icon"
sizes="32x32"
type="image/png"
/>
<link
href="https://npm.elemecdn.com/@lobehub/assets/favicons/favicon-16x16.png"
rel="icon"
sizes="16x16"
type="image/png"
/>
<link
href="https://npm.elemecdn.com/@lobehub/assets/favicons/site.webmanifest"
rel="manifest"
/>
<link
color="#000000"
href="https://npm.elemecdn.com/@lobehub/assets/favicons/safari-pinned-tab.svg"
rel="mask-icon"
/>
<meta content="LobeHub" name="apple-mobile-web-app-title" />
<meta content="LobeHub" name="application-name" />
<meta content="#000000" name="msapplication-TileColor" />
<meta content="#000000" name="theme-color" />
</Helmet>
),
[intl, fm, siteTitle, page === 'home'],
Expand Down
6 changes: 3 additions & 3 deletions packages/dumi-theme-lobehub/src/slots/Footer/columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ export const getColumns = ({ github }: GetColumnParameters) => {
{
description: 'AIGC Components',
openExternal: true,
title: '🤯 Lobe UI',
title: 'Lobe UI',
url: 'https://github.com/lobehub/lobe-ui',
},
{
description: 'Chatbot Client',
openExternal: true,
title: '🤯 Lobe Chat',
title: 'Lobe Chat',
url: 'https://github.com/lobehub/lobe-chat',
},
{
description: 'Node Flow Editor',
openExternal: true,
title: '🤯 Lobe Flow',
title: 'Lobe Flow',
url: 'https://github.com/lobehub/lobe-flow',
},
],
Expand Down
2 changes: 1 addition & 1 deletion src/Avatar/demos/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default () => {
const store = useCreateStore();
const control: ActionIconProps | any = useControls(
{
avatar: 'https://raw.githubusercontent.com/lobehub/favicon/main/icon.png',
avatar: 'https://npm.elemecdn.com/@lobehub/assets/logo/logo-3d.webp',
background: '#FEE064',
shape: {
options: ['circle', 'square'],
Expand Down
12 changes: 0 additions & 12 deletions src/Logo/Logo3D.tsx

This file was deleted.

16 changes: 13 additions & 3 deletions src/Logo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { type ReactNode, memo } from 'react';
import { DivProps } from '@/types';

import Divider from './Divider';
import Logo3D from './Logo3D';
import LogoFlat from './LogoFlat';
import LogoHighContrast from './LogoHighContrast';
import LogoText from './LogoText';
Expand Down Expand Up @@ -34,7 +33,14 @@ const Logo = memo<LogoProps>(({ type = '3d', size = 32, style, extra, className,

switch (type) {
case '3d': {
return <Logo3D style={{ height: size, width: size, ...style }} {...props} />;
return (
<img
alt="lobehub"
src="https://npm.elemecdn.com/@lobehub/assets/logo/logo-3d.webp"
style={{ height: size, width: size, ...style }}
{...props}
/>
);
}
case 'flat': {
return <LogoFlat style={{ height: size, width: size, ...style }} {...props} />;
Expand All @@ -48,7 +54,11 @@ const Logo = memo<LogoProps>(({ type = '3d', size = 32, style, extra, className,
case 'combine': {
logoComponent = (
<>
<Logo3D style={{ height: size, width: size }} />
<img
alt="lobehub"
src="https://npm.elemecdn.com/@lobehub/assets/logo/logo-3d.webp"
style={{ height: size, width: size, ...style }}
/>
<LogoText style={{ height: size, marginLeft: Math.round(size / 4), width: 'auto' }} />
</>
);
Expand Down
5 changes: 3 additions & 2 deletions src/ThemeProvider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ const ThemeProvider = memo<ThemeProviderProps>(
theme={lobeTheme}
themeMode={themeMode}
>
<FontLoader url="https://raw.githubusercontent.com/IKKI2000/harmonyos-fonts/main/css/harmonyos_sans.css" />
<FontLoader url="https://raw.githubusercontent.com/IKKI2000/harmonyos-fonts/main/css/harmonyos_sans_sc.css" />
<FontLoader url="https://npm.elemecdn.com/@lobehub/[email protected]/webfonts/css/hack-nerd-font-mono.css" />
<FontLoader url="https://npm.elemecdn.com/@lobehub/[email protected]/webfonts/css/harmonyos-sans.css" />
<FontLoader url="https://npm.elemecdn.com/@lobehub/[email protected]/webfonts/css/harmonyos-sans-sc.css" />
<GlobalStyle />
<App style={{ minHeight: 'inherit', width: 'inherit' }}>{children}</App>
</AntdThemeProvider>
Expand Down
2 changes: 1 addition & 1 deletion src/styles/theme/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AliasToken } from 'antd/es/theme/interface';
const FONT_EMOJI = `"Segoe UI Emoji","Segoe UI Symbol","Apple Color Emoji","Twemoji Mozilla","Noto Color Emoji","Android Emoji"`;
const FONT_EN = `"HarmonyOS Sans","Segoe UI","SF Pro Display",-apple-system,BlinkMacSystemFont,Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif`;
const FONT_CN = `"HarmonyOS Sans SC","PingFang SC","Hiragino Sans GB","Microsoft Yahei UI","Microsoft Yahei","Source Han Sans CN",sans-serif`;
const FONT_CODE = `ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace`;
const FONT_CODE = `"Hack Nerd Font Mono",ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace`;

export const baseToken: Partial<AliasToken> = {
borderRadius: 5,
Expand Down

1 comment on commit 5e3e62c

@vercel
Copy link

@vercel vercel bot commented on 5e3e62c Jun 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

lobe-ui – ./

lobe-ui-lobehub.vercel.app
lobe-ui.vercel.app
lobe-ui-git-master-lobehub.vercel.app
ui.lobehub.com

Please sign in to comment.