You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* docs: exclude files created by jupyter
* set up js for theme change
* demo with only background color change
* set-up all the dark theme colors
* overwrite the pygment css file
* add default_theme parameter
* small update to documentation
* color support for ethical add
* missing alpha channel in css
* docs: fix badly written css comments
* Update src/pydata_sphinx_theme/__init__.py
Co-authored-by: Chris Holdgraf <[email protected]>
* use typescript comment structure
Co-authored-by: Chris Holdgraf <[email protected]>
* make the switch as a btn
* use lighter section headers
* replace all colors with rgba defined colors
* add comments on pygments theme switch
* move ethical-ads to its own scss file
* use theme options to control pygments styling
* change theme switch color
* remind that pygments_style is overwritten
* add comment to js theme management functions
* refactor cycleTheme
* prevent flickering when switching theme
* set the theme-switcher as a template
* document the css trick
Co-authored-by: Chris Holdgraf <[email protected]>
* document the css trick
* change colors to improve accecibility
* change colors to improve accecibility
* apply pre-commit checks
* add the theme switcher to the tests
* quote Furo theme in comments
* add the css trick to all version modified widgets
* include sidebar and topic in the color scheme
* refactor navbar-toggler
* support for version btn
* fix blockquote colors
* listen to the span instead of the a tag
* use the same color for hov and focus
* typo
Co-authored-by: Damian Avila <[email protected]>
* typo
Co-authored-by: Damian Avila <[email protected]>
* set the theme switcher in the navbar-end
* set back the theme-switcher in pydata documentation
* replace orange and green
* use color in the gihub action report
* test the theme switcher
* remove the theme switcher container from the test
* typo
* docs: disclaimer on colors
* docs: typo
* reduce minscore for lighthouse SEO expectations
* Cleaning up the colors for accessibility
* Warning about stability
* Update src/pydata_sphinx_theme/assets/styles/_navbar.scss
Co-authored-by: Damian Avila <[email protected]>
Co-authored-by: Chris Holdgraf <[email protected]>
Co-authored-by: Damian Avila <[email protected]>
Co-authored-by: Chris Holdgraf <[email protected]>
Copy file name to clipboardExpand all lines: docs/user_guide/configuring.rst
+30-1Lines changed: 30 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ in your ``conf.py`` file. This is a dictionary with ``key: val`` pairs that
10
10
you can configure in various ways. This page describes the options available to you.
11
11
12
12
Configure project logo
13
-
==============================
13
+
======================
14
14
15
15
To add a logo that's placed at the left of your nav bar, put a logo file under your
16
16
doc path's _static folder, and use the following configuration:
@@ -31,6 +31,35 @@ If you'd like it to link to another page or use an external link instead, use th
31
31
32
32
.. _icon-links:
33
33
34
+
Configure default theme
35
+
=======================
36
+
37
+
The theme mode can be changed by the user. By default landing on the documentation will switch the mode to ``auto``. You can specified this value to be one of ``auto``, ``dark``, ``light``.
38
+
39
+
.. code-block:: python
40
+
41
+
html_context = {
42
+
...
43
+
"default_mode": "auto"
44
+
}
45
+
46
+
Configure pygment theme
47
+
=======================
48
+
49
+
As the Sphinx theme supports multiple modes, the code highlighting colors can be modified for each one of them by modifying the `pygment_light_style`and `pygment_style_style`. You can check available Pygments colors on this `page <https://help.farbox.com/pygments.html>`__.
50
+
51
+
.. code-block:: python
52
+
53
+
html_contexts = {
54
+
...
55
+
"pygment_light_style": "tango",
56
+
"pygment_dark_style": "native"
57
+
}
58
+
59
+
.. danger::
60
+
61
+
The native Sphinx option `pygments_style` will be overwritten by this theme.
Copy file name to clipboardExpand all lines: docs/user_guide/customizing.rst
+45-1Lines changed: 45 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,13 @@ Customizing the theme
7
7
In addition to the configuration options detailed at :ref:`configuration`, it
8
8
is also possible to customize the HTML layout and CSS style of the theme.
9
9
10
+
.. danger::
11
+
12
+
This theme is still under active development, and we make no promises
13
+
about the stability of any specific HTML structure, CSS variables, etc.
14
+
Make these customizations at your own risk, and pin versions if you're
15
+
worried about breaking changes!
16
+
10
17
.. _custom-css:
11
18
12
19
Custom CSS Stylesheets
@@ -30,6 +37,41 @@ To add a custom stylesheet, follow these steps:
30
37
31
38
When you build your documentation, this stylesheet should now be activated.
32
39
40
+
.. _manage-themes:
41
+
42
+
Manage themes
43
+
=============
44
+
45
+
.. danger::
46
+
47
+
Theming is still a beta feature so the variables related to the theme switch are likely to change in the future. No backward compatibily is guaranteed when customization is done.
48
+
49
+
Pydata sphinx theme embed 3 different theming mode:
50
+
51
+
- ``auto``: the documentation theme will follow the one provided by your computer
52
+
- ``dark``: the documentation is displayed with the dark theme
53
+
- ``light``: the documentation is displayed with the light theme
54
+
55
+
In order to customize the display of any of the theme element you need to encaspulate your modifications in the approriate css rules:
56
+
57
+
.. code-block:: css
58
+
59
+
/* anything related to the light theme */
60
+
html[data-theme="light"] {
61
+
62
+
/* whatever you want to change */
63
+
background: white;
64
+
}
65
+
66
+
/* anything related to the dark theme */
67
+
html[data-theme="dark"] {
68
+
69
+
/* whatever you want to change */
70
+
background: black;
71
+
}
72
+
73
+
A complete list of the used colors for this theme can be found in the `pydata default css colors file <pydata-css-colors_>`__.
74
+
33
75
.. _css-variables:
34
76
35
77
CSS Theme variables
@@ -58,7 +100,8 @@ In order to change a variable, follow these steps:
58
100
59
101
Note that these are `CSS variables <css-variable-help_>`_ and not
0 commit comments