Skip to content

Commit 31bf5d2

Browse files
committed
Add scientific-python-myst-theme
Vendor scientific-python/scientific-python-myst-theme at 9002ff6 with copier. The footer grid reads its links and social icons from a JSON file through the footer-items.mjs plugin. The template ships the scientific-python.org link set, whose relative paths do not exist on this site. footer_items.json carries the links and icons from the Hugo footer on main instead, plus the Bluesky account the main site links: About and Roadmap stay local, the other five links point at scientific-python.org. Assisted-by: claude-code:claude-opus-4-8 Assisted-by: claude-code:claude-fable-5-1 [3M1LY]
1 parent d8f1279 commit 31bf5d2

26 files changed

Lines changed: 354 additions & 5 deletions

assets/css/custom.css

Lines changed: 0 additions & 3 deletions
This file was deleted.

content/.copier-answers.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2+
_commit: 9002ff6
3+
_src_path: gh:scientific-python/scientific-python-myst-theme
4+
favicon: https://raw.githubusercontent.com/scientific-python/scientific-python.org/main/static/favicon.ico
5+
footer_items_json: assets/json/footer_items.json
6+
project_name: Learn Scientific Python
7+
project_url: learn.scientific-python.org
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
body {
2+
display: flex;
3+
flex-direction: column;
4+
min-height: 100vh;
5+
}
6+
7+
main {
8+
min-height: 0;
9+
flex: 1 0 auto;
10+
}
11+
12+
.article.content {
13+
/* Override 100vh from myst-theme:styles/typography.css so content div
14+
* doesn't grow <main> to push the footer offscreen.
15+
*/
16+
min-height: 0;
17+
}
18+
19+
.footer {
20+
/* Make footer "sticky" to page bottom (also the above flex rules), per
21+
* the flexbox strategy described here:
22+
* https://css-tricks.com/couple-takes-sticky-footer/#aa-there-is-flexbox
23+
* and here:
24+
* https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/
25+
* This solution does not require hardcoding a fixed footer height in the
26+
* style rules.
27+
*/
28+
flex-shrink: 0;
29+
background: #013243;
30+
color: white;
31+
padding-left: 2rem;
32+
padding-right: 2rem;
33+
34+
/* Outer content grid */
35+
& .outer-grid {
36+
/* logo, project description, link columns, social icons */
37+
grid-template-columns: 2fr 6fr 8fr 3fr;
38+
column-gap: 4rem;
39+
align-items: center;
40+
margin: 0rem 4rem;
41+
42+
& li {
43+
list-style: none;
44+
}
45+
}
46+
47+
@media (max-width: 640px) {
48+
& .outer-grid {
49+
grid-template-columns: 1fr;
50+
justify-items: start;
51+
}
52+
}
53+
54+
/* Heading colours */
55+
& a,
56+
h1,
57+
h2,
58+
h3,
59+
h4,
60+
h5,
61+
h6 {
62+
color: white;
63+
}
64+
65+
& h1 {
66+
font-size: 1.25rem;
67+
font-weight: bold;
68+
}
69+
& .footer-links {
70+
column-gap: 1.5rem;
71+
line-height: normal;
72+
73+
& a {
74+
color: white;
75+
text-decoration-color: white;
76+
inline-size: min-content;
77+
display: inline-block;
78+
text-wrap: nowrap;
79+
}
80+
}
81+
82+
& .footer-icons {
83+
column-gap: 3rem;
84+
row-gap: 1rem;
85+
86+
& img {
87+
filter: invert(100%);
88+
margin-bottom: 0.1rem;
89+
margin-top: 0.1rem;
90+
min-width: 1.75rem;
91+
width: 1.75rem;
92+
}
93+
}
94+
}
95+
96+
.footer-logo {
97+
min-width: 60px;
98+
}
99+
100+
/* Hide download button */
101+
.myst-fm-downloads-button {
102+
display: none;
103+
}
104+
105+
/* Set site title bold */
106+
.myst-home-link {
107+
font-weight: bold;
108+
}
109+
110+
/* Unsure where this CSS came from, but keeping it for now */
111+
/* --- Make layout feel less "book-ish" and closer to a website --- */
112+
.bd-main .bd-content .bd-article-container {
113+
max-width: 900px; /* keep readable, less wide than default "docs" feel */
114+
}
115+
116+
h1,
117+
h2,
118+
h3,
119+
h4 {
120+
letter-spacing: -0.01em;
121+
}
122+
123+
/* Slightly tighten the top spacing so it feels more like a marketing/docs site */
124+
.bd-header {
125+
box-shadow: none;
126+
}
127+
128+
/* If the left sidebar feels too dominant, reduce its visual weight */
129+
.bd-sidebar-primary {
130+
border-right: 0;
131+
}
132+
133+
.copyright {
134+
font-size: smaller;
135+
}

content/assets/icons/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
You can find more free icons at:
2+
3+
- https://fonts.google.com/icons (Search and then click the SVG download button at the bottom of the right-hand column.)
4+
- https://simpleicons.org/
5+
6+
Apache licensed, but with a notice at https://github.com/google/material-design-icons:
7+
8+
> We'd love attribution in your app's about screen, but it's not required.

content/assets/icons/bluesky.svg

Lines changed: 1 addition & 0 deletions
Loading

content/assets/icons/discord.svg

Lines changed: 1 addition & 0 deletions
Loading

content/assets/icons/discourse.svg

Lines changed: 1 addition & 0 deletions
Loading

content/assets/icons/facebook.svg

Lines changed: 1 addition & 0 deletions
Loading

content/assets/icons/github.svg

Lines changed: 1 addition & 0 deletions
Loading

content/assets/icons/instagram.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)