Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home page enable dark mode #49586

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

sftim
Copy link
Contributor

@sftim sftim commented Jan 28, 2025

PR #45535, redone for 2025. All credit to @tamilselvan1102.

To see the effect, visit https://deploy-preview-49586--kubernetes-io-main-staging.netlify.app/ in a browser set to prefer dark mode.

Per #37444, this only sets the main page to support light/dark mode. Other pages are not in scope yet.


Fixes: #37444

This is to enabling dark mode only for https://kubernetes.io/ page.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 28, 2025
Copy link

linux-foundation-easycla bot commented Jan 28, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes label Jan 28, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from sftim. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language sig/docs Categorizes an issue or PR as relevant to SIG Docs. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 28, 2025
Copy link

netlify bot commented Jan 28, 2025

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit a0d1375
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/679c18b7bb680400086ef98c
😎 Deploy Preview https://deploy-preview-49586--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sftim sftim force-pushed the 20250128_home_page_dark_mode branch 2 times, most recently from d59fe98 to 18eeb3e Compare January 28, 2025 20:26
@sftim
Copy link
Contributor Author

sftim commented Jan 28, 2025

/easycla

@sftim sftim force-pushed the 20250128_home_page_dark_mode branch from 18eeb3e to 9d46d60 Compare January 28, 2025 20:28
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jan 28, 2025
@sftim sftim marked this pull request as ready for review January 28, 2025 20:54
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 28, 2025
@sftim
Copy link
Contributor Author

sftim commented Jan 28, 2025

@milinddethe15 how's this looking?

Copy link
Member

@dipesh-rawat dipesh-rawat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, the PR looks great!

One thing I noticed in the deploy preview: on the Case Studies page, the grid view now seems to be missing a few logos, like AppDirect , Nordstrom , NetEase , Squarespace, ThredUp , VSCO and Woorank, and some logos aren’t rendering properly.

@sftim sftim marked this pull request as draft January 29, 2025 00:50
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 29, 2025
@sftim
Copy link
Contributor Author

sftim commented Jan 29, 2025

OK, we ought to fix those missing logos (or drop the Case Studies section).

@sftim sftim force-pushed the 20250128_home_page_dark_mode branch from 4710274 to f193950 Compare January 29, 2025 01:06
@sftim sftim force-pushed the 20250128_home_page_dark_mode branch from f193950 to 7253f7b Compare January 29, 2025 01:16
@sftim sftim marked this pull request as ready for review January 29, 2025 01:16
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 29, 2025
@sftim
Copy link
Contributor Author

sftim commented Jan 29, 2025

Thanks for spotting that @dipesh-rawat

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 29, 2025
@sftim sftim force-pushed the 20250128_home_page_dark_mode branch from 7253f7b to 02caf1a Compare January 29, 2025 01:20
@shurup
Copy link
Member

shurup commented Jan 29, 2025

Overall, looks really cool! I've noticed a tiny bug at the bottom of the Community page.

image

To fix it, I suggest removing static/images/community/kubernetes-community-column.png completely and changing this line in assets/scss/_custom.scss (it occurs twice in the file):

  background: url('/images/community/kubernetes-community-final.jpg'), url('/images/community/kubernetes-community-column.png');

  background: url('/images/community/kubernetes-community-final.jpg');
  background-color: #0c1733;

@shurup
Copy link
Member

shurup commented Jan 29, 2025

I'm also puzzled by the dark mode behaviour in Firefox (134.0.1, 64-bit, Mozilla Firefox snap for Ubuntu). While the main page renders correctly, all other pages (docs, blog, etc.) do not make a switch and are rendered as usual (light mode). I don't normally use the dark mode and thought it was something about my setup. However, all other websites (e.g. GitHub and Google) render everything in the dark mode correctly as much as I browse their different pages. Does anyone else experience the same?

@milinddethe15
Copy link

@shurup This PR adds the support of dark theme for homepage. Later on, support will be extended to all other pages.

@shurup
Copy link
Member

shurup commented Jan 29, 2025

@milinddethe15 oh, thanks a lot for this clarification! I guess I was confused when I saw the Case studies bug being fixed above.

We can definitely omit my second comment then, but I think it would still be good to avoid the bug on the Community page.

But anyway, LGTM already!

@milinddethe15
Copy link

@sftim Overall, the page looks good. However, in the collapsed top navbar menu view, most of the screen turns white and worst in mobile view.
Could we implement a dark theme for the navbar as well?

@sftim
Copy link
Contributor Author

sftim commented Jan 29, 2025

@milinddethe15 what's you're appetite for moving this forward? I would be delighted to hand this over to another contributor.

@sftim
Copy link
Contributor Author

sftim commented Jan 29, 2025

(in my view, this is almost the last chance saloon for this feature - if we don't staff it enough to merge before April 2025, we should close the issues as not planned)

@sftim
Copy link
Contributor Author

sftim commented Jan 29, 2025

Overall, looks really cool! I've noticed a tiny bug at the bottom of the Community page.

image

To fix it, I suggest removing static/images/community/kubernetes-community-column.png completely and changing this line in assets/scss/_custom.scss (it occurs twice in the file):

  background: url('/images/community/kubernetes-community-final.jpg'), url('/images/community/kubernetes-community-column.png');

  background: url('/images/community/kubernetes-community-final.jpg');
  background-color: #0c1733;

I think that's unrelated, and also the double background is likely intended.

@sftim sftim force-pushed the 20250128_home_page_dark_mode branch 3 times, most recently from 428e7d4 to f852111 Compare January 29, 2025 13:10
@milinddethe15
Copy link

@sftim What is the plan, if any, to extend dark mode to other pages? Upgrading docsy?

@sftim
Copy link
Contributor Author

sftim commented Jan 30, 2025

What is the plan, if any, to extend dark mode to other pages? Upgrading docsy?

#25061 is our written record of planning - it's quite sparse. There isn't a secret document with more details than this.

sftim and others added 5 commits January 31, 2025 00:26
Co-Authored-By: Tamilselvan Thangamony <[email protected]>
Co-authored-by: Tamilselvan Thangamony <[email protected]>
Co-Authored-By: Tamilselvan Thangamony <[email protected]>
Co-authored-by: Tamilselvan Thangamony <[email protected]>
@sftim sftim force-pushed the 20250128_home_page_dark_mode branch from f852111 to a0d1375 Compare January 31, 2025 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/web-development Issues or PRs related to the kubernetes.io's infrastructure, design, or build processes cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow (auto)switching front page between light mode and dark mode
5 participants