Skip to content

Commit b5622c6

Browse files
DOC: use the sphinx-panels extension for cards instead of raw html (#34065)
1 parent 95e0069 commit b5622c6

File tree

7 files changed

+207
-233
lines changed

7 files changed

+207
-233
lines changed

doc/source/_static/css/getting_started.css

+19-6
Original file line numberDiff line numberDiff line change
@@ -131,20 +131,30 @@ ul.task-bullet > li > p:first-child {
131131

132132
/* Getting started index page */
133133

134-
.intro-card {
134+
.comparison-card {
135135
background:#FFF;
136136
border-radius:0;
137137
padding: 30px 10px 10px 10px;
138138
margin: 10px 0px;
139139
}
140140

141-
.intro-card .card-text {
142-
margin:20px 0px;
143-
/*min-height: 150px; */
141+
.comparison-card p.card-text {
142+
margin: 0px;
144143
}
145144

146-
.intro-card .card-img-top {
145+
.comparison-card .card-img-top {
147146
margin: 10px;
147+
margin-bottom: 20px;
148+
height: 72px;
149+
}
150+
151+
.comparison-card-excel .card-img-top, .comparison-card-stata .card-img-top, .comparison-card-sas .card-img-top {
152+
height: 52px;
153+
}
154+
155+
.comparison-card .card-footer {
156+
border: none;
157+
background-color:white;
148158
}
149159

150160
.install-block {
@@ -154,10 +164,13 @@ ul.task-bullet > li > p:first-child {
154164
.install-card .card-header {
155165
border: none;
156166
background-color:white;
167+
padding: 1rem 1rem 0rem 1rem;
168+
}
169+
170+
.install-card .card-header p.card-text {
157171
color: #150458;
158172
font-size: 1.1rem;
159173
font-weight: bold;
160-
padding: 1rem 1rem 0rem 1rem;
161174
}
162175

163176
.install-card .card-footer {

doc/source/_static/css/pandas.css

+22-21
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,40 @@
55
--pst-color-info: 23, 162, 184;
66
}
77

8-
/* Getting started index page */
8+
/* Main index page overview cards */
99

1010
.intro-card {
1111
background: #fff;
1212
border-radius: 0;
13-
padding: 30px 10px 10px 10px;
13+
padding: 30px 10px 20px 10px;
1414
margin: 10px 0px;
1515
}
1616

17-
.intro-card .card-text {
18-
margin: 20px 0px;
19-
/*min-height: 150px; */
17+
.intro-card p.card-text {
18+
margin: 0px;
2019
}
2120

22-
.custom-button {
23-
background-color: #dcdcdc;
21+
.intro-card .card-img-top {
22+
margin: 10px;
23+
height: 52px;
24+
}
25+
26+
.intro-card .card-header {
2427
border: none;
25-
color: #484848;
26-
text-align: center;
27-
text-decoration: none;
28-
display: inline-block;
29-
font-size: 0.9rem;
30-
border-radius: 0.5rem;
31-
max-width: 220px;
32-
padding: 0.5rem 0rem;
28+
background-color:white;
29+
color: #150458 !important;
30+
font-size: var(--pst-font-size-h5);
31+
font-weight: bold;
32+
padding: 2.5rem 0rem 0.5rem 0rem;
3333
}
3434

35-
.custom-button a {
36-
color: #484848;
35+
.intro-card .card-footer {
36+
border: none;
37+
background-color:white;
3738
}
3839

39-
.custom-button p {
40-
margin-top: 0;
41-
margin-bottom: 0rem;
42-
color: #484848;
40+
.intro-card .card-footer p.card-text{
41+
max-width: 220px;
42+
margin-left: auto;
43+
margin-right: auto;
4344
}

doc/source/conf.py

+5
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"sphinx.ext.ifconfig",
6666
"sphinx.ext.linkcode",
6767
"nbsphinx",
68+
"sphinx_panels",
6869
"contributors", # custom pandas extension
6970
]
7071

@@ -139,6 +140,10 @@
139140
# nbsphinx do not use requirejs (breaks bootstrap)
140141
nbsphinx_requirejs_path = ""
141142

143+
# sphinx-panels shouldn't add bootstrap css since the pydata-sphinx-theme
144+
# already loads it
145+
panels_add_bootstrap_css = False
146+
142147
# Add any paths that contain templates here, relative to this directory.
143148
templates_path = ["../_templates"]
144149

0 commit comments

Comments
 (0)