Skip to content

Commit 6a7afd9

Browse files
committed
SEO: Improve Kanvas section headings and image accessibility
1 parent 94d80d7 commit 6a7afd9

File tree

2 files changed

+80
-68
lines changed

2 files changed

+80
-68
lines changed

src/sections/Kanvas/Kanvas-design/kanvas-design-hero.js

Lines changed: 76 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -9,95 +9,107 @@ import { useState } from "react";
99
import { useStyledDarkMode } from "../../../theme/app/useStyledDarkMode";
1010

1111
const HeroSectionWrapper = styled.div`
12+
display: flex;
13+
flex-direction: row;
14+
background-color: ${(props) => props.theme.grey121212ToWhite};
15+
width: 100%;
16+
justify-content: space-evenly;
17+
align-items: center;
18+
padding: 3% 5% 8%;
19+
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
1220
13-
display: flex;
14-
flex-direction: row;
15-
background-color: ${props => props.theme.grey121212ToWhite};;
16-
width: 100%;
17-
justify-content: space-evenly;
18-
align-items: center;
19-
padding: 3% 5% 8%;
20-
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
21+
@media only screen and (max-width: 767px) {
22+
text-align: center;
23+
flex-direction: column-reverse;
24+
}
2125
26+
.hero-text {
27+
display: flex;
28+
flex-direction: column;
29+
flex: 0 0 35%;
30+
margin-top: 5%;
2231
@media only screen and (max-width: 767px) {
23-
text-align: center;
24-
flex-direction: column-reverse;
32+
max-width: 100%;
33+
margin-top: 15%;
2534
}
35+
}
2636
27-
.hero-text {
28-
display: flex;
29-
flex-direction: column;
30-
flex: 0 0 35%;
31-
margin-top: 5%;
32-
@media only screen and (max-width: 767px) {
33-
max-width: 100%;
34-
margin-top: 15%;
35-
}
36-
}
37+
h2 {
38+
padding-bottom: 2%;
39+
}
3740
38-
h2 {
39-
padding-bottom: 2%;
41+
.hero-image {
42+
display: grid;
43+
grid-template-rows: 5rem 5rem;
44+
place-items: center;
45+
margin: 5% 0;
46+
flex: 0 0 50%;
47+
max-width: 60%;
48+
@media only screen and (max-width: 767px) {
49+
max-width: 100%;
4050
}
4151
42-
.hero-image {
43-
display: grid;
44-
grid-template-rows: 5rem 5rem;
45-
place-items: center;
46-
margin: 5% 0;
47-
flex: 0 0 50%;
48-
max-width: 60%;
49-
@media only screen and (max-width: 767px) {
50-
max-width: 100%;
51-
}
52-
53-
.locator {
54-
/* transform: translateY(-5rem); */
55-
transition: 1s;
56-
z-index: 1;
57-
}
58-
.locator-moving {
59-
transform: translateY(5rem);
60-
transition: 1s;
61-
z-index: 1;
62-
}
63-
64-
.map {
65-
opacity: 0;
66-
transition: opacity ease 0.5s;
67-
z-index: 0;
68-
}
69-
.map-visible {
70-
opacity: 1;
71-
transition: opacity 1s ease 0.5s;
72-
}
52+
.locator {
53+
/* transform: translateY(-5rem); */
54+
transition: 1s;
55+
z-index: 1;
56+
}
57+
.locator-moving {
58+
transform: translateY(5rem);
59+
transition: 1s;
60+
z-index: 1;
61+
}
7362
63+
.map {
64+
opacity: 0;
65+
transition: opacity ease 0.5s;
66+
z-index: 0;
67+
}
68+
.map-visible {
69+
opacity: 1;
70+
transition: opacity 1s ease 0.5s;
7471
}
72+
}
7573
`;
7674

77-
7875
const KanvasHeroSection = () => {
7976
const [locatorRef, inView] = useInView({ threshold: 0.8 });
8077
const [imageInView, setimageInView] = useState(false);
81-
if (inView && !imageInView)
82-
setimageInView(true);
83-
else if (imageInView && !inView)
84-
setimageInView(false);
78+
if (inView && !imageInView) setimageInView(true);
79+
else if (imageInView && !inView) setimageInView(false);
8580

8681
const { isDark } = useStyledDarkMode();
8782

8883
return (
8984
<HeroSectionWrapper>
9085
<div className="hero-text">
91-
<h2><span>Design your infrastructure</span></h2>
92-
<p>Kanvasis the world’s only visual designer for Kubernetes and cloud native applications. Design, deploy, and manage your Kubernetes-based, cloud native deployments allowing you to speed up infrastructure configuration.</p>
86+
<h1>Kanvas Designer :Visual Cloud Native Infrastructure Tool</h1>
87+
88+
<h2>
89+
<span>Design Your Kubernetes & Cloud Native Infrastructure</span>
90+
</h2>
91+
<p>
92+
Kanvasis the world's only visual designer for Kubernetes and cloud
93+
native applications. Design, deploy, and manage your
94+
Kubernetes-baseddeployments, allowing you to speed up infrastructure
95+
configuration.
96+
</p>
9397
</div>
9498
<div className="hero-image">
95-
<img className={imageInView ? "locator-moving" : "locator"} src={isDark ? KanvasLocatorDark : KanvasLocatorLight} alt="locator" />
96-
<img className={imageInView ? "map map-visible" : "map"} src={isDark ? KanvasImageBottomDark : KanvasImageBottomLight} alt="integrations" ref={locatorRef} />
99+
<img
100+
className={imageInView ? "locator-moving" : "locator"}
101+
src={isDark ? KanvasLocatorDark : KanvasLocatorLight}
102+
alt="Kanvas visual infrastructure design locator icon"
103+
/>
104+
<img
105+
className={imageInView ? "map map-visible" : "map"}
106+
src={isDark ? KanvasImageBottomDark : KanvasImageBottomLight}
107+
alt="Kanvas infrastructure visualization diagram showing cloud native components"
108+
ref={locatorRef}
109+
/>
97110
</div>
98111
</HeroSectionWrapper>
99-
100112
);
101113
};
102114

103-
export default KanvasHeroSection;
115+
export default KanvasHeroSection;

src/sections/Kanvas/Kanvas-design/kanvas-design-integrations.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,19 +125,19 @@ const KanvasIntegrationsSection = () => {
125125
</div>
126126
<div className="hero-text">
127127
<div>
128-
<h1>
128+
<h2>
129129
{Math.ceil(integrations.allMdx.totalCount / 10) * 10}+ Built-in
130130
Integrations
131-
</h1>
131+
</h2>
132132
</div>
133133
<div>
134134
<img className="underline-img" src={UnderlineImg} alt="" />
135135
</div>
136136
<div>
137-
<h4>
137+
<h3>
138138
Support for all of your Cloud Native Infrastructure and
139139
Applications.
140-
</h4>
140+
</h3>
141141
</div>
142142
<div>
143143
<Button

0 commit comments

Comments
 (0)