Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions doc/_static/js/custom-icons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FontAwesome.library.add(
/**
* Custom icon definitions
*
* see https://pydata-sphinx-theme.readthedocs.io/en/latest/user_guide/header-links.html#svg-image-icons
*/
{
prefix: "fa-custom",
iconName: "opencollective",
icon: [
24,
24,
[],
"e001",
// https://simpleicons.org/icons/opencollective.svg
"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12c2.54 0 4.894-.79 6.834-2.135l-3.107-3.109a7.715 7.715 0 1 1 0-13.512l3.107-3.109A11.943 11.943 0 0 0 12 0zm9.865 5.166l-3.109 3.107A7.67 7.67 0 0 1 19.715 12a7.682 7.682 0 0 1-.959 3.727l3.109 3.107A11.943 11.943 0 0 0 24 12c0-2.54-.79-4.894-2.135-6.834z",
],
},
);
12 changes: 11 additions & 1 deletion doc/_static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ html[data-theme="light"] {
--mne-color-github: #000;
--mne-color-discourse: #d0232b;
--mne-color-mastodon: #2F0C7A;
--mne-color-sponsor: #BF3989; /* from GH sponsor heart, via browser devtools */
--mne-color-opencollective: #1F87FF; /* scraped from logo SVG */
/* code block copy button */
--copybtn-opacity: 0.75;
/* card header bg color */
Expand Down Expand Up @@ -63,6 +65,8 @@ html[data-theme="dark"] {
--mne-color-github: rgb(240, 246, 252); /* from their logo SVG */
--mne-color-discourse: #FFF9AE; /* from their logo SVG */
--mne-color-mastodon: #858AFA; /* www.joinmastodon.org/en/branding */
--mne-color-sponsor: #DB61A2; /* from GH sponsor heart, via browser devtools */
--mne-color-opencollective: #99CFFF; /* scraped from logo SVG */
/* code block copy button */
--copybtn-opacity: 0.25;
/* card header bg color */
Expand Down Expand Up @@ -253,7 +257,7 @@ aside.footnote:last-child {
}

/* ******************************************************* navbar icon links */
.navbar-icon-links svg.fa-square-github {
.navbar-icon-links svg.fa-github {
color: var(--mne-color-github);
}
.navbar-icon-links svg.fa-discourse {
Expand All @@ -265,6 +269,12 @@ aside.footnote:last-child {
.navbar-icon-links svg.fa-mastodon {
color: var(--mne-color-mastodon);
}
.navbar-icon-links svg.fa-heart {
color: var(--mne-color-sponsor);
}
.navbar-icon-links svg.fa-opencollective {
color: var(--mne-color-opencollective);
}

/* ************************************************************ nav elements */
/* topbar nav inactive */
Expand Down
21 changes: 17 additions & 4 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ def fix_sklearn_inherited_docstrings(app, what, name, obj, options, lines):
html_theme_options = {
"icon_links": [
dict(
name="Discord",
name="Discord (office hours)",
url="https://discord.gg/rKfvxTuATa",
icon="fa-brands fa-discord fa-fw",
),
Expand All @@ -791,14 +791,24 @@ def fix_sklearn_inherited_docstrings(app, what, name, obj, options, lines):
attributes=dict(rel="me"),
),
dict(
name="Forum",
name="Q&A Forum",
url="https://mne.discourse.group/",
icon="fa-brands fa-discourse fa-fw",
),
dict(
name="GitHub",
name="Code Repository",
url="https://github.com/mne-tools/mne-python",
icon="fa-brands fa-square-github fa-fw",
icon="fa-brands fa-github fa-fw",
),
dict(
name="Sponsor us on GitHub",
url="https://github.com/sponsors/mne-tools",
icon="fa-regular fa-heart fa-fw",
),
dict(
name="Donate via OpenCollective",
url="https://opencollective.com/mne-python",
icon="fa-custom fa-opencollective fa-fw",
),
],
"icon_links_label": "External Links", # for screen reader
Expand Down Expand Up @@ -840,6 +850,9 @@ def fix_sklearn_inherited_docstrings(app, what, name, obj, options, lines):
html_css_files = [
"style.css",
]
html_js_files = [
("js/custom-icons.js", {"defer": "defer"}),
]

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
Expand Down
Loading