Skip to content

Commit 81bf841

Browse files
turn into admonition mode
1 parent a91298b commit 81bf841

File tree

3 files changed

+69
-5
lines changed

3 files changed

+69
-5
lines changed

web/pandas/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ main:
1919
- meta
2020
- footnotes
2121
- codehilite
22+
- admonition
2223
static:
2324
logo: static/img/pandas_white.svg
2425
css:

web/pandas/pdeps/0010-required-pyarrow-dependency.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010

1111
[TOC]
1212

13-
**NOTE**: while this PDEP mentions adding pyarrow as a required dependency in
14-
pandas 3.0, this aspect has been delayed until after pandas 3.0 (see the
15-
abstract of [PDEP-14](https://pandas.pydata.org/pdeps/0014-string-dtype.html)).
16-
Therefore, pandas 3.0 will not have a hard requirement on pyarrow but still use
17-
pyarrow by default (for the new string dtype) when installed.
13+
!!! note
14+
While this PDEP mentions adding pyarrow as a required dependency in
15+
pandas 3.0, this aspect has been delayed until after pandas 3.0 (see the
16+
abstract of [PDEP-14](https://pandas.pydata.org/pdeps/0014-string-dtype.html)).
17+
Therefore, pandas 3.0 will not have a hard requirement on pyarrow but still use
18+
pyarrow by default (for the new string dtype) when installed.
1819

1920
## Abstract
2021

web/pandas/static/css/pandas.css

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,65 @@ h2:hover a.headerlink, h3:hover a.headerlink {
135135
opacity: 1;
136136
transition: opacity 0.5s;
137137
}
138+
139+
140+
/** Copied from the pydata-sphinx-theme **/
141+
div.admonition, .admonition {
142+
margin: 1.5625em auto;
143+
padding: 0 0.6rem 0.8rem;
144+
overflow: hidden;
145+
/* break-inside has replaced page-break-inside and is widely usable since 2019 */
146+
page-break-inside: avoid;
147+
break-inside: avoid;
148+
border-left: 0.2rem solid;
149+
border-color: #276be9;
150+
border-radius: 0.25rem;
151+
background-color: #fff;
152+
/** * Special-case for a `sidebar` class that makes the admonition float to * the right like the {
153+
sidebar
154+
}
155+
directive. */
156+
}
157+
div.admonition *:last-child, .admonition *:last-child {
158+
margin-bottom: 0;
159+
}
160+
div.admonition p.admonition-title ~ *, .admonition p.admonition-title ~ * {
161+
margin-left: 1.4rem;
162+
margin-right: 1.4rem;
163+
}
164+
div.admonition > ol, .admonition > ol, div.admonition > ul, .admonition > ul {
165+
margin-left: 1em;
166+
}
167+
div.admonition > .admonition-title, .admonition > .admonition-title {
168+
margin: 0 -0.6rem;
169+
padding: 0.4rem 0.6rem 0.4rem 2rem;
170+
/* font-weight: var(--pst-admonition-font-weight-heading); */
171+
position: relative;
172+
background-color: #dce7fc;
173+
z-index: 1;
174+
}
175+
div.admonition > .admonition-title::after, .admonition > .admonition-title::after {
176+
position: absolute;
177+
left: 0.5rem;
178+
width: 1rem;
179+
height: 1rem;
180+
/* color: var(--pst-color-info); */
181+
/* font: var(--fa-font-solid); */
182+
line-height: inherit;
183+
/* content: "\f05a"; */
184+
opacity: 1;
185+
}
186+
div.admonition > .admonition-title + *, .admonition > .admonition-title + * {
187+
margin-top: 0.4em;
188+
}
189+
190+
div.admonition.note, .admonition.note {
191+
border-color: #276be9;
192+
}
193+
div.admonition.note > .admonition-title, .admonition.note > .admonition-title {
194+
background-color: #dce7fc;
195+
}
196+
div.admonition.note > .admonition-title::after, .admonition.note > .admonition-title::after {
197+
color: #276be9;
198+
/* content: "\f05a"; */
199+
}

0 commit comments

Comments
 (0)