Skip to content

Commit 7bcfea6

Browse files
Tim Bannistertamilselvan1102
andcommitted
Change CNCF logo for dark mode (main page only)
Co-authored-by: Tamilselvan Thangamony <[email protected]>
1 parent a57b4a5 commit 7bcfea6

File tree

7 files changed

+125
-15
lines changed

7 files changed

+125
-15
lines changed

assets/scss/_base.scss

Lines changed: 0 additions & 10 deletions
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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,30 @@ input[type="search"]{
340340
}
341341

342342

343+
.cncf-logo-details {
344+
display: flex;
345+
flex-direction: column;
346+
align-items: center;
347+
348+
p {
349+
text-align: center;
350+
}
351+
352+
a {
353+
color: inherit;
354+
background: transparent;
355+
text-decoration: underline; // exception from usual convention
356+
}
357+
358+
picture {
359+
display: block;
360+
> * {
361+
min-height: 4em;
362+
width: calc(clamp(20em,18em + 20mm,100vw));
363+
}
364+
}
365+
}
366+
343367
/* FOOTER */
344368
footer {
345369
background-color: #202020;

layouts/index.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
{{ define "main" }}
22
{{ .Content }}
33
<section id="cncf">
4-
<div class="main-section">
5-
<center>
6-
<p style="font-size: 20px">{{ T "main_cncf_project" | safeHTML }}
7-
</center>
8-
</div>
4+
{{ partial "cncf.html" . }}
95
</section>
106

117
{{/* legacy kubeweekly support */}}

layouts/partials/cncf.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div class="main-section">
2+
<div class="cncf-logo-details">
3+
<p>{{ T "main_cncf_project" | safeHTML }}</p>
4+
<picture>
5+
<source srcset="/images/cncf-logo-dark.svg" media="(prefers-color-scheme: dark)">
6+
<img src="/images/cncf-logo-white.svg" class="cncf-img">
7+
</picture>
8+
</div>
9+
</div>

static/images/cncf-logo-dark.svg

Lines changed: 91 additions & 0 deletions
Loading
File renamed without changes.

static/images/cncf-white.png

-22.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)