perf: 图片cdn

This commit is contained in:
archer
2023-03-06 10:56:46 +08:00
parent bf81d23de4
commit 9f8d696bbe
16 changed files with 78 additions and 33 deletions

View File

@@ -34,7 +34,12 @@ const Navbar = ({
>
{/* logo */}
<Box pb={4}>
<Image src={'/logo.png'} width={'35'} height={'35'} alt=""></Image>
<Image
src={'https://docgpt-1301319986.cos.ap-shanghai.myqcloud.com/icon/logo.png'}
width={'35'}
height={'35'}
alt=""
></Image>
</Box>
{/* 导航列表 */}
<Box flex={1}>

View File

@@ -48,7 +48,13 @@ const NavbarPhone = ({
<DrawerContent maxWidth={'50vw'}>
<DrawerBody p={4}>
<Box py={4}>
<Image src={'/logo.png'} margin={'auto'} w={'35'} h={'35'} alt=""></Image>
<Image
src={'https://docgpt-1301319986.cos.ap-shanghai.myqcloud.com/icon/logo.png'}
margin={'auto'}
w={'35'}
h={'35'}
alt=""
></Image>
</Box>
{navbarList.map((item) => (
<Flex

View File

@@ -1,5 +1,47 @@
import React from 'react';
export const codeLight: { [key: string]: React.CSSProperties } = {
'code[class*=language-]': {
color: '#d4d4d4',
fontSize: '13px',
textShadow: 'none',
fontFamily: 'Menlo,Monaco,Consolas,"Andale Mono","Ubuntu Mono","Courier New",monospace',
direction: 'ltr',
textAlign: 'left',
whiteSpace: 'pre',
wordSpacing: 'normal',
wordBreak: 'normal',
lineHeight: '1.5',
MozTabSize: '4',
OTabSize: '4',
tabSize: '4',
WebkitHyphens: 'none',
MozHyphens: 'none',
msHyphens: 'none',
hyphens: 'none'
},
'pre[class*=language-]': {
color: '#d4d4d4',
fontSize: '13px',
textShadow: 'none',
fontFamily: 'Menlo,Monaco,Consolas,"Andale Mono","Ubuntu Mono","Courier New",monospace',
direction: 'ltr',
textAlign: 'left',
whiteSpace: 'pre',
wordSpacing: 'normal',
wordBreak: 'normal',
lineHeight: '1.5',
MozTabSize: '4',
OTabSize: '4',
tabSize: '4',
WebkitHyphens: 'none',
MozHyphens: 'none',
msHyphens: 'none',
hyphens: 'none',
padding: '1em',
margin: '.5em 0',
overflow: 'auto',
background: '#1e1e1e'
},
'code[class*=language-] ::selection': {
textShadow: 'none',
background: '#264f78'

View File

@@ -39,5 +39,5 @@ export const introPage = `
### 其他问题
还有其他问题,可以加我 wx拉个交流群大家一起聊聊。
![](/imgs/erweima.jpg)
![](https://docgpt-1301319986.cos.ap-shanghai.myqcloud.com/icon/erweima.jpg)
`;

View File

@@ -300,8 +300,12 @@ const Chat = () => {
<Flex maxW={'800px'} m={'auto'} alignItems={'flex-start'}>
<Box mr={media(4, 1)}>
<Image
src={item.obj === 'Human' ? '/imgs/human.png' : '/imgs/modelAvatar.png'}
alt="/imgs/modelAvatar.png"
src={
item.obj === 'Human'
? 'https://docgpt-1301319986.cos.ap-shanghai.myqcloud.com/icon/human.png'
: 'https://docgpt-1301319986.cos.ap-shanghai.myqcloud.com/icon/logo.png'
}
alt="https://docgpt-1301319986.cos.ap-shanghai.myqcloud.com/icon/logo.png"
width={30}
height={30}
/>
@@ -390,7 +394,7 @@ const Chat = () => {
{isChatting ? (
<Image
style={{ transform: 'translateY(4px)' }}
src={'/icon/chatting.svg'}
src={'https://docgpt-1301319986.cos.ap-shanghai.myqcloud.com/icon/chatting.svg'}
width={30}
height={30}
alt={''}

View File

@@ -1,5 +1,6 @@
.loginPage {
background: url('/icon/login-bg.svg') no-repeat;
background: url('https://docgpt-1301319986.cos.ap-shanghai.myqcloud.com/icon/login-bg.svg')
no-repeat;
background-size: cover;
user-select: none;
}

View File

@@ -53,7 +53,7 @@ const Login = () => {
>
{isPc && (
<Image
src={'/icon/loginLeft.svg'}
src={'https://docgpt-1301319986.cos.ap-shanghai.myqcloud.com/icon/loginLeft.svg'}
order={pageType === PageTypeEnum.login ? 0 : 2}
flex={'1 0 0'}
w="0"