Skip to content

Commit f64b11d

Browse files
feat: Website Improvements - Hero Animation - for #235 (#236)
feat: Website Improvements - Hero - for #235 Reduce Hero Animation size. Add Future of Digital Identity descriptive Signed-off-by: FabioPinheiro <[email protected]>
1 parent 4a75c95 commit f64b11d

File tree

6 files changed

+96
-41
lines changed

6 files changed

+96
-41
lines changed

src/components/atala-graphic/index.module.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
.hero__graphic__wrapper {
66
position: relative;
77
margin-left: auto;
8+
margin-right: auto;
89
z-index: 100;
910
transform: translateX(-5%) translateY(-60%);
1011
}
@@ -13,8 +14,8 @@
1314
position: relative;
1415
left: 0;
1516
right: auto;
16-
width: clamp(15.25rem, 100vw, 60.25rem);
17-
height: clamp(15.6875rem, 100vw, 58.6875rem);
17+
width: clamp(16.25rem, 40vw, 32rem);
18+
height: clamp(16.25rem, 40vw, 32rem);
1819
overflow: hidden;
1920
margin-right: auto;
2021
mask-image: url("/static/img/graphics/identus-hero.svg");
@@ -35,4 +36,4 @@
3536
.hero__graphic__wrapper {
3637
transform: translateX(25%);
3738
}
38-
}
39+
}

src/components/features/index.js

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import React from 'react';
22
import clsx from 'clsx';
33
import styles from './styles.module.css';
44
import HomeResources from '../resources';
5+
import { FutureOfIdentity } from '../resources';
6+
57

68
const FeatureList = [
79
{
@@ -21,13 +23,13 @@ const FeatureList = [
2123
<>
2224
Build secure, private, and verifiable interactions between individuals, organizations, and devices using
2325
open standards and protocols such as <a href="https://www.w3.org/TR/did-core/" target="_blank"
24-
rel="noreferrer">W3C DID spec</a>, <a
25-
href="https://www.w3.org/TR/vc-data-model/" target="_blank" rel="noreferrer">W3C VC-JWT</a>, <a
26-
href="https://hyperledger.github.io/anoncreds-spec/"
27-
target="_blank"
28-
rel="noreferrer">HL
29-
Anoncreds</a> , and <a href="https://identity.foundation/didcomm-messaging/spec/" target="_blank"
30-
rel="noreferrer">DIDComm V2</a> .
26+
rel="noreferrer">W3C DID spec</a>, <a
27+
href="https://www.w3.org/TR/vc-data-model/" target="_blank" rel="noreferrer">W3C VC-JWT</a>, <a
28+
href="https://hyperledger.github.io/anoncreds-spec/"
29+
target="_blank"
30+
rel="noreferrer">HL
31+
Anoncreds</a> , and <a href="https://identity.foundation/didcomm-messaging/spec/" target="_blank"
32+
rel="noreferrer">DIDComm V2</a> .
3133
</>
3234
),
3335
},
@@ -43,11 +45,11 @@ const FeatureList = [
4345
},
4446
];
4547

46-
function Feature({Svg, title, description}) {
48+
function Feature({ Svg, title, description }) {
4749
return (
4850
<div className={clsx('col col--4')}>
4951
<div className="text--center">
50-
<Svg className={styles.featureSvg} role="img"/>
52+
<Svg className={styles.featureSvg} role="img" />
5153
</div>
5254
<div className="text--center padding-horiz--md">
5355
<h3>{title}</h3>
@@ -61,13 +63,15 @@ export default function HomepageFeatures() {
6163
return (
6264
<section className={styles.features}>
6365
<div className="container">
66+
<FutureOfIdentity />
6467
<div className="row">
6568
{FeatureList.map((props, idx) => (
6669
<Feature key={idx} {...props} />
6770
))}
6871
</div>
69-
<HomeResources/>
72+
<HomeResources />
7073
</div>
7174
</section>
7275
);
7376
}
77+

src/components/features/styles.module.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.features {
22
display: flex;
33
align-items: center;
4-
padding: 2rem 0;
54
width: 100%;
65
}
76

@@ -17,4 +16,4 @@
1716
.featureSvg {
1817
height: 97.5px;
1918
width: 100px;
20-
}
19+
}

src/components/resources/index.js

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import React, {useCallback, useRef, useState} from 'react'
1+
import React, { useCallback, useRef, useState } from 'react'
22
import styles from './index.module.css';
33
import Link from '@docusaurus/Link';
4-
import {useColorMode} from '@docusaurus/theme-common';
4+
import { useColorMode } from '@docusaurus/theme-common';
55
import Button from '../button';
66

77
const Graphics = {
8-
apis({color = "#5559F2"}) {
8+
apis({ color = "#5559F2" }) {
99
return (
1010
<svg xmlns="http://www.w3.org/2000/svg" width={51} height={51} fill="none">
1111
<path
@@ -18,7 +18,7 @@ const Graphics = {
1818
</svg>
1919
)
2020
},
21-
docs({color = "#5559F2"}) {
21+
docs({ color = "#5559F2" }) {
2222
return (
2323
<svg xmlns="http://www.w3.org/2000/svg" width={51} height={51} fill="none">
2424
<path
@@ -31,7 +31,7 @@ const Graphics = {
3131
</svg>
3232
)
3333
},
34-
getStarted({color = "#767AF5"}) {
34+
getStarted({ color = "#767AF5" }) {
3535
return (
3636
<svg xmlns="http://www.w3.org/2000/svg" width={201} height={201} fill="none">
3737
<path
@@ -44,7 +44,7 @@ const Graphics = {
4444
</svg>
4545
)
4646
},
47-
resources({color = "#5559F2"}) {
47+
resources({ color = "#5559F2" }) {
4848
return (
4949
<svg xmlns="http://www.w3.org/2000/svg" width={51} height={51} fill="none">
5050
<path
@@ -57,7 +57,7 @@ const Graphics = {
5757
</svg>
5858
)
5959
},
60-
tutorials({color = "#5559F2"}) {
60+
tutorials({ color = "#5559F2" }) {
6161
return (
6262
<svg xmlns="http://www.w3.org/2000/svg" width={51} height={51} fill="none">
6363
<path
@@ -77,7 +77,7 @@ const Graphics = {
7777
</svg>
7878
)
7979
},
80-
walletSdkSwift({color = "#5559F2"}) {
80+
walletSdkSwift({ color = "#5559F2" }) {
8181
return (
8282
<svg xmlns="http://www.w3.org/2000/svg" width={51} height={51} fill="none">
8383
<path
@@ -90,7 +90,7 @@ const Graphics = {
9090
</svg>
9191
)
9292
},
93-
walletSdkKmm({color = "#5559F2"}) {
93+
walletSdkKmm({ color = "#5559F2" }) {
9494
return (
9595
<svg xmlns="http://www.w3.org/2000/svg" width={51} height={51} fill="none">
9696
<path
@@ -103,7 +103,7 @@ const Graphics = {
103103
</svg>
104104
)
105105
},
106-
walletSdkTS({color = "#5559F2"}) {
106+
walletSdkTS({ color = "#5559F2" }) {
107107
return (
108108
<svg xmlns="http://www.w3.org/2000/svg" width={51} height={51} fill="none">
109109
<path
@@ -161,8 +161,8 @@ function ResourceLink() {
161161
return (
162162
<div className={styles.resource__link}>
163163
<svg width={32} height={22} fill="none" xmlns="http://www.w3.org/2000/svg">
164-
<path className={styles.resource__link__svg__0} d="M3.33789 5.99976C5.06694 3.01075 8.29866 0.999756 12.0001 0.999756C17.5229 0.999756 22.0001 5.47691 22.0001 10.9998C22.0001 16.5226 17.5229 20.9998 12.0001 20.9998C8.29866 20.9998 5.06694 18.9888 3.33789 15.9998" stroke="#667085" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
165-
<path className={styles.resource__link__svg__1} d="M11 14.9998L15 10.9998M15 10.9998L11 6.99976M15 10.9998H1" stroke="#667085" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
164+
<path className={styles.resource__link__svg__0} d="M3.33789 5.99976C5.06694 3.01075 8.29866 0.999756 12.0001 0.999756C17.5229 0.999756 22.0001 5.47691 22.0001 10.9998C22.0001 16.5226 17.5229 20.9998 12.0001 20.9998C8.29866 20.9998 5.06694 18.9888 3.33789 15.9998" stroke="#667085" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
165+
<path className={styles.resource__link__svg__1} d="M11 14.9998L15 10.9998M15 10.9998L11 6.99976M15 10.9998H1" stroke="#667085" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
166166
</svg>
167167
</div>
168168
)
@@ -172,10 +172,10 @@ function Resource(props) {
172172
const ref = useRef(null);
173173
const lightRef = useRef(null)
174174
const backgroundRef = useRef(null);
175-
const {colorMode} = useColorMode();
175+
const { colorMode } = useColorMode();
176176

177177
const handleMouseMove = useCallback((event) => {
178-
const {clientX, clientY, currentTarget} = event;
178+
const { clientX, clientY, currentTarget } = event;
179179
const {
180180
height: targetHeight,
181181
width: targetWidth,
@@ -188,16 +188,16 @@ function Resource(props) {
188188
const mouseY = (clientY - offsetY);
189189
const x = ((mouseX - centerX) * .06);
190190
const y = ((mouseY - centerY) * .06);
191-
ref.current.animate({transform: `rotateX(${x}deg) rotateY(${y}deg)`}, {fill: "forwards"})
191+
ref.current.animate({ transform: `rotateX(${x}deg) rotateY(${y}deg)` }, { fill: "forwards" })
192192
lightRef.current.animate({
193193
top: `${mouseY}px`,
194194
left: `${mouseX}px`,
195-
}, {fill: "forwards", duration: 500})
195+
}, { fill: "forwards", duration: 500 })
196196
}, [ref, lightRef])
197197

198198
const handleMouseLeave = useCallback((event) => {
199199
event.preventDefault()
200-
ref.current.animate({transform: `rotateX(${0}deg) rotateY(${0}deg)`}, {fill: "forwards", duration: 1000})
200+
ref.current.animate({ transform: `rotateX(${0}deg) rotateY(${0}deg)` }, { fill: "forwards", duration: 1000 })
201201

202202
}, [backgroundRef])
203203

@@ -209,16 +209,27 @@ function Resource(props) {
209209
onMouseMove={handleMouseMove}
210210
>
211211
<Link href={props.linkTo} className={`${styles.resource}`}>
212-
<props.Svg color={colorMode === 'dark' ? "#767AF5" : "#5559F2"}/>
212+
<props.Svg color={colorMode === 'dark' ? "#767AF5" : "#5559F2"} />
213213
<h3>{props.title}</h3>
214214
<p>{props.content}</p>
215-
<ResourceLink linkTo={props.linkTo}/>
216-
<div className={styles.resource__light} ref={lightRef}/>
215+
<ResourceLink linkTo={props.linkTo} />
216+
<div className={styles.resource__light} ref={lightRef} />
217217
</Link>
218218
</div>
219219
);
220220
}
221221

222+
export function FutureOfIdentity() {
223+
return (
224+
<>
225+
<div className={styles.project__description}>
226+
<h5>Build the Future of Digital Identity</h5>
227+
<p>Hyperledger Identus is an open-source platform for building secure, standards-based digital identity solutions. With complete DID and verifiable credential functionality, it gives developers everything they need to create and integrate self-sovereign identity into apps and workflows - bridging trust between users, organizations, and systems.</p>
228+
</div>
229+
</>
230+
);
231+
}
232+
222233
export default function HomeResources() {
223234
return (
224235
<>
@@ -232,10 +243,11 @@ export default function HomeResources() {
232243
<div className={styles.home__resources}>
233244
{
234245
RESOURCES.map((resource, index) => (
235-
<Resource {...resource} key={index}/>
246+
<Resource {...resource} key={index} />
236247
))
237248
}
238249
</div>
239250
</>
240251
);
241252
}
253+

src/components/resources/index.module.css

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@
1919
margin-left: auto;
2020
align-self: flex-end;
2121
}
22+
2223
.resource:hover .resource__link__svg__0 {
2324
transform: rotate(180deg);
2425
}
26+
2527
.resource__link__svg__0 {
2628
transform-origin: 12px center;
2729
transition: transform 250ms;
@@ -30,9 +32,11 @@
3032
.resource:hover .resource__link__svg__1 {
3133
transform: translateX(15px);
3234
}
35+
3336
.resource__link__svg__1 {
3437
transition: transform 250ms;
3538
}
39+
3640
.resource p {
3741
font-size: 14px;
3842
margin-bottom: 0;
@@ -77,6 +81,7 @@
7781
.resource:hover .resource__light {
7882
opacity: 1;
7983
}
84+
8085
.resource__light {
8186
top: 0;
8287
left: 0;
@@ -91,7 +96,8 @@
9196
z-index: 10;
9297
}
9398

94-
.home__resources .resource h3, p {
99+
.home__resources .resource h3,
100+
p {
95101
/*color: var(--ifm-color-gray-600);*/
96102
color: inherit;
97103
}
@@ -126,4 +132,36 @@
126132
background: var(--ifm-color-primary);
127133
padding: .625rem 1.75rem;
128134
text-decoration: none;
135+
}
136+
137+
.project__description {
138+
max-width: 693px;
139+
margin: clamp(1rem, 20vw, 3rem) auto 5rem;
140+
height: auto;
141+
text-align: center;
142+
}
143+
144+
.project__description h5 {
145+
font-size: 17px;
146+
line-height: 28px;
147+
color: var(--ifm-color-primary);
148+
}
149+
150+
.project__description h2 {
151+
font-size: clamp(1.5rem, 2vw, 1.875rem);
152+
font-weight: 400;
153+
line-height: 38px;
154+
margin-bottom: 0;
155+
color: var(--ifm-color-resources-intro);
156+
}
157+
158+
.project__description a {
159+
color: #ffffff;
160+
border-radius: 25px;
161+
font-size: 1rem;
162+
display: inline-block;
163+
margin-top: 3.125rem;
164+
background: var(--ifm-color-primary);
165+
padding: .625rem 1.75rem;
166+
text-decoration: none;
129167
}

src/pages/index.module.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
.heroBanner {
1414
overflow: hidden;
15-
height: 100vh;
15+
height: 40vh;
1616
}
1717

1818
.container {
@@ -34,7 +34,7 @@
3434
.hero__title {
3535
color: var(--ifm-hero-text-color);
3636
font-weight: 500;
37-
font-size: clamp(2rem, 5vw,4rem);
37+
font-size: clamp(2rem, 5vw, 4rem);
3838
}
3939

4040
@media screen and (max-width: 996px) {
@@ -65,6 +65,7 @@
6565
.heroBanner {
6666
height: auto;
6767
}
68+
6869
.hero__content {
6970
height: auto;
7071
}
@@ -73,6 +74,6 @@
7374

7475
@media screen and (min-height: 667px) {
7576
.hero__content {
76-
top: clamp(9.125rem, 100vw, 11.125rem);
77+
top: clamp(5.125rem, 100vw, 9.125rem);
7778
}
78-
}
79+
}

0 commit comments

Comments
 (0)