Skip to content

Commit 9fb7d10

Browse files
authoredMar 18, 2025
Merge pull request #49586 from sftim/20250128_home_page_dark_mode
Home page enable dark mode
2 parents f067474 + c325b2d commit 9fb7d10

File tree

90 files changed

+1047
-86
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+1047
-86
lines changed
 

‎assets/scss/_base.scss

-10
Original file line numberDiff line numberDiff line change
@@ -462,16 +462,6 @@ $video-section-height: 200px;
462462
}
463463
}
464464

465-
// Add logo to CNCF section
466-
section#cncf {
467-
padding-top: 60px;
468-
padding-bottom: 140px;
469-
background-image: url(/images/cncf-color.svg);
470-
background-position: center 100px;
471-
background-repeat: no-repeat;
472-
background-size: 300px;
473-
}
474-
475465
// OCEAN NODES
476466
#oceanNodes, .td-home .k8s-overview {
477467

‎assets/scss/_custom.scss

+111
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,32 @@ input[type="search"]{
340340
}
341341

342342

343+
.cncf-logo-details {
344+
display: flex;
345+
flex-direction: column;
346+
padding: 30px;
347+
align-items: center;
348+
349+
p {
350+
text-align: center;
351+
font-size: 1.2rem;
352+
}
353+
354+
a {
355+
color: inherit;
356+
background: transparent;
357+
text-decoration: underline; // exception from usual convention
358+
}
359+
360+
picture {
361+
display: block;
362+
> * {
363+
min-height: 4em;
364+
width: calc(clamp(20em,18em + 20mm,100vw));
365+
}
366+
}
367+
}
368+
343369
/* FOOTER */
344370
footer {
345371
background-color: #202020;
@@ -469,6 +495,91 @@ footer {
469495
}
470496
}
471497

498+
// Home page dark-mode
499+
@media (prefers-color-scheme: dark) {
500+
body.cid-home {
501+
main {
502+
background-color: $dark-bg-color-2;
503+
color:$dark-text-color-1;
504+
505+
section:not(#video):not(#cncf) {
506+
background-color: $dark-bg-color-1;
507+
color:$dark-text-color-1;
508+
}
509+
510+
section#video #desktopShowVideoButton {
511+
background-color: $dark-bg-color-1;
512+
}
513+
514+
section#video #desktopShowVideoButton {
515+
color: $white;
516+
background-color: $primary;
517+
518+
&:hover {
519+
color: $primary;
520+
background-color: $white;
521+
}
522+
523+
&::before {
524+
border-color: transparent transparent transparent $white;
525+
}
526+
527+
&:hover::before {
528+
border-color: transparent transparent transparent $primary;
529+
}
530+
}
531+
532+
section#video #desktopKCButton:hover {
533+
background-color: $dark-bg-color-1;
534+
}
535+
536+
section#cncf {
537+
background-color: $dark-bg-color-2;
538+
}
539+
540+
section.features-container .k8s-features-heading {
541+
color: $white;
542+
background-color: $dark-bg-color-1;
543+
}
544+
545+
section.features-container > div > .feature-box {
546+
background-color: $dark-bg-color-2;
547+
color:$dark-text-color-1;
548+
549+
h3 a, h4 a, h5 a {
550+
color: $white;
551+
background: transparent;
552+
}
553+
554+
h3 a:hover, h4 a:hover, h5 a:hover {
555+
text-decoration: underline;
556+
}
557+
}
558+
559+
.search-bar {
560+
background-color: #d3d3d3;
561+
color: #ffffff;
562+
> * {
563+
color: #ffffff;
564+
}
565+
}
566+
567+
input.search-input, input.email {
568+
background-color: #D3D3D3 !important;
569+
color: #000 !important;
570+
}
571+
572+
input.search-input::placeholder, input.email::placeholder{
573+
color: #000;
574+
}
575+
576+
#mc_embed_signup_scroll input.email {
577+
color: #ffffff !important;
578+
background-color: #a9a9a9 !important;
579+
}
580+
}
581+
}
582+
}
472583

473584
/* COMMUNITY */
474585

0 commit comments

Comments
 (0)
Please sign in to comment.