Skip to content

Commit d4e21c8

Browse files
JuligsVmMad
andauthored
feat(dapp): update landing page hero (#476)
* feat(dapp): add video to landing page * feat(dapp): add poster video * chore(dapp): style landing input --------- Co-authored-by: JCNoguera <88061365+VmMad@users.noreply.github.com>
1 parent e286f80 commit d4e21c8

File tree

5 files changed

+18
-11
lines changed

5 files changed

+18
-11
lines changed

dapp/public/hero-landing.jpg

-537 KB
Binary file not shown.

dapp/public/hero-landing.mp4

3.19 MB
Binary file not shown.

dapp/public/poster-hero.png

245 KB
Loading

dapp/src/app/globals.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ body[data-scroll-locked] #top-navbar {
1313
padding-right: var(--removed-body-scroll-bar-size);
1414
}
1515

16-
.landing-background {
17-
background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/hero-landing.jpg');
18-
background-position: center;
19-
background-repeat: no-repeat;
20-
background-size: cover;
21-
}
22-
2316
.name-card-selected::before {
2417
--gradient-border-width: 1px;
2518
content: '';

dapp/src/components/LandingHero.tsx

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
'use client';
55

6-
import { Input, InputType } from '@iota/apps-ui-kit';
6+
import { Search } from '@iota/apps-ui-icons';
7+
import { ButtonUnstyled, Input, InputType, Video } from '@iota/apps-ui-kit';
78

89
import { useAvailabilityCheckDialog } from '@/stores/useAvailabilityCheckDialog';
910

@@ -14,18 +15,31 @@ export function LandingHero() {
1415
const { open, close } = useAvailabilityCheckDialog();
1516

1617
return (
17-
<div className="landing-background">
18-
<div className="container w-full h-full py-12 flex flex-col items-center justify-center gap-y-2xl min-h-[560px]">
18+
<div className="relative min-h-[560px] overflow-hidden">
19+
<Video
20+
src="/hero-landing.mp4"
21+
isAutoPlayEnabled
22+
disableControls
23+
className="absolute inset-0 w-full h-full object-cover z-[-1]"
24+
poster="/poster-hero.png"
25+
/>
26+
27+
<div className="container w-full h-full py-12 flex flex-col items-center justify-center gap-y-2xl text-center">
1928
<div className="flex flex-col gap-md">
2029
<h1 className="text-display-md -tracking-[0.4px]">{TITLE}</h1>
2130
<p className="text-title-lg leading-5 -tracking-[0.4px]">{DESCRIPTION}</p>
2231
</div>
2332

24-
<div className="w-full max-w-2xl flex flex-col backdrop-blur-md bg-white/5 rounded-lg overflow-hidden">
33+
<div className="w-full max-w-2xl flex flex-col backdrop-blur-md bg-shader-neutral-dark-8 rounded-full overflow-hidden border-2 border-names-neutral-100">
2534
<Input
2635
placeholder="Search for your IOTA name"
2736
type={InputType.Text}
2837
onFocus={() => open({ autoFocusInput: true, onCompleted: close })}
38+
trailingElement={
39+
<ButtonUnstyled className="p-sm rounded-full [&_svg]:h-5 [&_svg]:w-5 bg-names-neutral-100">
40+
<Search className="text-names-primary-0" />
41+
</ButtonUnstyled>
42+
}
2943
/>
3044
</div>
3145
</div>

0 commit comments

Comments
 (0)