Skip to content

Commit

Permalink
💄 style: Update welcome assetes
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Nov 7, 2023
1 parent 0dcb44f commit 8840554
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 11 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ LobeChat is an open-source, extensible ([Function Calling][fc-link]) high-perfor
[![][share-reddit-shield]][share-reddit-link]
[![][share-weibo-shield]][share-weibo-link]

<sup>Pioneering the new age of thinking and creating. Built for you, the Super Individual.</sup>

![](https://gw.alipayobjects.com/zos/kitchen/RKnWrrfuMl/welcome.webp)

</div>
Expand Down
4 changes: 2 additions & 2 deletions locales/en_US/welcome.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"pickAgent": "Or choose from the following agent templates",
"skip": "Skip Creation",
"slogan": {
"desc1": "Unlock the power of your brain and ignite your creativity. Your intelligent agent is always here.",
"desc1": "Pioneering the new age of thinking and creating. Built for you, the Super Individual.",
"desc2": "Create your first agent and let's get started~",
"title": "Give yourself a smarter brain"
"title": "Unlock the superpower of your brain"
}
}
10 changes: 6 additions & 4 deletions src/app/chat/features/SystemRole/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const SystemRole = memo(() => {

const handleOpen = () => {
if (!init) return;
setEditing(false);

setOpen(true);
};

Expand Down Expand Up @@ -82,9 +82,11 @@ const SystemRole = memo(() => {
extra: (
<AgentInfo
meta={meta}
onAvatarClick={() =>
router.push(pathString('/chat/settings', { hash: location.hash }))
}
onAvatarClick={() => {
setOpen(false);
setEditing(false);
router.push(pathString('/chat/settings', { hash: location.hash }));
}}
style={{ marginBottom: 16 }}
/>
),
Expand Down
23 changes: 18 additions & 5 deletions src/app/welcome/features/Banner/Hero.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,40 @@
import dynamic from 'next/dynamic';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
import { Flexbox } from 'react-layout-kit';

import { genSize, useStyles } from './style';

const LogoThree = dynamic(() => import('@lobehub/ui/es/LogoThree'));
const LogoSpline = dynamic(() => import('@lobehub/ui/es/LogoThree/LogoSpline'));

const Hero = memo<{ mobile?: boolean; width: number }>(({ width, mobile }) => {
const size = {
const size: any = {
base: genSize(width / 3.5, 240),
desc: genSize(width / 50, 14),
logo: genSize(width / 3.8, 180),
logo: genSize(width / 2.5, 180),
title: genSize(width / 20, 32),
};

size.marginTop = mobile ? -size.logo / 9 : -size.logo / 3;
size.marginBottom = mobile ? -size.logo / 9 : -size.logo / 4;

const { styles } = useStyles(size.base);

const { t } = useTranslation('welcome');

return (
<>
<div style={{ height: size.logo, marginTop: -size.logo / 5, width: size.logo }}>
<LogoThree size={size.logo} />
</div>
<Flexbox
style={{
height: size.logo,
marginBottom: size.marginBottom,
marginTop: size.marginTop,
position: 'relative',
}}
>
{mobile ? <LogoThree size={size.logo} /> : <LogoSpline height={'100%'} width={'100%'} />}
</Flexbox>
<div className={styles.title} style={{ fontSize: size.title }}>
<strong style={mobile ? { fontSize: '1.2em' } : {}}>LobeChat</strong>
{mobile ? <br /> : ' '}
Expand Down

0 comments on commit 8840554

Please sign in to comment.