Skip to content

Commit c980ce7

Browse files
Add PST cards in grid (#466)
1 parent 0905c5c commit c980ce7

3 files changed

Lines changed: 54 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.sd-container,
2+
.sd-container-fluid,
3+
.sd-container-lg,
4+
.sd-container-md,
5+
.sd-container-sm,
6+
.sd-container-xl {
7+
margin-left: auto;
8+
margin-right: auto;
9+
padding-left: var(--sd-gutter-x, 0.75rem);
10+
padding-right: var(--sd-gutter-x, 0.75rem);
11+
width: 100%;
12+
}
13+
14+
.sd-row {
15+
--sd-gutter-x: 1.5rem;
16+
--sd-gutter-y: 0;
17+
display: flex;
18+
margin-top: calc(var(--sd-gutter-y) * -1);
19+
margin-right: calc(var(--sd-gutter-x) * -0.5);
20+
margin-left: calc(var(--sd-gutter-x) * -0.5);
21+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@import "./pst-deps/sphinx-design/badges";
22
@import "./pst-deps/sphinx-design/card";
3+
@import "./pst-deps/sphinx-design/grid";
34
@import "./pst/pydata-sphinx-theme";
45
@import "./spht/code";

layouts/shortcodes/grid.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{{/*
2+
3+
doc: Grids.
4+
5+
{{< grid >}}
6+
7+
{{< card title="Only heading" >}}{{< /card >}}
8+
9+
{{< card >}}
10+
Only body.
11+
12+
But with multiple text paragraphs.
13+
{{< /card >}}
14+
15+
{{< card title="Heading and body" >}}
16+
Content of the third card.
17+
18+
{{< badge primary >}}
19+
Sample badge
20+
{{< /badge >}}
21+
22+
{{< /card >}}
23+
24+
{{< /grid >}}
25+
26+
*/}}
27+
28+
<div class="sd-container-fluid">
29+
<div class="sd-row">
30+
{{ .Inner }}
31+
</div>
32+
</div>

0 commit comments

Comments
 (0)