Skip to content

Commit ceadfe1

Browse files
committed
Create homepage footer banner
1 parent ad78e37 commit ceadfe1

File tree

5 files changed

+47
-1
lines changed

5 files changed

+47
-1
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { FC } from 'react'
2+
import { useTranslation } from 'react-i18next'
3+
import { Button } from '@oasisprotocol/ui-library/src/components/ui/button'
4+
import RoflAppsImg from './images/rofl-apps.webp'
5+
6+
export const FooterBanner: FC = () => {
7+
const { t } = useTranslation()
8+
9+
return (
10+
<div className="w-full p-8 relative bg-primary rounded-md inline-flex justify-between items-center">
11+
<div className="inline-flex flex-col justify-start items-start gap-4">
12+
<div className="flex flex-col justify-start items-start gap-2 max-w-[390px]">
13+
<div className="justify-start text-primary-foreground text-2xl font-bold">
14+
{t('home.banner.offchainPerformance')} <br />
15+
{t('home.banner.onchainTrust')}.
16+
</div>
17+
<div className="justify-start text-primary-foreground text-sm font-normal mb-2">
18+
{t('home.banner.description')}
19+
</div>
20+
<Button color="secondary" variant="outline">
21+
{t('home.banner.getStarted')}
22+
</Button>
23+
</div>
24+
</div>
25+
<img
26+
alt={t('rofl.listTitle')}
27+
className="hidden md:block left-[390px] top-0 absolute"
28+
src={RoflAppsImg}
29+
/>
30+
</div>
31+
)
32+
}
8.22 KB
Loading

src/app/pages/HomePage/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { useSearchQueryNetworkParam } from '../../hooks/useSearchQueryNetworkPar
77
import { NetworkOfflineBanner } from '../../components/OfflineBanner'
88
import { useIsApiReachable } from '../../components/OfflineBanner/hook'
99
import { RoflAppsCard } from './RoflAppsCard'
10+
import { FooterBanner } from './FooterBanner'
1011

1112
export const HomePage: FC = () => {
1213
const { t } = useTranslation()
@@ -20,6 +21,7 @@ export const HomePage: FC = () => {
2021
<div className="px-6">
2122
<Search disabled={!isApiReachable} />
2223
<RoflAppsCard />
24+
<FooterBanner />
2325
</div>
2426
<Footer />
2527
</>

src/locales/en/translation.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,13 @@
669669
"indexerUnavailable": "Data about {{ scope }} is currently not available. Please check back later.",
670670
"link": "Oasis Explorer Home",
671671
"nodeOutOfDateSince": "The explorer's gRPC node has not observed new blocks since {{ lastUpdate }}. Check status.oasis.io.",
672-
"userOffline": "You are offline. We’re trying to reconnect."
672+
"userOffline": "You are offline. We’re trying to reconnect.",
673+
"banner": {
674+
"offchainPerformance": "Offchain Performance.",
675+
"onchainTrust": "Onchain Trust.",
676+
"getStarted": "Get started with ROFL",
677+
"description": "Build trustless apps with ROFL. Start quickly with templates. Manage everything from one interface."
678+
}
673679
},
674680
"paratimes": {
675681
"activeNodes": "{{nodes}} active",

src/types/images.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ declare module '*.svg' {
1010
export default url
1111
}
1212

13+
declare module '*.webp' {
14+
/** Image URL */
15+
const url: string
16+
export default url
17+
}
18+
1319
declare module 'bundle-text:*.svg' {
1420
/** Image content */
1521
const content: string

0 commit comments

Comments
 (0)