Skip to content

Commit 7627d41

Browse files
committed
Concise Code
Signed-off-by: krishnaShuk <shuklakrishna.kris@gmail.com>
1 parent a21245d commit 7627d41

3 files changed

Lines changed: 10 additions & 30 deletions

File tree

content-learn/mastering-meshery/introduction-to-meshery/meshery/interpreting-meshery-designs.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ These components encapsulate the resources and include their detailed configurat
5555
<h2 class="chapter-sub-heading">Meshery Design at a Glance</h2>
5656

5757
<a href={basicDesign}>
58-
<img class="image-design-2" src={basicDesign} width="100%" align="center" />
58+
<img src={basicDesign} width="100%" align="center" />
5959
</a>
6060

6161

@@ -203,7 +203,7 @@ These are used to denote annotations or static connections between components. T
203203
**Creating Edge-Network Relationships Between Kubernetes Components**
204204

205205
<a href={EdgeNetworkGif}>
206-
<img class="image-design" src={EdgeNetworkGif} width="100%" align="center" />
206+
<img src={EdgeNetworkGif} width="100%" align="center" />
207207
</a>
208208

209209

@@ -221,7 +221,7 @@ The intermediary component (such as a RoleBinding) connects the two, defining ho
221221
**Creating Edge-Permission Relationships Between Components**
222222

223223
<a href={edgePermissionGif}>
224-
<img class="image-design" src={edgePermissionGif} width="100%" align="center"
224+
<img src={edgePermissionGif} width="100%" align="center"
225225
/>
226226
</a>
227227

@@ -277,7 +277,7 @@ Annotations can be created using Meshery's Diagramming tools found in the dock a
277277
1. **Images**: Images can be added to the design to represent components, logos, or any visual aid that supports understanding the architecture.
278278

279279
<a href={AnnotationExampleGif}>
280-
<img class="image-design" src={AnnotationExampleGif} width="100%" align="center"
280+
<img src={AnnotationExampleGif} width="100%" align="center"
281281
/>
282282
</a>
283283

@@ -299,15 +299,15 @@ While default shapes, colors, and icons are provided for components and annotati
299299
**Customizing Kubernetes Components**
300300

301301
<a href={CustomizeKubernetesGif}>
302-
<img class="image-design" src={CustomizeKubernetesGif} width="100%" align="center"
302+
<img src={CustomizeKubernetesGif} width="100%" align="center"
303303
/>
304304
</a>
305305

306306

307307
**Creating and Customizing Arrow Annotations**
308308

309309
<a href={CreateAnnotationGif}>
310-
<img class="image-design" src={CreateAnnotationGif} width="100%" align="center"
310+
<img src={CreateAnnotationGif} width="100%" align="center"
311311
/>
312312
</a>
313313

root-wrapper.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import { ContextWrapper } from "./context-wrapper";
99
// Custom image component for better CLS scores
1010
const OptimizedImage = props => {
1111
return (
12-
<div style={{ width: "100%", height: "auto", aspectRatio: props.aspectRatio || "16/9", overflow: "hidden" }}>
12+
<div style={{ width: "100%", height: "auto" }}>
1313
<img
1414
{...props}
1515
width={props.width || "100%"}
1616
height={props.height || "auto"}
1717
style={{
18-
objectFit: props.objectFit || "cover",
19-
aspectRatio: props.aspectRatio || "16/9",
18+
objectFit: props.objectFit || "contain",
19+
margin: "20px 0px",
2020
...props.style
2121
}}
2222
loading="lazy"

src/components/Learn-Components/Chapters-Style/chapters.style.js

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,13 @@ export const ChapterStyle = styled.div`
1818
}
1919
}
2020
21-
div[style*="width:100%"][style*="overflow"] {
22-
aspect-ratio: unset !important;
23-
overflow: unset !important;
24-
margin: 20px 0px 20px 0px !important;
25-
}
26-
2721
.image-design-icons {
2822
object-fit: contain !important;
2923
3024
@media (max-width: 768px) {
31-
width: clamp(200px, 60vw, 400px) !important;
25+
width: clamp(150px, 70vw, 400px) !important;
3226
height: auto !important;
3327
max-width: none !important;
3428
}
35-
36-
@media (max-width: 480px) {
37-
width: clamp(150px, 70vw, 350px) !important;
38-
}
39-
40-
}
41-
42-
.image-design {
43-
object-fit: contain !important;
4429
}
45-
46-
.image-design-2 {
47-
aspect-ratio: unset !important;
48-
object-fit: contain !important;
49-
}
5030
`;

0 commit comments

Comments
 (0)