diff --git a/README.rst b/README.rst index bc76bdc..663fc19 100644 --- a/README.rst +++ b/README.rst @@ -36,6 +36,20 @@ To change the social icons, edit ``mpl_sphinx_theme/mpl_icon_links.html`` To change the style, edit ``mpl_sphinx_theme/static/css/style.css`` +Overriding hard coded elements +------------------------------ +This theme is primarily designed to be used with subprojects that are part of the main +Matplotlib webiste (e.g., [our cheatseets](https://github.com/matplotlib/cheatsheets] +and [list of third-party packages](https://github.com/matplotlib/mpl-third-party)). +As such several elements are hard coded. However, the theme may also be used by +other subprojects that need to change the hard-coded defaults. +The following sections explain how to reset these back to their defaults by modifying +``html_theme_options`` in ``conf.py``. + +Header section links +~~~~~~~~~~~~~~~~~~~~ +Use a copy of [the default pydata-sphinx-theme navbar](https://github.com/pydata/pydata-sphinx-theme/blob/main/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/navbar-nav.html) and set the ``'navbar_center'`` key to this HTML file in ``html_theme_options``. + Building -------- To build the theme with a sample page, navigate into the ``doc/`` directory and run diff --git a/mpl_sphinx_theme/_version.py b/mpl_sphinx_theme/_version.py index b4ba1b2..dc30c65 100644 --- a/mpl_sphinx_theme/_version.py +++ b/mpl_sphinx_theme/_version.py @@ -4,5 +4,5 @@ # Copyright (c) Matplotlib developers. # Distributed under the terms of the Modified BSD License. -version_info = (3, 8, 0) -__version__ = ".".join(map(str, version_info)) +version_info = (3, 9, 0) +__version__ = ".".join(map(str, version_info)) + "rc1" diff --git a/mpl_sphinx_theme/search.html b/mpl_sphinx_theme/search.html deleted file mode 100644 index aacae3d..0000000 --- a/mpl_sphinx_theme/search.html +++ /dev/null @@ -1,45 +0,0 @@ -{% extends "layout.html" %} -{% set title = _('Search') %} -{%- block scripts %} - {{ super() }} - - -{%- endblock %} -{% block body %} -

{{ _('Search') }}

-

- {% trans %}Searching for multiple words only shows matches that contain - all words.{% endtrans %} -

-

- If you want to limit your search to working code examples, include the - keyword "codex" (mnemonic for code example) in your search, e.g., - "codex ellipse". -

-
- - - -
- {% if search_performed %} -

{{ _('Search Results') }}

- {% if not search_results %} -

{{ _('Your search did not match any results.') }}

- {% endif %} - {% endif %} -
- {% if search_results %} - - {% endif %} -
-{% endblock %} -{% block footer %} - {{ super() }} - -{% endblock %} diff --git a/mpl_sphinx_theme/theme.conf b/mpl_sphinx_theme/theme.conf index dcb4634..4524814 100644 --- a/mpl_sphinx_theme/theme.conf +++ b/mpl_sphinx_theme/theme.conf @@ -6,4 +6,5 @@ stylesheet = css/style.css navbar_links = absolute navbar_center = mpl_nav_bar.html navbar_end = theme-switcher.html, mpl_icon_links.html +navbar_persistent = search-button.html logo = logo_light.svg