Skip to content

Commit

Permalink
DOC: move from sphinx-panel to sphinx-design (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
prisae authored Oct 15, 2022
1 parent 6ae7b00 commit 23171c4
Show file tree
Hide file tree
Showing 16 changed files with 255 additions and 197 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ latest
- Replace ``pytest-flake8`` by plain ``flake8``.
- Change the way ``spacing`` and ``shift`` are calculated in
``fdesign.print_result`` to avoid numerical precision issues.
- Replace deprecated ``sphinx-panels`` with ``sphinx-design``.


v2.2.0: I/O & CLI
Expand Down
14 changes: 7 additions & 7 deletions docs/_static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@

/* Button colours */

.btn-info {
.sd-btn-info {
font-weight: bold;
background: #447fc1;
border-color: #447fc1;
background: #447fc1 !important;
border-color: #447fc1 !important;
}

.btn-info:hover {
background: #ef413d;
border-color: #ef413d;
.sd-btn-info:hover {
background: #ef413d !important;
border-color: #ef413d !important;
}

/* Card headers */
.card-header {
.sd-card-header {
font-size: var(--pst-font-size-h5);
font-weight: bold;
padding: 1rem 2rem;
Expand Down
24 changes: 11 additions & 13 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,21 @@ API reference
tmtemod


.. panels::
:container: container-lg pb-1
:column: col-lg-12 p-2
.. grid:: 1
:gutter: 2

Bipole: :func:`empymod.model.bipole`
.. grid-item-card::

---
:column: col-lg-12 p-2
Bipole: :func:`empymod.model.bipole`

Dipole: :func:`empymod.model.dipole`
.. grid-item-card::

---
:column: col-lg-12 p-2
Dipole: :func:`empymod.model.dipole`

Loop: :func:`empymod.model.loop`
.. grid-item-card::

---
:column: col-lg-12 p-2
Loop: :func:`empymod.model.loop`

Analytical: :func:`empymod.model.analytical`
.. grid-item-card::

Analytical: :func:`empymod.model.analytical`
3 changes: 1 addition & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
extensions = [
# 'sphinx.ext.autodoc',
'numpydoc',
'sphinx_panels',
'sphinx_design',
'sphinx.ext.intersphinx',
# 'sphinx.ext.autosummary',
'sphinx.ext.mathjax',
Expand All @@ -21,7 +21,6 @@
'IPython.sphinxext.ipython_console_highlighting',
'IPython.sphinxext.ipython_directive',
]
panels_add_bootstrap_css = False
autosummary_generate = True
add_module_names = True
add_function_parentheses = False
Expand Down
64 changes: 39 additions & 25 deletions docs/dev/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,53 @@ Development
maintenance
release

.. panels::
:container: container-lg pb-2 text-center
.. grid:: 1 2 2 2
:gutter: 2

:fa:`code,fa-4x`
.. grid-item-card::
:text-align: center

.. link-button:: contributing
:type: ref
:text: Contributing
:classes: btn-link stretched-link font-weight-bold
:fa:`code;fa-4x`

---
.. button-ref:: contributing
:expand:
:color: info
:click-parent:

:fa:`fas fa-hourglass-half,fa-4x`
Contributing

.. link-button:: tests
:type: ref
:text: Tests & Benchmarks
:classes: btn-link stretched-link font-weight-bold
.. grid-item-card::
:text-align: center

---
:fa:`fas fa-hourglass-half;fa-4x`

:fa:`cogs,fa-4x`
.. button-ref:: tests
:expand:
:color: info
:click-parent:

.. link-button:: maintenance
:type: ref
:text: Maintenance
:classes: btn-link stretched-link font-weight-bold
Tests & Benchmarks

---
.. grid-item-card::
:text-align: center

:fa:`rocket,fa-4x`
:fa:`cogs;fa-4x`

.. link-button:: release
:type: ref
:text: Making a release
:classes: btn-link stretched-link font-weight-bold
.. button-ref:: maintenance
:expand:
:color: info
:click-parent:

Maintenance

.. grid-item-card::
:text-align: center

:fa:`rocket;fa-4x`

.. button-ref:: release
:expand:
:color: info
:click-parent:

Making a release
2 changes: 1 addition & 1 deletion docs/dev/maintenance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ To check the environment in which the documentation was built.

In [1]: import empymod
...: empymod.Report(
...: ['sphinx', 'numpydoc', 'sphinx_panels', 'sphinx_numfig',
...: ['sphinx', 'numpydoc', 'sphinx_design', 'sphinx_numfig',
...: 'sphinx_gallery', 'memory_profiler', 'pydata_sphinx_theme',
...: 'sphinx_automodapi', 'ipykernel', ]
...: )
71 changes: 38 additions & 33 deletions docs/gallery/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,51 +19,56 @@ Gallery
reproducing/index
published/index

.. panels::
:container: container-lg pb-3
:column: col-lg-4 col-md-4 col-sm-6 col-xs-12 p-2
.. grid:: 1 2 3 3
:gutter: 2

---
:img-top: fdomain/images/sphx_glr_single_and_crossplot_003.png
.. grid-item-card::
:img-top: fdomain/images/sphx_glr_single_and_crossplot_003.png

Frequency domain
^^^^^^^^^^^^^^^^
Frequency domain
^^^^^^^^^^^^^^^^

Frequency-domain examples. A good place to get started.
Frequency-domain examples. A good place to get started.

+++
+++

.. link-button:: sphx_glr_gallery_fdomain
:type: ref
:text: To the examples
:classes: btn-block btn-info stretched-link
.. button-ref:: sphx_glr_gallery_fdomain
:expand:
:color: info
:click-parent:

---
:img-top: tdomain/images/sphx_glr_tem_walktem_002.png
To the examples

Time domain
^^^^^^^^^^^
.. grid-item-card::
:img-top: tdomain/images/sphx_glr_tem_walktem_002.png

Time-domain examples.
Time domain
^^^^^^^^^^^

+++
Time-domain examples.

.. link-button:: sphx_glr_gallery_tdomain
:type: ref
:text: To the examples
:classes: btn-block btn-info stretched-link
+++

---
:img-top: educational/images/sphx_glr_dlf_standard_lagged_splined_003.png
.. button-ref:: sphx_glr_gallery_tdomain
:expand:
:color: info
:click-parent:

Educational
^^^^^^^^^^^
To the examples

Educational material and advanced examples.
.. grid-item-card::
:img-top: educational/images/sphx_glr_dlf_standard_lagged_splined_003.png

+++
Educational
^^^^^^^^^^^

.. link-button:: sphx_glr_gallery_educational
:type: ref
:text: To the examples
:classes: btn-block btn-info stretched-link
Educational material and advanced examples.

+++

.. button-ref:: sphx_glr_gallery_educational
:expand:
:color: info
:click-parent:

To the examples
Loading

0 comments on commit 23171c4

Please sign in to comment.