Skip to content

Commit 9333dc1

Browse files
authored
Merge pull request #2 from jupyter-book/agoose77/feat-drop-spacers
🛠️ Drop spacers in favour of padding
2 parents 55bef2e + 672b91d commit 9333dc1

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

css/footer.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,26 @@
44
padding-left: 2rem;
55
padding-right: 2rem;
66

7+
padding-left: 3.5rem;
8+
padding-right: 3.5rem;
9+
710
/* Outer content grid */
811
& .outer-grid {
912
/* spacer, project description, spacer, link columns, spacer */
10-
grid-template-columns: 0.1fr 3fr 3fr 4fr 0.1fr;
13+
grid-template-columns: 3fr 3fr 4fr;
1114
align-items: center;
1215
margin-bottom: 0rem;
1316

1417
& li {
1518
list-style: none;
1619
}
20+
}
1721

22+
@media (max-width: 640px) {
23+
& .outer-grid {
24+
grid-template-columns: 1fr;
25+
justify-items: start;
26+
}
1827
}
1928

2029
/* Heading colours */

footer.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
% This defines the footer of the site, and is not parsed as a regular "page"
22
% We point to it with the following in `myst.yml`:
33
% site:
4-
% parts:
5-
% footer: footer.md
4+
% parts:
5+
% footer: footer.md
66

77
% Here we use `grid` to add a basic grid structure to the HTML,
88
% but the formatting column sizes are defined manually in css/footer.css
99
% see the `grid-template-columns` line.
1010
:::::{grid} 3 3 5 5
1111
:class: outer-grid col-screen
1212

13-
<!-- Left spacer -->
14-
::::{div}
15-
::::
16-
1713
<!-- Project description -->
14+
1815
::::{div}
1916

2017
# Landing Pages
@@ -28,11 +25,13 @@ This is a description of our project. And a [link to its homepage](https://githu
2825
::::
2926

3027
<!-- Spacer between project description and links columns -->
28+
3129
::::{div}
3230
::::
3331

3432
<!-- Link columns -->
35-
% This a *second* grid embedded within the first one, to create nicer
33+
34+
% This a _second_ grid embedded within the first one, to create nicer
3635
% responsive design experience. This grid will have a single column on narrow screens,
3736
% and fan out into three columns on wide screens. However, it always remains within
3837
% its parent grid column.
@@ -43,23 +42,19 @@ This is a description of our project. And a [link to its homepage](https://githu
4342
- [About](https://mystmd.org/overview/ecosystem)
4443
- [Guide](https://mystmd.org/guide)
4544
- [Sandbox](https://mystmd.org/sandbox)
46-
:::
45+
:::
4746

4847
:::{div}
4948

5049
- A second column!
5150
- With multiple entries
52-
:::
51+
:::
5352

5453
:::{div}
5554

5655
- And what about a third
57-
:::
58-
59-
::::
56+
:::
6057

61-
<!-- Right-most spacer -->
62-
::::{div}
6358
::::
6459

6560
:::::

0 commit comments

Comments
 (0)