kubernetes-sigs / reference-docs

Tools to build reference documentation for Kubernetes APIs and CLIs.
Apache License 2.0
87 stars 102 forks source link

fine-tune apidocs markup for dark mode #338

Closed xrstf closed 10 months ago

xrstf commented 10 months ago

This is the result of working a bit more on the dark mode for the apidocs. I had to extend the markup a bit, now at least the result is now pretty:

2023-09-21T00-57-07 2023-09-21T00-57-26

I adopted the font that is used on kubernetes.io, plus the colors in light mode were adjusted a bit to better match the Kubernetes website.

The markup is now also setup for an CSS-only automatic dark mode, which avoids the previous flash-of-white before the JS kicked in and applied the theme-dark class.

I also renamed the scroll-apiref.js, since the file is not just responsible for the scrolling behaviour, but also the dark mode toggler. I hope this won't cause issues when the website repo PR is eventually merged.

tengqm commented 10 months ago

Thanks. /lgtm /approve

k8s-ci-robot commented 10 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tengqm, xrstf

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

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/reference-docs/blob/master/OWNERS)~~ [tengqm] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
xrstf commented 10 months ago

@tengqm Thanks a lot for your super quick reviews on all these PRs, it's really appreciated :-) Is there anything else I need to do to complete this? The markup on https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/ is still the old one, but the new CSS/JS is already live.

tengqm commented 10 months ago

@xrstf I've sent a PR refreshing the HTML (https://github.com/kubernetes/website/pull/43139) and it has been merged.