Skip to content

Commit 31ccd25

Browse files
seismanMax Jonesweiji14
authored
Redesign the team gallery using sphinx-design's card directive (#1937)
Co-authored-by: Max Jones <[email protected]> Co-authored-by: Wei Ji <[email protected]>
1 parent 864d512 commit 31ccd25

File tree

5 files changed

+94
-111
lines changed

5 files changed

+94
-111
lines changed

.github/workflows/ci_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
run: |
7373
mamba install gmt=6.3.0 numpy pandas xarray netCDF4 packaging \
7474
build ipython make myst-parser geopandas \
75-
sphinx sphinx-copybutton sphinx-gallery sphinx_rtd_theme
75+
sphinx sphinx-copybutton sphinx-design sphinx-gallery sphinx_rtd_theme
7676
7777
# Show installed pkg information for postmortem diagnostic
7878
- name: List installed packages

doc/_static/style.css

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -203,37 +203,3 @@ a.copybtn {
203203
.sphx-glr-single-img {
204204
max-width: 80%!important;
205205
}
206-
207-
.team-row {
208-
display: flex;
209-
flex-wrap: wrap;
210-
}
211-
212-
.team-card {
213-
background-color: #fff;
214-
background-clip: border-box;
215-
border: 1px solid rgba(0,0,0,.125);
216-
border-radius: 0.5rem;
217-
margin: 0.25em;
218-
flex: 0 1 175px;
219-
}
220-
221-
.team-img {
222-
border-radius: 0.5rem;
223-
width: 100%;
224-
height: 20vh!important;
225-
object-fit: cover;
226-
}
227-
228-
.team-card-body {
229-
padding: 1.25rem;
230-
height: 135px;
231-
}
232-
233-
.team-card-text {
234-
display: flex;
235-
margin-block-start: 0em;
236-
margin-block-end: 0.2em;
237-
margin-inline-start: 0px;
238-
margin-inline-end: 0px;
239-
}

doc/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,18 @@
2727
"sphinx.ext.extlinks",
2828
"sphinx.ext.intersphinx",
2929
"sphinx.ext.napoleon",
30-
"sphinx_gallery.gen_gallery",
3130
"sphinx_copybutton",
31+
"sphinx_design",
32+
"sphinx_gallery.gen_gallery",
3233
]
3334

3435
# Autosummary pages will be generated by sphinx-autogen instead of sphinx-build
3536
autosummary_generate = []
3637

3738
# Auto-generate header anchors with MyST parser
3839
myst_heading_anchors = 4
40+
# Allow code fences using colons
41+
myst_enable_extensions = ["colon_fence"]
3942

4043
# Make the list of returns arguments and attributes render the same as the
4144
# parameters list

doc/team.md

Lines changed: 88 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -22,78 +22,91 @@ responsibilities. Distinguished Contributors who are also active maintainers of
2222
the PyGMT project and have responsibilities detailed in the
2323
{doc}`maintenance` have 'Maintainer' listed below their names.
2424

25-
```{raw} html
26-
27-
<div class="team-row">
28-
<div class="team-card">
29-
<img class="card-img-top team-img" src="https://avatars.githubusercontent.com/u/3974108?v=4" alt="Card image">
30-
<div class="team-card-body">
31-
<h6 class="team-card-text">Dongdong Tian</h6>
32-
<h7 class="team-card-text">Maintainer</h7>
33-
<h7 class="team-card-text"><a href="https://github.com/seisman" >@seisman</a></h7>
34-
</div>
35-
</div>
36-
<div class="team-card">
37-
<img class="card-img-top team-img" src="https://avatars.githubusercontent.com/u/50591376?v=4" alt="Card image">
38-
<div class="team-card-body">
39-
<h6 class="team-card-text">Jiayuan Yao</h6>
40-
<h7 class="team-card-text"><a href="https://github.com/core-man" >@core-man</a></h7>
41-
</div>
42-
</div>
43-
<div class="team-card">
44-
<img class="card-img-top team-img" src="https://avatars.githubusercontent.com/u/290082?v=4" alt="Card image">
45-
<div class="team-card-body">
46-
<h6 class="team-card-text">Leonardo Uieda</h6>
47-
<h7 class="team-card-text">Founder</h7>
48-
<h7 class="team-card-text"><a href="https://github.com/leouieda" >@leouieda</a></h7>
49-
</div>
50-
</div>
51-
<div class="team-card">
52-
<img class="card-img-top team-img" src="https://avatars.githubusercontent.com/u/38269494?v=4" alt="Card image">
53-
<div class="team-card-body">
54-
<h6 class="team-card-text">Liam Toney</h6>
55-
<h7 class="team-card-text"><a href="https://github.com/liamtoney" >@liamtoney</a></h7>
56-
</div>
57-
</div>
58-
<div class="team-card">
59-
<img class="card-img-top team-img" src="https://avatars.githubusercontent.com/u/14077947?v=4" alt="Card image">
60-
<div class="team-card-body">
61-
<h6 class="team-card-text">Meghan Jones</h6>
62-
<h7 class="team-card-text">Maintainer</h7>
63-
<h7class="team-card-text"><a href="https://github.com/meghanrjones" >@meghanrjones</a></h7>
64-
</div>
65-
</div>
66-
<div class="team-card">
67-
<img class="card-img-top team-img" src="https://avatars.githubusercontent.com/u/23025878?v=4" alt="Card image">
68-
<div class="team-card-body">
69-
<h6 class="team-card-text">Michael Grund</h6>
70-
<h7 class="team-card-text">Maintainer</h7>
71-
<h7class="team-card-text"><a href="https://github.com/michaelgrund" >@michaelgrund</a></h7>
72-
</div>
73-
</div>
74-
<div class="team-card">
75-
<img class="card-img-top team-img" src="https://avatars.githubusercontent.com/u/26473567?v=4" alt="Card image">
76-
<div class="team-card-body">
77-
<h6 class="team-card-text">Paul Wessel</h6>
78-
<h7 class="team-card-text">Founder</h7>
79-
<h7class="team-card-text"><a href="https://github.com/PaulWessel" >@PaulWessel</a></h7>
80-
</div>
81-
</div>
82-
<div class="team-card">
83-
<img class="card-img-top team-img" src="https://avatars.githubusercontent.com/u/23487320?v=4" alt="Card image">
84-
<div class="team-card-body">
85-
<h6 class="team-card-text">Wei Ji Leong</h6>
86-
<h7 class="team-card-text">Maintainer</h7>
87-
<h7class="team-card-text"><a href="https://github.com/weiji14" >@weiji14</a></h7>
88-
</div>
89-
</div>
90-
<div class="team-card">
91-
<img class="card-img-top team-img" src="https://avatars.githubusercontent.com/u/29518865?v=4" alt="Card image">
92-
<div class="team-card-body">
93-
<h6 class="team-card-text">Will Schlitzer</h6>
94-
<h7 class="team-card-text">Maintainer</h7>
95-
<p class="team-card-text"><a href="https://github.com/willschlitzer" >@willschlitzer</a></h7>
96-
</div>
97-
</div>
98-
</div>
99-
```
25+
:::::{grid} 2 3 3 4
26+
27+
::::{grid-item-card} Dongdong Tian
28+
:margin: 0 3 0 0
29+
:text-align: center
30+
:img-top: https://avatars.githubusercontent.com/u/3974108?v=4
31+
32+
[@seisman](https://github.com/seisman)
33+
+++
34+
{bdg-primary}`Maintainer`
35+
::::
36+
37+
::::{grid-item-card} Jiayuan Yao
38+
:margin: 0 3 0 0
39+
:text-align: center
40+
:img-top: https://avatars.githubusercontent.com/u/50591376?v=4
41+
42+
[@core-man](https://github.com/core-man)
43+
::::
44+
45+
::::{grid-item-card} Leonardo Uieda
46+
:margin: 0 3 0 0
47+
:text-align: center
48+
:img-top: https://avatars.githubusercontent.com/u/290082?v=4
49+
50+
[@leouieda](https://github.com/leouieda)
51+
+++
52+
{bdg-success}`Founder`
53+
::::
54+
55+
::::{grid-item-card} Liam Toney
56+
:margin: 0 3 0 0
57+
:text-align: center
58+
:img-top: https://avatars.githubusercontent.com/u/38269494?v=4
59+
60+
[@liamtoney](https://github.com/liamtoney)
61+
::::
62+
63+
::::{grid-item-card} Max Jones
64+
:margin: 0 3 0 0
65+
:text-align: center
66+
:img-top: https://avatars.githubusercontent.com/u/14077947?v=4
67+
68+
[@meghanrjones](https://github.com/meghanrjones)
69+
+++
70+
{bdg-primary}`Maintainer`
71+
::::
72+
73+
::::{grid-item-card} Michael Grund
74+
:margin: 0 3 0 0
75+
:text-align: center
76+
:img-top: https://avatars.githubusercontent.com/u/23025878?v=4
77+
78+
[@michaelgrund](https://github.com/michaelgrund)
79+
+++
80+
{bdg-primary}`Maintainer`
81+
::::
82+
83+
::::{grid-item-card} Paul Wessel
84+
:margin: 0 3 0 0
85+
:text-align: center
86+
:img-top: https://avatars.githubusercontent.com/u/26473567?v=4
87+
88+
[@PaulWessel](https://github.com/PaulWessel)
89+
+++
90+
{bdg-success}`Founder`
91+
::::
92+
93+
::::{grid-item-card} Wei Ji Leong
94+
:margin: 0 3 0 0
95+
:text-align: center
96+
:img-top: https://avatars.githubusercontent.com/u/23487320?v=4
97+
98+
[@weiji14](https://github.com/weiji14)
99+
+++
100+
{bdg-primary}`Maintainer`
101+
::::
102+
103+
::::{grid-item-card} Will Schlitzer
104+
:margin: 0 3 0 0
105+
:text-align: center
106+
:img-top: https://avatars.githubusercontent.com/u/29518865?v=4
107+
108+
[@willschlitzer](https://github.com/willschlitzer)
109+
+++
110+
{bdg-primary}`Maintainer`
111+
::::
112+
:::::

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,6 @@ dependencies:
3636
- myst-parser
3737
- sphinx
3838
- sphinx-copybutton
39+
- sphinx-design
3940
- sphinx-gallery
4041
- sphinx_rtd_theme

0 commit comments

Comments
 (0)