diff --git a/doc/_static/copybutton.js b/doc/_static/copybutton.js deleted file mode 100644 index 01ee2bab36b..00000000000 --- a/doc/_static/copybutton.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2014 PSF. Licensed under the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 -// File originates from the cpython source found in Doc/tools/sphinxext/static/copybutton.js - -$(document).ready(function() { - /* Add a [>>>] button on the top-right corner of code samples to hide - * the >>> and ... prompts and the output and thus make the code - * copyable. */ - var div = $('.highlight-python .highlight,' + - '.highlight-default .highlight,' + - '.highlight-python3 .highlight') - var pre = div.find('pre'); - - // get the styles from the current theme - pre.parent().parent().css('position', 'relative'); - var hide_text = 'Hide the prompts and output'; - var show_text = 'Show the prompts and output'; - var border_width = pre.css('border-top-width'); - var border_style = pre.css('border-top-style'); - var border_color = pre.css('border-top-color'); - var button_styles = { - 'cursor':'pointer', 'position': 'absolute', 'top': '0', 'right': '0', - 'border-color': border_color, 'border-style': border_style, - 'border-width': border_width, 'color': border_color, 'text-size': '75%', - 'font-family': 'monospace', 'padding-left': '0.2em', 'padding-right': '0.2em', - 'border-radius': '0 3px 0 0' - } - - // create and add the button to all the code blocks that contain >>> - div.each(function(index) { - var jthis = $(this); - if (jthis.find('.gp').length > 0) { - var button = $('>>>'); - button.css(button_styles) - button.attr('title', hide_text); - button.data('hidden', 'false'); - jthis.prepend(button); - } - // tracebacks (.gt) contain bare text elements that need to be - // wrapped in a span to work with .nextUntil() (see later) - jthis.find('pre:has(.gt)').contents().filter(function() { - return ((this.nodeType == 3) && (this.data.trim().length > 0)); - }).wrap(''); - }); - - // define the behavior of the button when it's clicked - $('.copybutton').click(function(e){ - e.preventDefault(); - var button = $(this); - if (button.data('hidden') === 'false') { - // hide the code output - button.parent().find('.go, .gp, .gt').hide(); - button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden'); - button.css('text-decoration', 'line-through'); - button.attr('title', show_text); - button.data('hidden', 'true'); - } else { - // show the code output - button.parent().find('.go, .gp, .gt').show(); - button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible'); - button.css('text-decoration', 'none'); - button.attr('title', hide_text); - button.data('hidden', 'false'); - } - }); -}); - diff --git a/doc/_static/institution_logos/Telecom_Paris_Tech.png b/doc/_static/institution_logos/Telecom_Paris_Tech.png deleted file mode 100644 index 32eb616fe43..00000000000 Binary files a/doc/_static/institution_logos/Telecom_Paris_Tech.png and /dev/null differ diff --git a/doc/_static/institution_logos/Telecom_Paris_Tech.svg b/doc/_static/institution_logos/Telecom_Paris_Tech.svg new file mode 100644 index 00000000000..493a00d5e79 --- /dev/null +++ b/doc/_static/institution_logos/Telecom_Paris_Tech.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/doc/_static/mne_logo.svg b/doc/_static/mne_logo.svg index c38d5586c3b..4fbd6baf3bf 100644 --- a/doc/_static/mne_logo.svg +++ b/doc/_static/mne_logo.svg @@ -1,744 +1,176 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + diff --git a/doc/_static/style.css b/doc/_static/style.css index 2b69a39b156..5b973d4de03 100644 --- a/doc/_static/style.css +++ b/doc/_static/style.css @@ -125,16 +125,17 @@ h5.card-header::before { } /* ******************************************************** version dropdown */ +.dropdown { + padding: 0 .5rem; /* match other items in the hamburger menu */ +} .dropdown-toggle { font-weight: 600; - margin-left: 15px; /* match other items in the hamburger menu */ } /* ***************************************************** front page carousel */ div.frontpage-gallery { overflow: hidden; - height: 200px; - max-width: 400px; + height: 180px; justify-content: center; } div.frontpage-gallery a { @@ -143,12 +144,12 @@ div.frontpage-gallery a { } div.frontpage-gallery img.card-img { transform: scale(1.8); - transform-origin: 50% 30%; + transform-origin: 40% 20%; opacity: 0.2; transition: 400ms ease-out; } div.frontpage-gallery:hover img.card-img { - transform: scale(1.1); + transform: scale(1.2); opacity: 1.0; transition: 400ms ease-out; } diff --git a/doc/_templates/copyright.html b/doc/_templates/copyright.html new file mode 100644 index 00000000000..abea05537ff --- /dev/null +++ b/doc/_templates/copyright.html @@ -0,0 +1 @@ +

© Copyright {{ copyright }}

diff --git a/doc/_templates/docs-navbar.html b/doc/_templates/docs-navbar.html deleted file mode 100644 index eddebb85d28..00000000000 --- a/doc/_templates/docs-navbar.html +++ /dev/null @@ -1,20 +0,0 @@ -{%- extends "pydata_sphinx_theme/docs-navbar.html" %} - -{%- block icon_links -%} - - - -{%- include "icon-links.html" with context -%} -{%- endblock %} diff --git a/doc/_templates/homepage.html b/doc/_templates/homepage.html new file mode 100644 index 00000000000..963906cadb8 --- /dev/null +++ b/doc/_templates/homepage.html @@ -0,0 +1,44 @@ + +
+
+ {% for item in carousel %} + + {% endfor %} +
+
+ +
+

Funders

+
+ {% for item in funders -%} +
+ + {{ item.title }} + +
+ {% endfor %} +
+
+ +
+

Supporting institutions

+
+ {% for inst in institutions -%} +
+ + {{ inst.name }} + +
+ {% endfor %} +
+
diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html index 59638326f56..8cb76c50fcf 100755 --- a/doc/_templates/layout.html +++ b/doc/_templates/layout.html @@ -1,67 +1,20 @@ -{%- extends "pydata_sphinx_theme/layout.html" %} +{%- extends 'pydata_sphinx_theme/layout.html' %} {% block extrahead %} - -{{ super() }} + {{ super() }} {% endblock %} - {% block docs_body %}
{% block body %} {% endblock %} {% if pagename == 'index' %} -
-
- {% for item in carousel %} - - {% endfor %} -
-
- -
-

Funders

-
-
- {% for item in funders -%} -
- - {{ item.title }} - -
- {% endfor %} -
- -

Supporting institutions

-
-
- {% for inst in institutions -%} -
- - {{ inst.name }} - -
- {% endfor %} -
-
- + {%- include 'homepage.html' -%} {% endif %}
{% endblock %} - - -{%- block footer %} - - +{%- block scripts_end %} + + {{ super() }} {%- endblock %} diff --git a/doc/_templates/version-switcher.html b/doc/_templates/version-switcher.html new file mode 100644 index 00000000000..235dcf4f5c8 --- /dev/null +++ b/doc/_templates/version-switcher.html @@ -0,0 +1,11 @@ + diff --git a/doc/conf.py b/doc/conf.py index fb46ea4f6ac..2c02f18fda1 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -511,6 +511,8 @@ def append_attr_meth_examples(app, what, name, obj, options, lines): 'use_edit_page_button': False, 'navigation_with_keys': False, 'show_toc_level': 1, + 'navbar_end': ['version-switcher', 'navbar-icon-links'], + 'footer_items': ['copyright'], 'google_analytics_id': 'UA-37225609-1', } @@ -622,7 +624,7 @@ def append_attr_meth_examples(app, what, name, obj, options, lines): url='https://sci.aalto.fi/', size=md), dict(name='Télécom ParisTech', - img='Telecom_Paris_Tech.png', + img='Telecom_Paris_Tech.svg', url='https://www.telecom-paris.fr/', size=md), dict(name='University of Washington', @@ -666,19 +668,20 @@ def append_attr_meth_examples(app, what, name, obj, options, lines): url='https://www.uni-graz.at/', size=md), ], + # \u00AD is an optional hyphen (not rendered unless needed) 'carousel': [ dict(title='Source Estimation', - text='Distributed, sparse, mixed-norm, beamformers, dipole fitting, and more.', # noqa E501 + text='Distributed, sparse, mixed-norm, beam\u00ADformers, dipole fitting, and more.', # noqa E501 url='auto_tutorials/source-modeling/plot_mne_dspm_source_localization.html', # noqa E501 img='sphx_glr_plot_mne_dspm_source_localization_008.gif', alt='dSPM'), dict(title='Machine Learning', - text='Advanced decoding models including time generalization.', + text='Advanced decoding models including time general\u00ADiza\u00ADtion.', # noqa E501 url='auto_tutorials/machine-learning/plot_sensors_decoding.html', img='sphx_glr_plot_sensors_decoding_006.png', alt='Decoding'), dict(title='Encoding Models', - text='Receptive field estimation with optional smoothness priors.', # noqa E501 + text='Receptive field estima\u00ADtion with optional smooth\u00ADness priors.', # noqa E501 url='auto_tutorials/machine-learning/plot_receptive_field.html', img='sphx_glr_plot_receptive_field_001.png', alt='STRF'), @@ -688,7 +691,7 @@ def append_attr_meth_examples(app, what, name, obj, options, lines): img='sphx_glr_plot_stats_cluster_spatio_temporal_001.png', alt='Clusters'), dict(title='Connectivity', - text='All-to-all spectral and effective connectivity measures.', + text='All-to-all spectral and effective connec\u00ADtivity measures.', # noqa E501 url='auto_examples/connectivity/plot_mne_inverse_label_connectivity.html', # noqa E501 img='sphx_glr_plot_mne_inverse_label_connectivity_001.png', alt='Connectivity'), diff --git a/doc/funding.rst b/doc/funding.rst index 72e5ae2f9e3..43d4ccf3454 100644 --- a/doc/funding.rst +++ b/doc/funding.rst @@ -18,7 +18,7 @@ Development of MNE-Python has been supported by: - |czi| **Chan Zuckerberg Initiative:** `EOSS2 `_ -Additionally, many universities or research institutions have supported their employees’ contributions to MNE-Python as part of normal work duties. These institutions are: +Additionally, many universities or research institutions have supported their employees’ contributions to MNE-Python as part of normal work duties. These institutions include: - `Massachusetts General Hospital `_ - `Athinoula A. Martinos Center for Biomedical Imaging `_ diff --git a/doc/index.rst b/doc/index.rst index d322d1895f5..c3d6d9216fc 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -18,7 +18,7 @@ MNE-Python Homepage :align: center -.. rst-class:: h4 text-center font-weight-light mb-4 +.. rst-class:: h4 text-center font-weight-light my-4 Open-source Python package for exploring, visualizing, and analyzing human neurophysiological data: MEG, EEG, sEEG, ECoG, NIRS, and more. diff --git a/requirements_doc.txt b/requirements_doc.txt index c2ca49b86f6..d8953494015 100644 --- a/requirements_doc.txt +++ b/requirements_doc.txt @@ -1,6 +1,6 @@ sphinx https://github.com/numpy/numpydoc/archive/main.zip -pydata-sphinx-theme==0.5.0 +pydata-sphinx-theme==0.6.1 sphinx-gallery sphinxcontrib-bibtex>=2.1.2 memory_profiler