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.
</>
}
bg='borrow'
></Intro>
)
}

View File

@ -12,6 +12,7 @@ export default function FarmIntro() {
farmer. Riches and ruins lie ahead.
</>
}
bg='farm'
>
<Button
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!
</>
}
bg='lend'
>
<ActionButton
text='Deposit assets'

View File

@ -10,6 +10,7 @@ import useLocalStorage from 'hooks/useLocalStorage'
interface Props {
text: string | ReactNode
children?: ReactNode
bg: 'borrow' | 'lend' | 'farm' | 'portfolio'
}
export default function Intro(props: Props) {
@ -18,7 +19,7 @@ export default function Intro(props: Props) {
if (!tutorial) return null
return (
<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'
>
<Tooltip

View File

@ -65,14 +65,12 @@ export default function Content() {
}
return (
<Card title='Credit Accounts' contentClassName='p-6 pt-4'>
<div
className={classNames('grid w-full grid-cols-1 gap-4', 'md:grid-cols-2', 'lg:grid-cols-3')}
>
{accountIds.map((accountId: string, index: number) => {
return <PortfolioCard key={accountId} accountId={accountId} />
})}
</div>
</Card>
<div
className={classNames('grid w-full grid-cols-1 gap-4', 'md:grid-cols-2', 'lg:grid-cols-3')}
>
{accountIds.map((accountId: string, index: number) => {
return <PortfolioCard key={accountId} accountId={accountId} />
})}
</div>
)
}

View File

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

View File

@ -34,6 +34,10 @@ module.exports = {
'fill-violet-500',
'fill-martian-red',
'fill-grey',
'bg-intro-borrow',
'bg-intro-lend',
'bg-intro-farm',
'bg-intro-portfolio',
'w-2',
],
theme: {
@ -51,7 +55,10 @@ module.exports = {
sticky: '50px',
},
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: {
desktop: '100% auto',