Skip to content

Commit 8e8abc0

Browse files
DOC/website: Redesign landing page of PyGMT website (#4762)
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
1 parent 4f53f6d commit 8e8abc0

3 files changed

Lines changed: 186 additions & 30 deletions

File tree

‎doc/_static/style.css‎

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

41-
.banner {
42-
padding-bottom: 60px;
43-
text-align: center;
44-
}
45-
46-
.banner h1 {
47-
margin-top: 40px;
48-
font-size: 4em;
49-
}
50-
5141
.wy-nav-content {
5242
max-width: 1000px;
5343
}
@@ -71,6 +61,19 @@ p {
7161
border: solid 2px #b4c7e7;
7262
}
7363

64+
/* Change color of cards */
65+
/* https://sphinx-design.readthedocs.io/en/rtd-theme/css_variables.html */
66+
:root {
67+
--sd-color-card-background: #EBF0F9; /* lighter color as top box of sidebar */
68+
--sd-color-card-header: #b4c7e7; /* same color as top box of sidebar */
69+
--sd-color-card-footer: #FFFFFF; /* white */
70+
}
71+
72+
/* Set margin below buttons */
73+
.sd-card-text {
74+
margin-bottom: 10px;
75+
}
76+
7477
/* Format parameters section similar to sphinx_rtd_theme v4.x.x (not a grid) */
7578
html.writer-html5 .rst-content dl.field-list {
7679
display: initial;

‎doc/conf.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,11 @@
215215
"https://forum.generic-mapping-tools.org",
216216
),
217217
(
218-
'<i class="fa fa-github fa-fw"></i> Bug Report (GitHub)',
218+
'<i class="fa fa-bug fa-fw"></i> Bug Report (GitHub)',
219219
f"{repository_url}/issues",
220220
),
221221
(
222-
'<i class="fa fa-gavel fa-fw"></i> Code of Conduct',
222+
'<i class="fa fa-handshake-o fa-fw"></i> Code of Conduct',
223223
"https://github.com/GenericMappingTools/.github/blob/main/CODE_OF_CONDUCT.md",
224224
),
225225
],

‎doc/index.md‎

Lines changed: 171 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,172 @@
1-
```{title} Home
2-
```
1+
:::{title} Home
2+
:::
33

4-
<div class="banner">
5-
<img src="_static/pygmtlogo.png" alt="PyGMT Logo" style="width: 65%;">
6-
<h2>
7-
A Python interface for the
8-
<a href="https://www.generic-mapping-tools.org/">Generic Mapping Tools</a>
9-
</h2>
10-
</div>
11-
12-
```{include} ../README.md
13-
:start-after: <!-- doc-index-start-after -->
14-
:end-before: <!-- doc-index-end-before -->
15-
:relative-images:
16-
```
4+
<!-- Reference: https://sphinx-design.readthedocs.io/en/rtd-theme/index.html -->
5+
<!-- Add and center the PyGMT logo image -->
6+
::::{div} sd-d-flex-row sd-align-major-center
7+
:::{image} ./_static/pygmtlogo.png
8+
:width: 600px
9+
:::
10+
::::
11+
<!-- Add short text what PyGMT is and does -->
12+
:::{div} sd-text-center sd-fs-3 sd-pt-3 sd-pb-3
13+
A Python interface for the [Generic Mapping Tools](https://www.generic-mapping-tools.org/)
14+
:::
15+
16+
:::{div} sd-text-center sd-fs-5 sd-pb-3
17+
PyGMT is a library for processing geospatial and geophysical data and making
18+
publication-quality maps and figures. It provides a Pythonic interface for the
19+
[Generic Mapping Tools (GMT)](https://www.generic-mapping-tools.org/), a command-line
20+
program widely used across the Earth, Ocean, and Planetary sciences and beyond.
21+
:::
22+
23+
24+
<!-- Set up grid -->
25+
:::::{grid} 1 2 2 3
26+
27+
::::{grid-item-card}
28+
:margin: 0 3 0 0
29+
{octicon}`rocket;2.5em;sd-text-info` **Getting Started**
30+
^^^
31+
:::{button-ref} install
32+
:color: secondary
33+
:outline:
34+
:shadow:
35+
:::
36+
:::{button-ref} intro/index
37+
:color: secondary
38+
:outline:
39+
:shadow:
40+
:::
41+
::::
42+
43+
::::{grid-item-card}
44+
:margin: 0 3 0 0
45+
{octicon}`globe;2.5em;sd-text-info` **Project Overview**
46+
^^^
47+
:::{button-ref} overview
48+
:color: secondary
49+
:outline:
50+
:shadow:
51+
:::
52+
:::{button-ref} ecosystem
53+
:color: secondary
54+
:outline:
55+
:shadow:
56+
:::
57+
:::{button-ref} presentations
58+
:color: secondary
59+
:outline:
60+
:shadow:
61+
:::
62+
:::{button-ref} citing
63+
:color: secondary
64+
:outline:
65+
:shadow:
66+
:::
67+
::::
68+
69+
::::{grid-item-card}
70+
:margin: 0 3 0 0
71+
{octicon}`mortar-board;2.5em;sd-text-info` **User Guide**
72+
^^^
73+
:::{button-ref} tutorials/index
74+
:color: secondary
75+
:outline:
76+
:shadow:
77+
:::
78+
:::{button-ref} gallery/index
79+
:color: secondary
80+
:outline:
81+
:shadow:
82+
:::
83+
:::{button-ref} projections/index
84+
:color: secondary
85+
:outline:
86+
:shadow:
87+
:::
88+
:::{button-ref} external_resources
89+
:color: secondary
90+
:outline:
91+
:shadow:
92+
:::
93+
::::
94+
95+
::::{grid-item-card}
96+
:margin: 0 3 0 0
97+
{octicon}`book;2.5em;sd-text-info` **Reference Guide**
98+
^^^
99+
:::{button-ref} api/index
100+
:color: secondary
101+
:outline:
102+
:shadow:
103+
:::
104+
:::{button-ref} techref/index
105+
:color: secondary
106+
:outline:
107+
:shadow:
108+
:::
109+
:::{button-ref} minversions
110+
:color: secondary
111+
:outline:
112+
:shadow:
113+
:::
114+
:::{button-ref} changes
115+
:color: secondary
116+
:outline:
117+
:shadow:
118+
:::
119+
::::
120+
121+
::::{grid-item-card}
122+
:margin: 0 3 0 0
123+
{octicon}`terminal;2.5em;sd-text-info` **Development**
124+
^^^
125+
:::{button-ref} contributing
126+
:color: secondary
127+
:outline:
128+
:shadow:
129+
:::
130+
:::{button-ref} maintenance
131+
:color: secondary
132+
:outline:
133+
:shadow:
134+
:::
135+
:::{button-ref} team
136+
:color: secondary
137+
:outline:
138+
:shadow:
139+
:::
140+
::::
141+
142+
::::{grid-item-card}
143+
:margin: 0 3 0 0
144+
{octicon}`light-bulb;2.5em;sd-text-info` **Getting Help**
145+
^^^
146+
:::{button-link} https://forum.generic-mapping-tools.org
147+
:color: secondary
148+
:outline:
149+
:shadow:
150+
{octicon}`comment-discussion;1em;sd-text-info` GMT Forum
151+
:::
152+
:::{button-link} https://github.com/GenericMappingTools/pygmt/issues
153+
:color: secondary
154+
:outline:
155+
:shadow:
156+
{octicon}`bug;1em;sd-text-info` Bug Report (GitHub)
157+
:::
158+
:::{button-link} https://github.com/GenericMappingTools/.github/blob/main/CODE_OF_CONDUCT.md
159+
:color: secondary
160+
:outline:
161+
:shadow:
162+
{octicon}`code-of-conduct;1em;sd-text-info` Code of Conduct
163+
:::
164+
::::
165+
166+
:::::
167+
168+
169+
<!-- Set up sidebar -->
17170

18171
```{toctree}
19172
:maxdepth: 2
@@ -49,20 +202,20 @@ external_resources.md
49202
```{toctree}
50203
:maxdepth: 2
51204
:hidden:
52-
:caption: Reference Documentation
205+
:caption: Reference Guide
53206
54207
api/index.rst
55208
techref/index.md
56-
changes.md
57209
minversions.md
210+
changes.md
58211
```
59212

60213
```{toctree}
61214
:maxdepth: 2
62215
:hidden:
63216
:caption: Development
64217
65-
team.md
66218
contributing.md
67219
maintenance.md
220+
team.md
68221
```

0 commit comments

Comments
 (0)