diff --git a/doc/_static/css/custom.css b/doc/_static/css/custom.css new file mode 100644 index 00000000000..7a9a7d265bf --- /dev/null +++ b/doc/_static/css/custom.css @@ -0,0 +1,9 @@ +html{ + --pst-font-size-base: 17px; +} +html[data-theme="light"] { + --pst-color-primary: #F7A71E; +} +.bd-page-width { + max-width: 100rem; /* default is 88rem */ +} diff --git a/doc/_templates/article-header-buttons.html b/doc/_templates/article-header-buttons.html new file mode 100644 index 00000000000..31331428b89 --- /dev/null +++ b/doc/_templates/article-header-buttons.html @@ -0,0 +1,25 @@ +{# +SPDX-FileCopyrightText: 2020 Chris Holdgraf + +SPDX-License-Identifier: BSD-3-Clause +#} + +{# +Copied from: https://github.com/executablebooks/sphinx-book-theme/blob/master/src/sphinx_book_theme/theme/sphinx_book_theme/macros/buttons.html +to remove the light/dark theme switcher button +#} + +{% from "sphinx_book_theme/macros/buttons.html" import render_funcs with context %} + +
+ {%- for button in header_buttons -%} + {% set btype = button.get("type") %} + {% set bopts = button.copy() %} + {% set _ = bopts.pop("type") %} + {{ render_funcs[btype](**bopts) }} + {%- endfor -%} + + {#- Extra theme buttons #} + {% include "search-button.html" %} + {% include "toggle-secondary-sidebar.html" %} +
diff --git a/doc/conf.py.in b/doc/conf.py.in index c103a3e4bb2..754d2534a6a 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -38,14 +38,16 @@ highlight_language = 'c++' # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output +html_static_path = ['_static'] +html_css_files = ['css/custom.css'] html_theme = 'sphinx_book_theme' html_theme_options = { 'repository_url': 'https://github.com/ginkgo-project/ginkgo/', 'use_repository_button': True, - 'use_fullscreen_button': False, - 'use_download_button': False + 'use_fullscreen_button': True, + 'use_download_button': False, + "article_header_end": ["article-header-buttons"] } -html_static_path = ['_static'] html_logo = '@Ginkgo_SOURCE_DIR@/assets/logo.png' html_favicon = '@Ginkgo_SOURCE_DIR@/assets/favicon.ico' html_title = f'{project} v{release}'