Skip to content

Commit

Permalink
[doc] style the sphinx docs
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelKoch committed Nov 21, 2024
1 parent b9c4bfe commit e8046a5
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
9 changes: 9 additions & 0 deletions doc/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -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 */
}
25 changes: 25 additions & 0 deletions doc/_templates/article-header-buttons.html
Original file line number Diff line number Diff line change
@@ -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 %}

<div class="article-header-buttons">
{%- 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" %}
</div>
8 changes: 5 additions & 3 deletions doc/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
Expand Down

0 comments on commit e8046a5

Please sign in to comment.