Tutorial updates (#489)

* fix: remove headline of Portfolio

* feat: added multiple backgrounds and new intro props
This commit is contained in:
Linkie Link 2023-09-20 10:26:14 +02:00 committed by GitHub
parent ca5e424700
commit 9a3fe4dd1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 21 additions and 11 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

BIN
public/images/intro/bg1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

BIN
public/images/intro/bg2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
public/images/intro/bg3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
public/images/intro/bg4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
public/images/intro/bg5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

BIN
public/images/intro/bg6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

BIN
public/images/intro/bg7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
public/images/intro/bg8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -9,6 +9,7 @@ export default function BorrowIntro() {
have an eye on your Account Health. Once it reaches zero, you'll be liquidated. have an eye on your Account Health. Once it reaches zero, you'll be liquidated.
</> </>
} }
bg='borrow'
></Intro> ></Intro>
) )
} }

View File

@ -12,6 +12,7 @@ export default function FarmIntro() {
farmer. Riches and ruins lie ahead. farmer. Riches and ruins lie ahead.
</> </>
} }
bg='farm'
> >
<Button <Button
text='Read more about Mars' text='Read more about Mars'

View File

@ -13,6 +13,7 @@ export default function LendIntro() {
don&apos;t miss out on this easy opportunity to grow your holdings! don&apos;t miss out on this easy opportunity to grow your holdings!
</> </>
} }
bg='lend'
> >
<ActionButton <ActionButton
text='Deposit assets' text='Deposit assets'

View File

@ -10,6 +10,7 @@ import useLocalStorage from 'hooks/useLocalStorage'
interface Props { interface Props {
text: string | ReactNode text: string | ReactNode
children?: ReactNode children?: ReactNode
bg: 'borrow' | 'lend' | 'farm' | 'portfolio'
} }
export default function Intro(props: Props) { export default function Intro(props: Props) {
@ -18,7 +19,7 @@ export default function Intro(props: Props) {
if (!tutorial) return null if (!tutorial) return null
return ( return (
<Card <Card
className='relative w-full p-8 mb-6 bg-cover bg-intro h-55' className={`relative w-full p-8 mb-6 bg-cover bg-intro-${props.bg} h-55`}
contentClassName='flex rjustify-between w-full h-full flex-col justify-between' contentClassName='flex rjustify-between w-full h-full flex-col justify-between'
> >
<Tooltip <Tooltip

View File

@ -65,7 +65,6 @@ export default function Content() {
} }
return ( return (
<Card title='Credit Accounts' contentClassName='p-6 pt-4'>
<div <div
className={classNames('grid w-full grid-cols-1 gap-4', 'md:grid-cols-2', 'lg:grid-cols-3')} className={classNames('grid w-full grid-cols-1 gap-4', 'md:grid-cols-2', 'lg:grid-cols-3')}
> >
@ -73,6 +72,5 @@ export default function Content() {
return <PortfolioCard key={accountId} accountId={accountId} /> return <PortfolioCard key={accountId} accountId={accountId} />
})} })}
</div> </div>
</Card>
) )
} }

View File

@ -23,6 +23,7 @@ export default function PortfolioIntro() {
</> </>
) )
} }
bg='portfolio'
></Intro> ></Intro>
) )
} }

View File

@ -34,6 +34,10 @@ module.exports = {
'fill-violet-500', 'fill-violet-500',
'fill-martian-red', 'fill-martian-red',
'fill-grey', 'fill-grey',
'bg-intro-borrow',
'bg-intro-lend',
'bg-intro-farm',
'bg-intro-portfolio',
'w-2', 'w-2',
], ],
theme: { theme: {
@ -51,7 +55,10 @@ module.exports = {
sticky: '50px', sticky: '50px',
}, },
backgroundImage: { backgroundImage: {
intro: 'url(/images/intro.webp), url(/images/intro.png)', 'intro-borrow': 'url(/images/intro/bg2.webp), url(/images/intro/bg2.png)',
'intro-lend': 'url(/images/intro/bg4.webp), url(/images/intro/bg4.png)',
'intro-farm': 'url(/images/intro/bg6.webp), url(/images/intro/bg6.png)',
'intro-portfolio': 'url(/images/intro/bg8.webp), url(/images/intro/bg8.png)',
}, },
backgroundSize: { backgroundSize: {
desktop: '100% auto', desktop: '100% auto',