Skip to content

Commit

Permalink
Add PST cards in grid
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrodmillman committed Feb 6, 2024
1 parent 0905c5c commit f221a7d
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
21 changes: 21 additions & 0 deletions assets/theme-css/pst-deps/sphinx-design/_grid.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.sd-container,
.sd-container-fluid,
.sd-container-lg,
.sd-container-md,
.sd-container-sm,
.sd-container-xl {
margin-left: auto;
margin-right: auto;
padding-left: var(--sd-gutter-x, 0.75rem);
padding-right: var(--sd-gutter-x, 0.75rem);
width: 100%;
}

.sd-row {
--sd-gutter-x: 1.5rem;
--sd-gutter-y: 0;
display: flex;
margin-top: calc(var(--sd-gutter-y) * -1);
margin-right: calc(var(--sd-gutter-x) * -0.5);
margin-left: calc(var(--sd-gutter-x) * -0.5);
}
1 change: 1 addition & 0 deletions assets/theme-css/scientific-python-hugo-theme.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import "./pst-deps/sphinx-design/badges";
@import "./pst-deps/sphinx-design/card";
@import "./pst-deps/sphinx-design/grid";
@import "./pst/pydata-sphinx-theme";
@import "./spht/code";
32 changes: 32 additions & 0 deletions layouts/shortcodes/grid.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{/*

doc: Grids.

{{< grid >}}

{{< card title="Only heading" >}}{{< /card >}}

{{< card >}}
Only body.

But with multiple text paragraphs.
{{< /card >}}

{{< card title="Heading and body" >}}
Content of the third card.

{{< badge primary >}}
Sample badge
{{< /badge >}}

{{< /card >}}

{{< /grid >}}

*/}}

<div class="sd-container-fluid">
<div class="sd-row">
{{ .Inner }}
</div>
</div>

0 comments on commit f221a7d

Please sign in to comment.