-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathkanvas-design-integrations.js
More file actions
172 lines (158 loc) · 4.47 KB
/
kanvas-design-integrations.js
File metadata and controls
172 lines (158 loc) · 4.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
import React from "react";
import styled from "styled-components";
import { ReactComponent as IntegrationsImage } from "./images/integration-image-colorMode.svg";
import UnderlineImg from "./images/underline.svg";
import { useInView } from "react-intersection-observer";
import { useState } from "react";
import { useStaticQuery, graphql } from "gatsby";
import Button from "../../../reusecore/Button";
// import { useStyledDarkMode } from "../../../theme/app/useStyledDarkMode";
const IntegrationsSectionWrapper = styled.div`
display: flex;
flex-direction: row;
background: ${(props) => props.theme.integrationsGraphicGradient};
width: 100%;
justify-content: space-evenly;
align-items: center;
padding: 0% 4%;
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
@media only screen and (max-width: 767px) {
text-align: center;
flex-direction: column-reverse;
}
.hero-text {
display: flex;
flex-direction: column;
flex: 0 0 40%;
position: relative;
@media only screen and (max-width: 767px) {
max-width: 100%;
margin-top: 15%;
}
}
h1 {
font-weight: 100;
color: white;
}
h4 {
color: white;
}
.hero-image {
display: grid;
/* grid-template-rows: 5rem 5rem; */
place-items: center;
margin: 5% 0;
flex: 0 0 25%;
/* max-width: 25%; */
@media only screen and (max-width: 767px) {
max-width: 50%;
margin-top: 10%;
}
.diagram-hidden {
opacity: 0;
transition: 0.5s ease-out;
}
.diagram-visible {
opacity: 1;
transition: 0.5s ease-in;
}
}
.underline-img {
width: 20%;
top: 40%;
left: -6%;
@media only screen and (max-width: 1498px) {
top: 27%;
}
@media only screen and (max-width: 838px) {
top: 24%;
}
@media only screen and (max-width: 767px) {
left: 10%;
top: 40%;
}
@media only screen and (max-width: 500px) {
left: 0;
}
@media only screen and (max-width: 407px) {
left: 20%;
top: 25%;
}
}
`;
const KanvasIntegrationsSection = () => {
const [diagramRef, inView] = useInView({ threshold: 0.6 });
const [imageInView, setimageInView] = useState(false);
const integrations = useStaticQuery(graphql`
query {
allMdx(
filter: {
fields: { collection: { eq: "integrations" } }
frontmatter: { published: { eq: true } }
}
) {
totalCount
}
}
`);
if (inView && !imageInView) setimageInView(true);
else if (imageInView && !inView) setimageInView(false);
// const { isDark } = useStyledDarkMode();
return (
<IntegrationsSectionWrapper
id="kanvas-integrations-section"
aria-labelledby="kanvas-integrations"
>
<div
className="hero-image"
ref={diagramRef}
style={{ alignSelf: "center", width: "100%" }}
>
<IntegrationsImage
role="img"
title="Kanvas cloud native integrations - Kubernetes, service mesh, and infrastructure tools"
alt="Kanvas integrations diagram showing supported cloud native infrastructure tools and platforms"
className={imageInView ? "diagram-visible" : "diagram-hidden"}
/>
</div>
<div className="hero-text">
<div>
<h2 id="kanvas-integrations">
{Math.ceil(integrations.allMdx.totalCount / 10) * 10}+ Built-in
Cloud Native Integrations
</h2>
</div>
<div>
<img
className="underline-img"
src={UnderlineImg}
alt="decorative underline graphic highlighting integrations section"
aria-hidden="true"
/>
</div>
<div>
<p>
Integrate Kanvas with your cloud-native infrastructure — including
Kubernetes clusters, service meshes, CI/CD pipelines, and modern
application platforms — to streamline deployment and configuration
management.
</p>
</div>
<div>
<Button
aria-label="View all Kanvas cloud native integrations"
id="integrations"
$secondary
style={{ margin: "1.5rem 0 1.5rem 0" }}
$url="https://layer5.io/cloud-native-management/meshery/integrations"
$external={true}
rel="noopener noreferrer"
>
All Integrations
</Button>
</div>
</div>
</IntegrationsSectionWrapper>
);
};
export default KanvasIntegrationsSection;