Skip to content

Commit 1ff27db

Browse files
authored
Merge pull request #53029 from lmktfy/20251031_docs_home_docsy
Update docs landing page to align with Docsy
2 parents 6ed7f6d + bea1e53 commit 1ff27db

File tree

2 files changed

+84
-27
lines changed

2 files changed

+84
-27
lines changed

assets/scss/_documentation.scss

Lines changed: 82 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -376,24 +376,38 @@ body.glossary {
376376
background: #f8f9cb;
377377
}
378378

379-
#mainContent .launch-content {
379+
// Docs landing page styles
380+
body.docs-portal {
381+
.td-content > h1:first-child {
382+
text-align: center;
383+
color: $primary;
384+
padding-top: 0;
385+
}
380386

381387
.launch-cards {
382388
padding: 0;
383389
display: grid;
390+
384391
grid-template-columns: repeat(3, 1fr);
385-
row-gap: 1em;
392+
393+
row-gap: 0.5rem;
394+
column-gap: 0.5rem;
395+
386396
.launch-card {
397+
border-radius: 0.75rem;
398+
padding: 0.25rem 0.75rem;
387399
display: flex;
388-
padding: 0 30px 0 0;
389-
.card-content{
390-
width: fit-content;
400+
401+
.card-content {
391402
display: flex;
392403
flex-direction: column;
404+
flex-grow: 1;
393405
margin: 0;
406+
394407
row-gap: 1em;
408+
395409
h2 {
396-
font-size: 1.75em;
410+
font-size: 1.5em;
397411
padding: 0.5em 0;
398412
margin: 0;
399413
a {
@@ -405,38 +419,92 @@ body.glossary {
405419
margin: 0;
406420
}
407421

408-
ul {
422+
> ul {
409423
list-style: none;
410424
height: fit-content;
411425
line-height: 1.6;
412426
padding: 0;
427+
padding-left: 1rem;
413428
margin-block-end: auto;
414-
}
415429

416-
br {
417-
display: none;
430+
> li:last-child {
431+
margin-bottom: 1rem;
432+
}
418433
}
419434

420435
button {
436+
min-width: 75%;
437+
align-self: center;
438+
background: $primary;
439+
color: $white;
440+
border: 0;
441+
font-weight: bold;
442+
border-radius: 0.5rem;
421443
height: min-content;
422444
width: auto;
423445
padding: .5em 1em;
424446
cursor: pointer;
425447
box-sizing: border-box;
448+
margin-bottom: 0.25rem;
426449
}
427450
}
428451
}
429452

430-
@media only screen and (max-width: 1000px) {
431-
grid-template-columns: 1fr;
453+
.launch-card:has(button) {
454+
background: rgba(210, 210, 210, 0.2);
455+
color: $black;
456+
}
457+
458+
.launch-card:hover {
459+
background: rgba(210, 210, 210, 0.4);
460+
}
461+
462+
.launch-card:has(button:hover) {
463+
outline: 0.2rem solid $primary;
464+
button, button:hover {
465+
background: $primary;
466+
color: $white;
467+
}
468+
}
469+
470+
.launch-card button:hover {
471+
outline: 0.2rem solid white;
472+
}
473+
474+
grid-template-columns: repeat(1, 1fr);
475+
476+
@include media-breakpoint-up(xl) {
477+
margin-left: auto;
478+
margin-right: auto;
479+
row-gap: 1rem;
480+
column-gap: 1rem;
432481
.launch-card {
433-
width: 100%;
482+
.card-content {
483+
width: fit-content;
484+
flex-grow: initial;
485+
}
486+
max-width: calc(min(80vw, 40em));
487+
padding: 0.75rem;
488+
> .card-content button {
489+
align-self: flex-end;
490+
}
491+
}
492+
}
493+
@media (max-width: 60rem) {
494+
row-gap: 0.75rem;
495+
.launch-card {
496+
border-radius: 0.333rem;
434497
}
435498
}
499+
@media (min-width: 60rem) {
500+
grid-template-columns: repeat(2, 1fr);
501+
}
502+
@media (min-width: 120rem) {
503+
grid-template-columns: repeat(3, 1fr);
504+
}
436505
}
437506
}
438507

439-
440508
/* SCSS related to the list of metrics in Kubernetes */
441509
main {
442510

layouts/docs/docsportal_home.html

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
{{ define "main" }}
2-
{{ template "docs-portal-content" . }}
3-
{{ end }}
4-
5-
{{ define "content-id" }}content{{ end }}
6-
7-
{{ define "docs-portal-content" }}
8-
<section id="mainContent">
2+
<div class="td-content">
93
<div class="launch-content">
104
<p>{{ .Params.overview | safeHTML }}</p>
115
<br>
@@ -15,10 +9,5 @@
159
{{ $page }}
1610
</div>
1711
</div>
18-
</section>
19-
{{ end }}
20-
{{ define "hero" }}
21-
<section class="header-hero text-white pb-4 light-text ">
22-
<h1>{{ .Title }}</h1>
23-
</section>
12+
</div>
2413
{{ end }}

0 commit comments

Comments
 (0)