Skip to content

Commit fe34ea1

Browse files
authored
Merge branch 'master' into fix/learn-page-card-layout
2 parents 4976317 + 5795d93 commit fe34ea1

6 files changed

Lines changed: 128 additions & 36 deletions

File tree

‎src/collections/handbook/security-vulnerabilities/index.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import Kanvas from "../../../assets/images/kanvas/icon-only/kanvas-icon-color.sv
1818

1919
We are very grateful to the security researchers and users that report security vulnerabilities. We investigate each report thoroughly.
2020

21-
To make a report, send an email to the private <a href="mailto:security-vulns-reports@layer5.io">security-vulns-reports@layer5.io</a> mailing list with the vulnerability details. For normal product bugs unrelated to latent security vulnerabilities, please head to the appropriate repository and submit a <a href="https://github.com/layer5io/layer5/issues/new/choose">new issue</a>.
21+
To make a report, send an email to the private <a href="mailto:security@layer5.io">security@layer5.io</a> mailing list with the vulnerability details. For normal product bugs unrelated to latent security vulnerabilities, please head to the appropriate repository and submit a <a href="https://github.com/layer5io/layer5/issues/new/choose">new issue</a>.
2222

2323
Note that the Layer5 community spans six GitHub organizations:
2424

‎src/components/AdventuresVol/index.js‎

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,52 @@
11
import React from "react";
2+
import { Link } from "gatsby";
23
import { HiOutlineChevronRight } from "@react-icons/all-files/hi/HiOutlineChevronRight";
34
import { AdventuresVolWrapper } from "./adventures-vol.style";
45

56
const AdventuresVol = ({ title, description, to, image }) => {
7+
const isExternalOrStatic =
8+
to &&
9+
(to.startsWith("http://") ||
10+
to.startsWith("https://") ||
11+
to.split("?")[0].split("#")[0].toLowerCase().endsWith(".pdf") ||
12+
to.startsWith("mailto:"));
13+
14+
const isMailTo = to && to.startsWith("mailto:");
15+
16+
const cardContent = (
17+
<div className="handbook__card">
18+
<h1 className="handbook__card--head">{title}</h1>
19+
<div className="handbook__card--line"></div>
20+
<img src={image} />
21+
<p className="handbook__card--para">{description}</p>
22+
{to && (
23+
<div className="handbook__card--lm__container">
24+
<span className="handbook__card--lm">
25+
Read More <HiOutlineChevronRight />
26+
</span>
27+
</div>
28+
)}
29+
</div>
30+
);
31+
632
return (
733
<AdventuresVolWrapper>
8-
<a href={to} className="handbook__card--main">
9-
<div className="handbook__card">
10-
<h1 className="handbook__card--head">{title}</h1>
11-
<div className="handbook__card--line"></div>
12-
<img src={image} />
13-
<p className="handbook__card--para">
14-
{description}
15-
</p>
16-
{to && (
17-
<div className="handbook__card--lm__container">
18-
<a href={to} className="handbook__card--lm">
19-
Read More <HiOutlineChevronRight />
20-
</a>
21-
</div>
22-
)}
23-
</div>
24-
</a>
34+
{!to ? (
35+
<div className="handbook__card--main">{cardContent}</div>
36+
) : isExternalOrStatic ? (
37+
<a
38+
href={to}
39+
className="handbook__card--main"
40+
target={isMailTo ? undefined : "_blank"}
41+
rel={isMailTo ? undefined : "noreferrer"}
42+
>
43+
{cardContent}
44+
</a>
45+
) : (
46+
<Link to={to} className="handbook__card--main">
47+
{cardContent}
48+
</Link>
49+
)}
2550
</AdventuresVolWrapper>
2651
);
2752
};

‎src/components/HandbookCard/index.js‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,16 @@ import { HandbookCardWrapper } from "./HandbookCard.style";
66
const HandbookCard = ({ title, description, to }) => {
77
return (
88
<HandbookCardWrapper>
9-
<Link to={to} class="handbook__card--main">
9+
<Link to={to} className="handbook__card--main">
1010
<div className="handbook__card">
1111
<h1 className="handbook__card--head">{title}</h1>
1212
<div className="handbook__card--line"></div>
13-
<p className="handbook__card--para">
14-
{description}
15-
</p>
13+
<p className="handbook__card--para">{description}</p>
1614
{to && (
1715
<div className="handbook__card--lm__container">
18-
<a href={to} className="handbook__card--lm">
16+
<span className="handbook__card--lm">
1917
Read More <HiOutlineChevronRight />
20-
</a>
18+
</span>
2119
</div>
2220
)}
2321
</div>

‎src/sections/Meshery/Meshery-integrations/Individual-Integrations/Component.style.js‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,20 @@ export const ComponentsWrapper = styled.div`
2323
}
2424
2525
.componentsSection {
26-
display: flex;
27-
flex-wrap: wrap;
26+
display: grid;
27+
grid-template-columns: repeat(1, 1fr);
2828
gap: 1.5rem;
2929
padding: 3rem 2rem 5rem 2rem;
30-
justify-content: center;
30+
31+
@media (min-width: 600px) {
32+
grid-template-columns: repeat(2, 1fr);
33+
}
34+
35+
@media (width > 1024px) {
36+
grid-template-columns: repeat(3, 1fr);
37+
}
3138
}
39+
3240
.maincontainer {
3341
display: flex;
3442
align-items: center;
@@ -37,16 +45,15 @@ export const ComponentsWrapper = styled.div`
3745
padding: 0.5rem 1rem;
3846
border-radius: 0.85rem;
3947
width: 100%;
40-
flex: 30%;
41-
max-width: 350px;
4248
}
4349
4450
.items {
4551
border-radius: 0.625rem;
4652
text-transform: uppercase;
4753
color: ${(props) => props.theme.text};
4854
font-size: 0.875rem;
49-
transition: all .1s ease-in-out;
55+
transition: all 0.1s ease-in-out;
5056
line-height: 1.1875rem;
5157
width: 100%;
58+
}
5259
`;

‎src/sections/Resources/Resources-error/emptyStateTemplate.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ const NoResources = ({ errorMessage,errorSubtitle }) => {
99
<ResourcePageWrapper>
1010
<div className="no-resources-page">
1111
<Container>
12-
<Row>
13-
<Col $sm={12} $lg={4}>
12+
<Row className="empty-state-row">
13+
<Col $xs={12} $lg={4}>
1414
<img src={serviceMesh} alt="service meshes" className="mesh" />
1515
</Col>
16-
<Col $sm={12} $lg={8}>
16+
<Col $xs={12} $lg={8}>
1717
<div className="error-text">
1818
<h1 className="errorMessage"> {errorMessage} </h1>
1919
<h3 className="errorSubtitle">{errorSubtitle}</h3>

‎src/sections/Resources/Resources-grid/resourceGrid.style.js‎

Lines changed: 65 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,28 +75,90 @@ export const ResourcePageWrapper = styled.div`
7575
margin: 1rem;
7676
7777
box-shadow: 0px 3px 10px 1px rgba(0, 179, 159, 0.5);
78+
79+
.empty-state-row {
80+
flex-wrap: wrap;
81+
}
82+
7883
.errorMessage {
7984
font-size: 2rem;
8085
line-height: 2rem;
86+
overflow-wrap: break-word;
87+
word-break: break-word;
8188
}
8289
.error-text{
8390
margin-top: 5rem;
91+
overflow-wrap: break-word;
92+
word-break: break-word;
8493
}
8594
.errorSubtitle {
8695
font-weight: 400;
8796
font-size: 1.5rem;
8897
color: gray;
8998
font-style: italic;
9099
margin-top: 2.5rem;
100+
overflow-wrap: break-word;
101+
word-break: break-word;
91102
}
92103
img{
93104
display: block;
94105
margin:auto;
95106
margin-top: 3.125rem;
96107
width: 14rem;
97-
@media only screen and (max-width:700px){
98-
max-width: 100%;
99-
}
108+
max-width: 100%;
109+
height: auto;
110+
object-fit: contain;
111+
}
112+
113+
@media only screen and (max-width: 992px) {
114+
padding: 2rem 1.5rem 3rem;
115+
text-align: center;
116+
117+
.empty-state-row {
118+
justify-content: center;
119+
}
120+
121+
img {
122+
margin: 1rem auto 0;
123+
width: 12rem;
124+
max-width: 100%;
125+
height: auto;
126+
}
127+
128+
.error-text {
129+
margin-top: 1.5rem;
130+
text-align: center;
131+
}
132+
133+
.errorMessage {
134+
font-size: 1.5rem;
135+
line-height: 1.3;
100136
}
137+
138+
.errorSubtitle {
139+
font-size: 1.15rem;
140+
line-height: 1.4;
141+
margin-top: 1rem;
142+
}
143+
}
144+
145+
@media only screen and (max-width: 575px) {
146+
padding: 1.5rem 1rem 2.5rem;
147+
margin: 0.5rem;
148+
149+
img {
150+
width: 9rem;
151+
max-width: 100%;
152+
}
153+
154+
.errorMessage {
155+
font-size: 1.25rem;
156+
}
157+
158+
.errorSubtitle {
159+
font-size: 1rem;
160+
margin-top: 0.75rem;
161+
}
162+
}
101163
}
102164
`;

0 commit comments

Comments
 (0)