Skip to content

Commit

Permalink
Change CNCF logo for dark mode (main page only)
Browse files Browse the repository at this point in the history
Co-authored-by: Tamilselvan Thangamony <[email protected]>
  • Loading branch information
sftim and tamilselvan1102 committed Jan 29, 2025
1 parent 10d6fbc commit f852111
Show file tree
Hide file tree
Showing 7 changed files with 125 additions and 15 deletions.
10 changes: 0 additions & 10 deletions assets/scss/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -462,16 +462,6 @@ $video-section-height: 200px;
}
}

// Add logo to CNCF section
section#cncf {
padding-top: 60px;
padding-bottom: 140px;
background-image: url(/images/cncf-color.svg);
background-position: center 100px;
background-repeat: no-repeat;
background-size: 300px;
}

// OCEAN NODES
#oceanNodes, .td-home .k8s-overview {

Expand Down
24 changes: 24 additions & 0 deletions assets/scss/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,30 @@ input[type="search"]{
}


.cncf-logo-details {
display: flex;
flex-direction: column;
align-items: center;

p {
text-align: center;
}

a {
color: inherit;
background: transparent;
text-decoration: underline; // exception from usual convention
}

picture {
display: block;
> * {
min-height: 4em;
width: calc(clamp(20em,18em + 20mm,100vw));
}
}
}

/* FOOTER */
footer {
background-color: #202020;
Expand Down
6 changes: 1 addition & 5 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{{ define "main" }}
{{ .Content }}
<section id="cncf">
<div class="main-section">
<center>
<p style="font-size: 20px">{{ T "main_cncf_project" | safeHTML }}
</center>
</div>
{{ partial "cncf.html" . }}
</section>

<section id="kubeweekly">
Expand Down
9 changes: 9 additions & 0 deletions layouts/partials/cncf.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="main-section">
<div class="cncf-logo-details">
<p>{{ T "main_cncf_project" | safeHTML }}</p>
<picture>
<source srcset="/images/cncf-logo-dark.svg" media="(prefers-color-scheme: dark)">
<img src="/images/cncf-logo-white.svg" class="cncf-img">
</picture>
</div>
</div>
91 changes: 91 additions & 0 deletions static/images/cncf-logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file removed static/images/cncf-white.png
Binary file not shown.

0 comments on commit f852111

Please sign in to comment.