Skip to content

Commit 12875ce

Browse files
authored
Improve the image size in the documentation (#1045)
- Images included using the figure directive: default to 100% - Single images included by calling Figure.show(): max-width is 80%. - Gallery thumbnails: max-width is 100%. I also add a thin box for each gallery thumbnail and center the thumbnail titles.
1 parent e19bd8e commit 12875ce

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

doc/_static/style.css

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ p {
3838
margin-bottom: 50px;
3939
}
4040

41-
.rst-content img {
42-
max-width: 80%;
43-
}
44-
4541
.sidebar-title {
4642
margin-top: 10px;
4743
margin-bottom: 0px;
@@ -167,3 +163,13 @@ a.copybtn {
167163
font-weight: bold;
168164
font-style: italic;
169165
}
166+
167+
/* Style for images and thumbnails of sphinx-gallery */
168+
.sphx-glr-thumbcontainer {
169+
border: solid #d6d6d6 1px!important;
170+
text-align: center!important;
171+
}
172+
173+
.sphx-glr-single-img {
174+
max-width: 80%!important;
175+
}

doc/overview.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ These are conference presentations about the development of PyGMT (previously
4343

4444
.. figure:: https://img.youtube.com/vi/SSIGJEe0BIk/maxresdefault.jpg
4545
:target: https://www.youtube.com/watch?v=SSIGJEe0BIk
46+
:width: 80%
4647
:align: center
4748
:alt: ROSES 2020 youtube video
4849

@@ -54,6 +55,7 @@ These are conference presentations about the development of PyGMT (previously
5455

5556
.. figure:: _static/agu2019-poster.jpg
5657
:target: https://doi.org/10.6084/m9.figshare.11320280
58+
:width: 80%
5759
:align: center
5860
:alt: AGU 2019 poster on figshare
5961

@@ -65,6 +67,7 @@ These are conference presentations about the development of PyGMT (previously
6567

6668
.. figure:: _static/scipy2018-youtube-thumbnail.png
6769
:target: https://www.youtube.com/watch?v=6wMtfZXfTRM
70+
:width: 80%
6871
:align: center
6972
:alt: SciPy youtube video
7073

@@ -76,6 +79,7 @@ These are conference presentations about the development of PyGMT (previously
7679

7780
.. figure:: _static/aogs2018-poster.jpg
7881
:target: https://doi.org/10.6084/m9.figshare.6399944
82+
:width: 80%
7983
:align: center
8084
:alt: AOGS poster on figshare
8185

@@ -87,6 +91,7 @@ These are conference presentations about the development of PyGMT (previously
8791

8892
.. figure:: _static/scipy2017-youtube-thumbnail.png
8993
:target: https://www.youtube.com/watch?v=93M4How7R24
94+
:width: 80%
9095
:align: center
9196
:alt: SciPy youtube video
9297

@@ -98,5 +103,6 @@ These are conference presentations about the development of PyGMT (previously
98103

99104
.. figure:: _static/agu2017-poster.jpg
100105
:target: https://doi.org/10.6084/m9.figshare.5662411
106+
:width: 80%
101107
:align: center
102108
:alt: AGU 2017 poster on figshare

0 commit comments

Comments
 (0)