Add custom styling options for docs (custom.css) by C-Achard · Pull Request #3207 · DeepLabCut/DeepLabCut

Purpose

  • Adds custom handles for the style of the Jupyter Book.
    • Custom sidebar color and footer
    • "Frosted glass" effect on header
    • Color palette based on main logo/GUI

⚠️ NOTE The current colors & theme is not to be considered final. This is meant to provide customizations handles, not enforce a particular theme. Feedback is welcome.

  • Even it the entire CCS file were merged commented, this could still be useful.
  • Not compatible with Jupyter Book >= 2.0 (Sphinx theme)
  • Custom banners/sidebar footer images can look really nice, if available we could add some

Preview

Again, color theme is not final. This is an example of what can be done.

Mode Screenshot
Dark mode Dark mode screenshot
Light mode Light mode screenshot

TODO

Details

This pull request introduces custom styling to the Sphinx documentation by adding a new CSS file and updating the Sphinx configuration to include it. The main goal is to enhance the documentation's appearance with a custom sidebar, header, and footer design for both light and dark themes.

Sphinx documentation theming:

  • Added a new custom.css file in docs/_static/ that defines custom colors and styles for sidebar, header, footer, and buttons, supporting both light and dark themes.
  • Updated _config.yml to include docs/_static as a static path and load the new custom.css file for HTML output.