diff --git a/docs/conf.py b/docs/conf.py
index 473c03a57..626c372ce 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -91,18 +91,19 @@
version_match = "v" + release
html_theme_options = {
- "external_links": [
+ "dropdown_links": [
{
- "url": "https://pydata.org",
- "name": "PyData",
- },
- {
- "url": "https://numfocus.org/",
- "name": "NumFocus",
+ "url": "https://github.com/pydata/pydata-sphinx-theme/releases",
+ "name": "Changelog",
},
+ {"url": "examples/gallery", "name": "Gallery"},
{
- "url": "https://numfocus.org/donate",
- "name": "Donate to NumFocus",
+ "name": "Community links",
+ "items": [
+ {"url": "https://pydata.org", "name": "PyData"},
+ {"url": "https://numfocus.org/", "name": "NumFocus"},
+ {"url": "https://numfocus.org/donate", "name": "Donate to NumFocus"},
+ ],
},
],
"github_url": "https://github.com/pydata/pydata-sphinx-theme",
diff --git a/docs/index.md b/docs/index.md
index f39c674ad..d084d6ebe 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -63,9 +63,3 @@ Several example pages to demonstrate the functionality of this theme when used a
examples/index
```
-
-```{toctree}
-:hidden:
-
-Changelog
-```
diff --git a/src/pydata_sphinx_theme/assets/styles/sections/_header.scss b/src/pydata_sphinx_theme/assets/styles/sections/_header.scss
index 6f5ddddd7..ac049555e 100644
--- a/src/pydata_sphinx_theme/assets/styles/sections/_header.scss
+++ b/src/pydata_sphinx_theme/assets/styles/sections/_header.scss
@@ -90,10 +90,17 @@
// Dropdowns for the extra links
.dropdown {
- button {
+ // The button that people click on
+ > button {
display: unset;
color: var(--pst-color-text-muted);
border: none;
+
+ &:hover,
+ &:active,
+ &:focus {
+ color: var(--pst-color-primary);
+ }
}
.dropdown-menu {
diff --git a/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/dropdown-links.html b/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/dropdown-links.html
new file mode 100644
index 000000000..546107610
--- /dev/null
+++ b/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/dropdown-links.html
@@ -0,0 +1,44 @@
+{# One or more extra links and dropdown links with Bootstrap -#}
+
+{# A macro so we can save some boilerplate #}
+{%- macro dropdown_link(name, url, tooltip_placement="left") -%}
+
+{#- Parse the URL to determine if it is an internal document link or a URI #}
+{% if not url.startswith("http") %}
+{% set url=pathto(url) %}
+{% set extra_classes="" %}
+{% else %}
+{% set extra_classes=" nav-external" %}
+{% endif -%}
+
+
+ {{ name }}
+
+{%- endmacro %}
+
+{% if theme_dropdown_links %}
+{% for dropdown in theme_dropdown_links %}
+
+ {#- If "items" is in the list item then it is a dropdown with a collection of links #}
+ {% if "items" in dropdown %}
+
+
+
+ {% for link in dropdown["items"] %}
+
+ {{ dropdown_link(link["name"], link["url"])}}
+
+ {% endfor %}
+
+
+
+ {% else %}
+ {# Otherwise assume it is just an extra link, not a dropdown -#}
+