Skip to content

Commit 0b4c196

Browse files
committed
Changes for docs home page card layout
Reduced padding to make text compatible Some amendments ; bg removed Buttons left aligned Grid is more suitable for context added a wrapper div with flex
1 parent 71751da commit 0b4c196

File tree

2 files changed

+57
-12
lines changed

2 files changed

+57
-12
lines changed

assets/scss/_custom.scss

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -317,21 +317,64 @@ footer {
317317
/* DOCS */
318318

319319
.launch-cards {
320-
button {
321-
cursor: pointer;
322-
box-sizing: border-box;
323-
background: none;
324-
margin: 0;
325-
border: 0;
326-
}
320+
padding: 0;
321+
display: grid;
322+
grid-template-columns: repeat(3, 1fr);
323+
row-gap: 1em;
324+
.launch-card {
325+
display: flex;
326+
padding: 0 30px 0 0;
327+
.card-content{
328+
width: fit-content;
329+
display: flex;
330+
flex-direction: column;
331+
margin: 0;
332+
row-gap: 1em;
333+
h2 {
334+
font-size: 1.75em;
335+
padding: 0.5em 0;
336+
margin: 0;
337+
a {
338+
display: none;
339+
}
340+
}
341+
342+
p {
343+
margin: 0;
344+
}
345+
346+
ul {
347+
list-style: none;
348+
height: fit-content;
349+
line-height: 1.6;
350+
padding: 0;
351+
margin-block-end: auto;
352+
}
353+
354+
br {
355+
display: none;
356+
}
357+
358+
button {
359+
height: min-content;
360+
width: auto;
361+
padding: .5em 1em;
362+
cursor: pointer;
363+
box-sizing: border-box;
364+
}
365+
}
366+
}
327367

328-
ul,
329-
li {
330-
list-style: none;
331-
padding-left: 0;
332-
}
368+
@media only screen and (max-width: 1000px) {
369+
grid-template-columns: 1fr;
370+
371+
.launch-card {
372+
width: 100%;
373+
}
374+
}
333375
}
334376

377+
335378
// table of contents
336379
.td-toc {
337380
padding-top: 1.5rem !important;

layouts/partials/docs/docs-portal-card.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{{ range .Params.cards }}
22
<div class="launch-card">
3+
<div class="card-content">
34
<h2 id="{{ replace .title " " "-" | lower }}">{{ .title }}</h2>
45
<p>{{ .description }}</p>
56
<ul>
@@ -25,5 +26,6 @@ <h2 id="{{ replace .title " " "-" | lower }}">{{ .title }}</h2>
2526
<br>
2627
<br>
2728
{{ end }}
29+
</div>
2830
</div>
2931
{{ end }}

0 commit comments

Comments
 (0)