From acfe04fb2c11cd90681ff57786953051e74c512f Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Sat, 18 Jul 2026 10:44:35 -0500 Subject: [PATCH 01/12] footer text: statisitical -> scientific --- template/footer.md.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/footer.md.jinja b/template/footer.md.jinja index 494e779..02d27f7 100644 --- a/template/footer.md.jinja +++ b/template/footer.md.jinja @@ -19,7 +19,7 @@ :align: left ``` -Community-driven and community-owned initiative dedicated to building a robust, sustainable ecosystem for statistical software in Python. +Community-driven and community-owned initiative dedicated to building a robust, sustainable ecosystem for scientific software in Python. :::: From 048042b6212995577d60ac5b2fd13615b285062e Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Sat, 18 Jul 2026 16:39:00 -0500 Subject: [PATCH 02/12] add a plugin to render footerlinks from a JSON file --- copier.yml | 5 ++ template/assets/json/footer_links.json | 9 +++ template/config/scientific-python.yml | 1 + template/footer-links.mjs | 94 ++++++++++++++++++++++++++ template/footer.md.jinja | 23 ++++--- 5 files changed, 121 insertions(+), 11 deletions(-) create mode 100644 template/assets/json/footer_links.json create mode 100644 template/footer-links.mjs diff --git a/copier.yml b/copier.yml index b8a2041..c5b8cc0 100644 --- a/copier.yml +++ b/copier.yml @@ -8,6 +8,11 @@ project_url: type: str help: what is your project url? +footer_links: + type: str + help: path to JSON file defining links in the footer as a text-to-url mapping. + default: assets/json/footer_links.json + favicon: type: str help: what is your project favicon? diff --git a/template/assets/json/footer_links.json b/template/assets/json/footer_links.json new file mode 100644 index 0000000..c725329 --- /dev/null +++ b/template/assets/json/footer_links.json @@ -0,0 +1,9 @@ +{ + "About": "/about", + "Roadmap": "/roadmap", + "Code of conduct": "/code_of_conduct", + "SPECs": "/specs", + "Summits": "/summits", + "Calendars": "/calendars", + "Press kit": "/press-kit" +} \ No newline at end of file diff --git a/template/config/scientific-python.yml b/template/config/scientific-python.yml index 2e1bdd6..7d404f6 100644 --- a/template/config/scientific-python.yml +++ b/template/config/scientific-python.yml @@ -2,6 +2,7 @@ version: 1 project: plugins: - team-grid.mjs + - footer-links.mjs site: template: book-theme diff --git a/template/footer-links.mjs b/template/footer-links.mjs new file mode 100644 index 0000000..70e6a79 --- /dev/null +++ b/template/footer-links.mjs @@ -0,0 +1,94 @@ +import { readFileSync } from 'node:fs'; + +/** @type {import('myst-common').DirectiveSpec} */ +const footerLinksDirective = { + name: 'footer-links', + doc: 'Display footer links from a JSON file.', + options: { + file: { + type: String, + required: true, + doc: 'Path to the JSON file, relative to the project root.', + }, + }, + run(data) { + const footerLinks = JSON.parse(readFileSync(data.options.file, 'utf-8')); + const footerArray = new Array(...Object.entries(footerLinks)); + const linksGrid = footerArray.map(([text, url]) => ({ + type: 'mystDirective', + name: 'grid-item', + children: [ + { + type: 'link', + url: url, + children: [ + { + type: 'text', + value: text + } + ] + } + ] + } + )); + const links = footerArray.map(([text, url]) => ({ + type: 'listItem', + spread: true, + children: [ + { + type: 'paragraph', + children: [ + { + type: 'link', + url: url, + children: [ + { + type: 'text', + value: text + } + ] + } + ] + } + ] + })); + return linksGrid; + }, +}; + + +/** @type {import('myst-common').MystPlugin} */ +const plugin = { + name: 'Footer Links', + directives: [footerLinksDirective], +}; + +export default plugin; + +/* +- type: mystDirective + name: grid + args: 1 1 3 3 + value: |- + :::{grid-item} + foo + ::: + + :::{grid-item} + bar + ::: + children: + - type: grid + columns: + - 1 + - 1 + - 3 + - 3 + children: + - type: mystDirective + name: grid-item + value: foo + - type: mystDirective + name: grid-item + value: bar +*/ diff --git a/template/footer.md.jinja b/template/footer.md.jinja index 02d27f7..13ce0ba 100644 --- a/template/footer.md.jinja +++ b/template/footer.md.jinja @@ -7,39 +7,40 @@ % Here we use `grid` to add a basic grid structure to the HTML, % but the formatting column sizes are defined manually in css/footer.css % see the `grid-template-columns` line. -:::::{grid} 3 3 5 5 +::::::{grid} 3 3 5 5 :class: outer-grid col-screen -::::{div} +:::::{grid-item} ```{image} assets/images/logo.svg :width: 60px :align: left ``` - -Community-driven and community-owned initiative dedicated to building a robust, sustainable ecosystem for scientific software in Python. -:::: +::::: -::::{div} -:::: +:::::{grid-item} +Community-driven and community-owned initiative dedicated to building a robust, sustainable ecosystem for scientific software in Python. +::::: +:::::{grid-item} % This a _second_ grid embedded within the first one, to create nicer % responsive design experience. This grid will have a single column on narrow screens, % and fan out into three columns on wide screens. However, it always remains within % its parent grid column. ::::{grid} 1 1 3 3 -:::{div} - -- [About](/about) - ::: +:::{footer-links} +:file: {{ footer_links }} +::: :::: ::::: + +:::::: From 39603d947e0f89831346ea438ebb7988d04937c7 Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Sat, 18 Jul 2026 16:41:01 -0500 Subject: [PATCH 03/12] cruft --- template/footer-links.mjs | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/template/footer-links.mjs b/template/footer-links.mjs index 70e6a79..a91f621 100644 --- a/template/footer-links.mjs +++ b/template/footer-links.mjs @@ -64,31 +64,3 @@ const plugin = { }; export default plugin; - -/* -- type: mystDirective - name: grid - args: 1 1 3 3 - value: |- - :::{grid-item} - foo - ::: - - :::{grid-item} - bar - ::: - children: - - type: grid - columns: - - 1 - - 1 - - 3 - - 3 - children: - - type: mystDirective - name: grid-item - value: foo - - type: mystDirective - name: grid-item - value: bar -*/ From d4a8778d5bdb210c660f69e6e2e12a0d65ec939a Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Sun, 19 Jul 2026 11:04:22 -0500 Subject: [PATCH 04/12] nicer --- template/assets/css/scientific-python.css | 5 +++++ template/footer.md.jinja | 27 ++++++++++++++--------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/template/assets/css/scientific-python.css b/template/assets/css/scientific-python.css index f29cdea..514426b 100644 --- a/template/assets/css/scientific-python.css +++ b/template/assets/css/scientific-python.css @@ -46,6 +46,11 @@ main { } } +.footer-links > a { + color: white; + text-decoration-color: white; +} + @media (max-width: 640px) { & .outer-grid { grid-template-columns: 1fr; diff --git a/template/footer.md.jinja b/template/footer.md.jinja index 13ce0ba..7d63209 100644 --- a/template/footer.md.jinja +++ b/template/footer.md.jinja @@ -7,40 +7,45 @@ % Here we use `grid` to add a basic grid structure to the HTML, % but the formatting column sizes are defined manually in css/footer.css % see the `grid-template-columns` line. -::::::{grid} 3 3 5 5 +::::::{grid} 1 1 3 3 :class: outer-grid col-screen - - :::::{grid-item} - + +::::{grid} 2 2 3 3 + +:::{grid-item} ```{image} assets/images/logo.svg :width: 60px -:align: left ``` -::::: - - +::: + +:::{grid-item} +:columns: 2 -:::::{grid-item} Community-driven and community-owned initiative dedicated to building a robust, sustainable ecosystem for scientific software in Python. +::: +:::: ::::: - :::::{grid-item} -% This a _second_ grid embedded within the first one, to create nicer +% This a grid embedded within the outer one, to create nicer % responsive design experience. This grid will have a single column on narrow screens, % and fan out into three columns on wide screens. However, it always remains within % its parent grid column. ::::{grid} 1 1 3 3 +:class: footer-links :::{footer-links} :file: {{ footer_links }} ::: :::: +::::: + +:::::{grid-item} ::::: :::::: From 481ecd80d3f37744e101da4b2706202f32a5a827 Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Thu, 23 Jul 2026 09:53:50 -0500 Subject: [PATCH 05/12] rename --- template/{footer-links.mjs => footer-items.mjs} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename template/{footer-links.mjs => footer-items.mjs} (100%) diff --git a/template/footer-links.mjs b/template/footer-items.mjs similarity index 100% rename from template/footer-links.mjs rename to template/footer-items.mjs From 4fcab3d7c866e09163d788c8dda566daea6f7aef Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Thu, 23 Jul 2026 09:54:27 -0500 Subject: [PATCH 06/12] cruft --- template/footer-items.mjs | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/template/footer-items.mjs b/template/footer-items.mjs index a91f621..436f752 100644 --- a/template/footer-items.mjs +++ b/template/footer-items.mjs @@ -31,27 +31,6 @@ const footerLinksDirective = { ] } )); - const links = footerArray.map(([text, url]) => ({ - type: 'listItem', - spread: true, - children: [ - { - type: 'paragraph', - children: [ - { - type: 'link', - url: url, - children: [ - { - type: 'text', - value: text - } - ] - } - ] - } - ] - })); return linksGrid; }, }; @@ -59,7 +38,7 @@ const footerLinksDirective = { /** @type {import('myst-common').MystPlugin} */ const plugin = { - name: 'Footer Links', + name: 'Footer Items', directives: [footerLinksDirective], }; From f9b9431675d2537b0773df977c360a232615eb22 Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Thu, 23 Jul 2026 11:38:59 -0500 Subject: [PATCH 07/12] icons --- copier.yml | 4 +- template/assets/css/scientific-python.css | 33 ++++++++++--- template/assets/icons/README.md | 8 ++++ template/assets/icons/bluesky.svg | 1 + template/assets/icons/discord.svg | 1 + template/assets/icons/discourse.svg | 1 + template/assets/icons/facebook.svg | 1 + template/assets/icons/github.svg | 1 + template/assets/icons/instagram.svg | 1 + template/assets/icons/linkedin.svg | 1 + template/assets/icons/mail.svg | 1 + template/assets/icons/mastodon.svg | 1 + template/assets/icons/rss-feed.svg | 1 + template/assets/icons/scientific-python.svg | 1 + template/assets/icons/sent.svg | 1 + template/assets/icons/tiktok.svg | 1 + template/assets/icons/twitter.svg | 1 + template/assets/icons/youtube.svg | 1 + template/assets/json/footer_items.json | 19 ++++++++ template/assets/json/footer_links.json | 9 ---- template/config/scientific-python.yml | 5 +- template/footer-items.mjs | 52 ++++++++++++++++++++- template/footer.md.jinja | 41 +++++++++------- 23 files changed, 146 insertions(+), 40 deletions(-) create mode 100644 template/assets/icons/README.md create mode 100644 template/assets/icons/bluesky.svg create mode 100644 template/assets/icons/discord.svg create mode 100644 template/assets/icons/discourse.svg create mode 100644 template/assets/icons/facebook.svg create mode 100644 template/assets/icons/github.svg create mode 100644 template/assets/icons/instagram.svg create mode 100644 template/assets/icons/linkedin.svg create mode 100644 template/assets/icons/mail.svg create mode 100644 template/assets/icons/mastodon.svg create mode 100644 template/assets/icons/rss-feed.svg create mode 100644 template/assets/icons/scientific-python.svg create mode 100644 template/assets/icons/sent.svg create mode 100644 template/assets/icons/tiktok.svg create mode 100644 template/assets/icons/twitter.svg create mode 100644 template/assets/icons/youtube.svg create mode 100644 template/assets/json/footer_items.json delete mode 100644 template/assets/json/footer_links.json diff --git a/copier.yml b/copier.yml index c5b8cc0..4872dab 100644 --- a/copier.yml +++ b/copier.yml @@ -8,10 +8,10 @@ project_url: type: str help: what is your project url? -footer_links: +footer_items_json: type: str help: path to JSON file defining links in the footer as a text-to-url mapping. - default: assets/json/footer_links.json + default: assets/json/footer_items.json favicon: type: str diff --git a/template/assets/css/scientific-python.css b/template/assets/css/scientific-python.css index 514426b..a6bd9f3 100644 --- a/template/assets/css/scientific-python.css +++ b/template/assets/css/scientific-python.css @@ -36,20 +36,17 @@ main { /* Outer content grid */ & .outer-grid { - /* spacer, project description, spacer, link columns, spacer */ - grid-template-columns: 3fr 3fr 4fr; + /* logo, project description, link columns, social icons */ + grid-template-columns: 1fr 3fr 4fr 3fr; + column-gap: 4rem; align-items: center; - margin-bottom: 0rem; + margin: 0rem 4rem; & li { list-style: none; } } -.footer-links > a { - color: white; - text-decoration-color: white; -} @media (max-width: 640px) { & .outer-grid { @@ -73,6 +70,28 @@ main { font-size: 1.25rem; font-weight: bold; } + & .footer-links { + column-gap: 1.5rem !important; + line-height: normal !important; + + & a { + color: white; + text-decoration-color: white; + inline-size: min-content; + display: inline-block; + text-wrap: nowrap; + } + } + + & .footer-icons { + column-gap: 3rem !important; + row-gap: 1rem !important; + + & img { + filter: invert(100%); + width: 1.75rem; + min-width: 1.75rem; + } } /* Hide download button */ diff --git a/template/assets/icons/README.md b/template/assets/icons/README.md new file mode 100644 index 0000000..eff88d2 --- /dev/null +++ b/template/assets/icons/README.md @@ -0,0 +1,8 @@ +You can find more free icons at: + +- https://fonts.google.com/icons (Search and then click the SVG download button at the bottom of the right-hand column.) +- https://simpleicons.org/ + +Apache licensed, but with a notice at https://github.com/google/material-design-icons: + +> We'd love attribution in your app's about screen, but it's not required. diff --git a/template/assets/icons/bluesky.svg b/template/assets/icons/bluesky.svg new file mode 100644 index 0000000..e332981 --- /dev/null +++ b/template/assets/icons/bluesky.svg @@ -0,0 +1 @@ +Bluesky diff --git a/template/assets/icons/discord.svg b/template/assets/icons/discord.svg new file mode 100644 index 0000000..822322f --- /dev/null +++ b/template/assets/icons/discord.svg @@ -0,0 +1 @@ + diff --git a/template/assets/icons/discourse.svg b/template/assets/icons/discourse.svg new file mode 100644 index 0000000..28eb5f7 --- /dev/null +++ b/template/assets/icons/discourse.svg @@ -0,0 +1 @@ + diff --git a/template/assets/icons/facebook.svg b/template/assets/icons/facebook.svg new file mode 100644 index 0000000..2f755c3 --- /dev/null +++ b/template/assets/icons/facebook.svg @@ -0,0 +1 @@ + diff --git a/template/assets/icons/github.svg b/template/assets/icons/github.svg new file mode 100644 index 0000000..7840857 --- /dev/null +++ b/template/assets/icons/github.svg @@ -0,0 +1 @@ + diff --git a/template/assets/icons/instagram.svg b/template/assets/icons/instagram.svg new file mode 100644 index 0000000..a117827 --- /dev/null +++ b/template/assets/icons/instagram.svg @@ -0,0 +1 @@ + diff --git a/template/assets/icons/linkedin.svg b/template/assets/icons/linkedin.svg new file mode 100644 index 0000000..8414bf3 --- /dev/null +++ b/template/assets/icons/linkedin.svg @@ -0,0 +1 @@ + diff --git a/template/assets/icons/mail.svg b/template/assets/icons/mail.svg new file mode 100644 index 0000000..c307bed --- /dev/null +++ b/template/assets/icons/mail.svg @@ -0,0 +1 @@ + diff --git a/template/assets/icons/mastodon.svg b/template/assets/icons/mastodon.svg new file mode 100644 index 0000000..d059845 --- /dev/null +++ b/template/assets/icons/mastodon.svg @@ -0,0 +1 @@ +Mastodon diff --git a/template/assets/icons/rss-feed.svg b/template/assets/icons/rss-feed.svg new file mode 100644 index 0000000..44b27a8 --- /dev/null +++ b/template/assets/icons/rss-feed.svg @@ -0,0 +1 @@ + diff --git a/template/assets/icons/scientific-python.svg b/template/assets/icons/scientific-python.svg new file mode 100644 index 0000000..d9e0ad0 --- /dev/null +++ b/template/assets/icons/scientific-python.svg @@ -0,0 +1 @@ + diff --git a/template/assets/icons/sent.svg b/template/assets/icons/sent.svg new file mode 100644 index 0000000..40c9490 --- /dev/null +++ b/template/assets/icons/sent.svg @@ -0,0 +1 @@ + diff --git a/template/assets/icons/tiktok.svg b/template/assets/icons/tiktok.svg new file mode 100644 index 0000000..8248f39 --- /dev/null +++ b/template/assets/icons/tiktok.svg @@ -0,0 +1 @@ + diff --git a/template/assets/icons/twitter.svg b/template/assets/icons/twitter.svg new file mode 100644 index 0000000..5e23e61 --- /dev/null +++ b/template/assets/icons/twitter.svg @@ -0,0 +1 @@ + diff --git a/template/assets/icons/youtube.svg b/template/assets/icons/youtube.svg new file mode 100644 index 0000000..eb6089f --- /dev/null +++ b/template/assets/icons/youtube.svg @@ -0,0 +1 @@ + diff --git a/template/assets/json/footer_items.json b/template/assets/json/footer_items.json new file mode 100644 index 0000000..bf3b7b3 --- /dev/null +++ b/template/assets/json/footer_items.json @@ -0,0 +1,19 @@ +{ + "links": { + "About": "/about", + "Roadmap": "/roadmap", + "Code of conduct": "/code_of_conduct", + "SPECs": "/specs", + "Summits": "/summits", + "Calendars": "/calendars", + "Press kit": "/press-kit" + }, + "icons": { + "github": "https://github.com/scientific-python/", + "youtube": "https://www.youtube.com/c/ScientificPython-org", + "mastodon": "https://fosstodon.org/@scientific_python", + "bluesky": "https://bsky.app/profile/scientific-python.org", + "discourse": "https://discuss.scientific-python.org/", + "discord": "https://discord.com/invite/vur45CbwMz" + } +} \ No newline at end of file diff --git a/template/assets/json/footer_links.json b/template/assets/json/footer_links.json deleted file mode 100644 index c725329..0000000 --- a/template/assets/json/footer_links.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "About": "/about", - "Roadmap": "/roadmap", - "Code of conduct": "/code_of_conduct", - "SPECs": "/specs", - "Summits": "/summits", - "Calendars": "/calendars", - "Press kit": "/press-kit" -} \ No newline at end of file diff --git a/template/config/scientific-python.yml b/template/config/scientific-python.yml index 7d404f6..41de169 100644 --- a/template/config/scientific-python.yml +++ b/template/config/scientific-python.yml @@ -2,8 +2,9 @@ version: 1 project: plugins: - team-grid.mjs - - footer-links.mjs - + - footer-items.mjs + static_files: + - assets/icons site: template: book-theme parts: diff --git a/template/footer-items.mjs b/template/footer-items.mjs index 436f752..6869df4 100644 --- a/template/footer-items.mjs +++ b/template/footer-items.mjs @@ -13,7 +13,7 @@ const footerLinksDirective = { }, run(data) { const footerLinks = JSON.parse(readFileSync(data.options.file, 'utf-8')); - const footerArray = new Array(...Object.entries(footerLinks)); + const footerArray = new Array(...Object.entries(footerLinks["links"])); const linksGrid = footerArray.map(([text, url]) => ({ type: 'mystDirective', name: 'grid-item', @@ -35,11 +35,59 @@ const footerLinksDirective = { }, }; +/** @type {import('myst-common').DirectiveSpec} */ +const footerIconsDirective = { + name: 'footer-icons', + doc: 'Display footer icons from a JSON file.', + options: { + file: { + type: String, + required: true, + doc: 'Path to the JSON file, relative to the project root.', + }, + }, + run(data) { + const footerIcons = JSON.parse(readFileSync(data.options.file, 'utf-8')); + const footerArray = new Array(...Object.entries(footerIcons["icons"])); + const IconsGrid = footerArray.map(([text, url]) => ({ + type: 'mystDirective', + name: 'grid-item', + children: [ + { + type: 'link', + url: url, + children: [ + { + type: 'image', + url: `/assets/icons/${text}.svg`, + alt: text + } + ] + } + ] + } + )); + return IconsGrid; + }, +}; + + +/** + + - type: link + url: https://github.com + children: + - type: image + url: https://picsum.photos/id/640/400/200 + alt: foo + +*/ + /** @type {import('myst-common').MystPlugin} */ const plugin = { name: 'Footer Items', - directives: [footerLinksDirective], + directives: [footerLinksDirective, footerIconsDirective], }; export default plugin; diff --git a/template/footer.md.jinja b/template/footer.md.jinja index 7d63209..490e82d 100644 --- a/template/footer.md.jinja +++ b/template/footer.md.jinja @@ -4,31 +4,25 @@ % parts: % footer: footer.md -% Here we use `grid` to add a basic grid structure to the HTML, -% but the formatting column sizes are defined manually in css/footer.css -% see the `grid-template-columns` line. -::::::{grid} 1 1 3 3 +% Here we use `grid` to add a basic grid structure to the footer, but we don't use +% :columns: property of the grid-items to set widths; instead they're defined in +% asserts/css/scientific-python.css using the `grid-template-columns` property. +::::::{grid} 1 1 4 4 :class: outer-grid col-screen -:::::{grid-item} - -::::{grid} 2 2 3 3 -:::{grid-item} -```{image} assets/images/logo.svg +:::::{grid-item} +:::{image} assets/images/logo.svg :width: 60px -``` ::: - -:::{grid-item} -:columns: 2 +::::: + +:::::{grid-item} Community-driven and community-owned initiative dedicated to building a robust, sustainable ecosystem for scientific software in Python. -::: -:::: ::::: - + :::::{grid-item} % This a grid embedded within the outer one, to create nicer % responsive design experience. This grid will have a single column on narrow screens, @@ -38,14 +32,25 @@ Community-driven and community-owned initiative dedicated to building a robust, :class: footer-links :::{footer-links} -:file: {{ footer_links }} +:file: {{ footer_items_json }} ::: :::: ::::: - + :::::{grid-item} +:class: socials + +::::{grid} 2 3 6 6 +:class: footer-icons + +:::{footer-icons} +:file: {{ footer_items_json }} +::: + +:::: +© 2026 Scientific Python team. All rights reserved. ::::: :::::: From ec21a507ae4a2622e9248e9ebc86ca19d3f638bf Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Thu, 23 Jul 2026 12:21:57 -0500 Subject: [PATCH 08/12] cruft & tweaks --- template/assets/css/scientific-python.css | 19 +++++++++++++------ template/assets/json/footer_items.json | 2 +- template/footer-items.mjs | 13 ------------- template/footer.md.jinja | 13 +++++++++---- 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/template/assets/css/scientific-python.css b/template/assets/css/scientific-python.css index a6bd9f3..82c7a9d 100644 --- a/template/assets/css/scientific-python.css +++ b/template/assets/css/scientific-python.css @@ -31,13 +31,10 @@ main { padding-left: 2rem; padding-right: 2rem; - padding-left: 3.5rem; - padding-right: 3.5rem; - /* Outer content grid */ & .outer-grid { /* logo, project description, link columns, social icons */ - grid-template-columns: 1fr 3fr 4fr 3fr; + grid-template-columns: 1fr 3fr 3fr 2fr; column-gap: 4rem; align-items: center; margin: 0rem 4rem; @@ -47,7 +44,6 @@ main { } } - @media (max-width: 640px) { & .outer-grid { grid-template-columns: 1fr; @@ -89,9 +85,16 @@ main { & img { filter: invert(100%); - width: 1.75rem; + margin-bottom: 0.1rem; + margin-top: 0.1rem; min-width: 1.75rem; + width: 1.75rem; } + } +} + +.footer-logo { + min-width: 60px; } /* Hide download button */ @@ -126,3 +129,7 @@ h4 { .bd-sidebar-primary { border-right: 0; } + +.copyright { + font-size: smaller; +} \ No newline at end of file diff --git a/template/assets/json/footer_items.json b/template/assets/json/footer_items.json index bf3b7b3..4ab433c 100644 --- a/template/assets/json/footer_items.json +++ b/template/assets/json/footer_items.json @@ -16,4 +16,4 @@ "discourse": "https://discuss.scientific-python.org/", "discord": "https://discord.com/invite/vur45CbwMz" } -} \ No newline at end of file +} diff --git a/template/footer-items.mjs b/template/footer-items.mjs index 6869df4..9af061b 100644 --- a/template/footer-items.mjs +++ b/template/footer-items.mjs @@ -71,19 +71,6 @@ const footerIconsDirective = { }, }; - -/** - - - type: link - url: https://github.com - children: - - type: image - url: https://picsum.photos/id/640/400/200 - alt: foo - -*/ - - /** @type {import('myst-common').MystPlugin} */ const plugin = { name: 'Footer Items', diff --git a/template/footer.md.jinja b/template/footer.md.jinja index 490e82d..078c6e6 100644 --- a/template/footer.md.jinja +++ b/template/footer.md.jinja @@ -7,6 +7,7 @@ % Here we use `grid` to add a basic grid structure to the footer, but we don't use % :columns: property of the grid-items to set widths; instead they're defined in % asserts/css/scientific-python.css using the `grid-template-columns` property. + ::::::{grid} 1 1 4 4 :class: outer-grid col-screen @@ -14,6 +15,7 @@ :::::{grid-item} :::{image} assets/images/logo.svg :width: 60px +:class: footer-logo ::: ::::: @@ -28,7 +30,7 @@ Community-driven and community-owned initiative dedicated to building a robust, % responsive design experience. This grid will have a single column on narrow screens, % and fan out into three columns on wide screens. However, it always remains within % its parent grid column. -::::{grid} 1 1 3 3 +::::{grid} 1 1 2 3 :class: footer-links :::{footer-links} @@ -42,7 +44,7 @@ Community-driven and community-owned initiative dedicated to building a robust, :::::{grid-item} :class: socials -::::{grid} 2 3 6 6 +::::{grid} 2 2 3 6 :class: footer-icons :::{footer-icons} @@ -50,7 +52,10 @@ Community-driven and community-owned initiative dedicated to building a robust, ::: :::: -© 2026 Scientific Python team. All rights reserved. -::::: +:::{div .copyright} +© 2026 {{ project_name }} team. All rights reserved. +::: + +::::: :::::: From 405855175207ab8f13ce60efbeb46fadbe806e09 Mon Sep 17 00:00:00 2001 From: Lundy Bernard Date: Fri, 24 Jul 2026 11:43:36 -0500 Subject: [PATCH 09/12] simplify JS --- template/footer-items.mjs | 77 +++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 40 deletions(-) diff --git a/template/footer-items.mjs b/template/footer-items.mjs index 9af061b..fe8c959 100644 --- a/template/footer-items.mjs +++ b/template/footer-items.mjs @@ -13,26 +13,24 @@ const footerLinksDirective = { }, run(data) { const footerLinks = JSON.parse(readFileSync(data.options.file, 'utf-8')); - const footerArray = new Array(...Object.entries(footerLinks["links"])); - const linksGrid = footerArray.map(([text, url]) => ({ - type: 'mystDirective', - name: 'grid-item', - children: [ - { - type: 'link', - url: url, - children: [ - { - type: 'text', - value: text - } - ] - } - ] - } - )); - return linksGrid; - }, + return Object.entries(footerLinks["links"]).map( + ([text, url]) => ({ + type: 'grid-item', + children: [ + { + type: 'link', + url: url, + children: [ + { + type: 'text', + value: text + } + ] + } + ] + }) + ); + } }; /** @type {import('myst-common').DirectiveSpec} */ @@ -48,27 +46,26 @@ const footerIconsDirective = { }, run(data) { const footerIcons = JSON.parse(readFileSync(data.options.file, 'utf-8')); - const footerArray = new Array(...Object.entries(footerIcons["icons"])); - const IconsGrid = footerArray.map(([text, url]) => ({ - type: 'mystDirective', - name: 'grid-item', - children: [ - { - type: 'link', - url: url, - children: [ - { - type: 'image', - url: `/assets/icons/${text}.svg`, - alt: text - } - ] - } - ] - } - )); + return Object.entries(footerIcons["icons"]).map( + ([text, url]) => ({ + type: 'grid-item', + children: [ + { + type: 'link', + url: url, + children: [ + { + type: 'image', + url: `/assets/icons/${text}.svg`, + alt: text + } + ] + } + ] + }) + ); return IconsGrid; - }, + } }; /** @type {import('myst-common').MystPlugin} */ From d7cd8ff4a5ffc06010eedfe9ef951a5146f29664 Mon Sep 17 00:00:00 2001 From: Lundy Bernard Date: Fri, 24 Jul 2026 11:46:15 -0500 Subject: [PATCH 10/12] simplify CSS --- template/assets/css/scientific-python.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/template/assets/css/scientific-python.css b/template/assets/css/scientific-python.css index 82c7a9d..f1d0564 100644 --- a/template/assets/css/scientific-python.css +++ b/template/assets/css/scientific-python.css @@ -67,8 +67,8 @@ main { font-weight: bold; } & .footer-links { - column-gap: 1.5rem !important; - line-height: normal !important; + column-gap: 1.5rem; + line-height: normal; & a { color: white; @@ -80,8 +80,8 @@ main { } & .footer-icons { - column-gap: 3rem !important; - row-gap: 1rem !important; + column-gap: 3rem; + row-gap: 1rem; & img { filter: invert(100%); @@ -132,4 +132,4 @@ h4 { .copyright { font-size: smaller; -} \ No newline at end of file +} From d26c500120f4e7a3e56cb14067ff046b61deb8e3 Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Fri, 24 Jul 2026 11:47:37 -0500 Subject: [PATCH 11/12] tweak spacing --- template/assets/css/scientific-python.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/assets/css/scientific-python.css b/template/assets/css/scientific-python.css index f1d0564..71f3166 100644 --- a/template/assets/css/scientific-python.css +++ b/template/assets/css/scientific-python.css @@ -34,7 +34,7 @@ main { /* Outer content grid */ & .outer-grid { /* logo, project description, link columns, social icons */ - grid-template-columns: 1fr 3fr 3fr 2fr; + grid-template-columns: 2fr 6fr 8fr 3fr; column-gap: 4rem; align-items: center; margin: 0rem 4rem; From 0996150a37c645ed8558a673ac2a6aebeb8976fa Mon Sep 17 00:00:00 2001 From: Lundy Bernard Date: Thu, 23 Jul 2026 18:36:01 +0000 Subject: [PATCH 12/12] fix: stop ingesting icon assets as site content static_files is unnecessary: the icons are referenced from image AST nodes, so the build hashes and copies them into /build automatically (the static copy also landed at /icons/, not /assets/icons/, and nothing referenced it). Exclude assets/icons/README.md, which was rendered as a site page at /assets/icons/readme. Assisted-by: claude-code:claude-fable-5 --- template/config/scientific-python.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/config/scientific-python.yml b/template/config/scientific-python.yml index 41de169..f0379e0 100644 --- a/template/config/scientific-python.yml +++ b/template/config/scientific-python.yml @@ -3,8 +3,8 @@ project: plugins: - team-grid.mjs - footer-items.mjs - static_files: - - assets/icons + exclude: + - assets/icons/README.md site: template: book-theme parts: