From d8a2183decf0edd697e91c921f18ba3aca9883e3 Mon Sep 17 00:00:00 2001
From: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
Date: Thu, 15 Aug 2024 16:54:09 -0400
Subject: [PATCH] Sync to newest Furo to support Sphinx 8 (#619)
Closes https://github.com/Qiskit/qiskit_sphinx_theme/issues/618.
Some notable changes:
* Sphinx 8 support
* Larger icons
* Tweak to table formatting
* Hide copy-button until you hover
---
pyproject.toml | 4 ++--
.../assets/styles/_mobile-header.scss | 20 ++++++++++++++++++
.../assets/styles/qiskit-sphinx-theme.scss | 1 +
.../qiskit-sphinx-theme/partials/icons.html | 13 ------------
...-Jupyter-works-with-copybutton-1-linux.png | Bin 52680 -> 51430 bytes
...esign-elements-have-no-shadows-1-linux.png | Bin 64610 -> 64646 bytes
...e-admonitions-use-Carbon-style-1-linux.png | Bin 56643 -> 56713 bytes
.../dark-mode-api-docs-class-page-1-linux.png | Bin 141540 -> 141116 bytes
...dark-mode-api-docs-module-page-1-linux.png | Bin 63752 -> 63761 bytes
.../dark-mode-custom-directives-1-linux.png | Bin 81035 -> 81035 bytes
.../dark-mode-custom-directives-3-linux.png | Bin 47528 -> 47527 bytes
.../dark-mode-custom-directives-4-linux.png | Bin 39304 -> 39272 bytes
...deprecations-look-like-warning-1-linux.png | Bin 13278 -> 13243 bytes
...eft-side-bar-renders-correctly-1-linux.png | Bin 38951 -> 38960 bytes
...-mode-tables-align-with-qiskit-1-linux.png | Bin 92004 -> 91849 bytes
...ar-uses-custom-icons-on-mobile-1-linux.png | Bin 3280 -> 3347 bytes
...custom-page-ToC-icon-on-tablet-1-linux.png | Bin 1773 -> 1816 bytes
...ials-do-not-have-purple-border-1-linux.png | Bin 13008 -> 12920 bytes
...-Jupyter-works-with-copybutton-1-linux.png | Bin 53072 -> 52313 bytes
...esign-elements-have-no-shadows-1-linux.png | Bin 63097 -> 63110 bytes
...e-admonitions-use-Carbon-style-1-linux.png | Bin 55095 -> 55223 bytes
...light-mode-api-docs-class-page-1-linux.png | Bin 137442 -> 137200 bytes
...ight-mode-api-docs-module-page-1-linux.png | Bin 62271 -> 62285 bytes
.../light-mode-custom-directives-4-linux.png | Bin 38101 -> 38223 bytes
...deprecations-look-like-warning-1-linux.png | Bin 13080 -> 13095 bytes
...eft-side-bar-renders-correctly-1-linux.png | Bin 38615 -> 38624 bytes
...-mode-tables-align-with-qiskit-1-linux.png | Bin 89353 -> 89100 bytes
...ar-uses-custom-icons-on-mobile-1-linux.png | Bin 3472 -> 3527 bytes
...custom-page-ToC-icon-on-tablet-1-linux.png | Bin 1930 -> 1953 bytes
...le-uses-custom-icons-on-mobile-1-linux.png | Bin 3472 -> 3527 bytes
...le-uses-custom-icons-on-mobile-2-linux.png | Bin 3280 -> 3347 bytes
...le-uses-custom-icons-on-mobile-3-linux.png | Bin 3272 -> 3311 bytes
...le-uses-custom-icons-on-mobile-4-linux.png | Bin 3472 -> 3527 bytes
...custom-page-ToC-icon-on-tablet-1-linux.png | Bin 1930 -> 1953 bytes
...custom-page-ToC-icon-on-tablet-2-linux.png | Bin 1773 -> 1816 bytes
...custom-page-ToC-icon-on-tablet-3-linux.png | Bin 1771 -> 1824 bytes
...custom-page-ToC-icon-on-tablet-4-linux.png | Bin 1930 -> 1953 bytes
37 files changed, 23 insertions(+), 15 deletions(-)
create mode 100644 src/qiskit_sphinx_theme/assets/styles/_mobile-header.scss
diff --git a/pyproject.toml b/pyproject.toml
index c3729a12..c4dc3e81 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -26,9 +26,9 @@ classifiers = [
dependencies = [
"docutils",
# Keep in sync with Furo's constraint.
- "sphinx>=6.0,<8.0",
+ "sphinx>=6.0,<9.0",
# See CONTRIBUTING.md for how to upgrade Furo.
- "furo==2024.5.6",
+ "furo==2024.8.6",
]
[project.entry-points."sphinx.html_themes"]
diff --git a/src/qiskit_sphinx_theme/assets/styles/_mobile-header.scss b/src/qiskit_sphinx_theme/assets/styles/_mobile-header.scss
new file mode 100644
index 00000000..fecc31b6
--- /dev/null
+++ b/src/qiskit_sphinx_theme/assets/styles/_mobile-header.scss
@@ -0,0 +1,20 @@
+/* This code is a Qiskit project.
+ *
+ * (C) Copyright IBM 2024.
+ *
+ * This code is licensed under the Apache License, Version 2.0. You may
+ * obtain a copy of this license in the LICENSE.txt file in the root directory
+ * of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
+ *
+ * Any modifications or derivative works of this code must retain this
+ * copyright notice, and modified files need to carry a notice indicating
+ * that they have been altered from the originals.
+ */
+
+
+@media (max-width: 63em) {
+ .toc-header-icon {
+ // On mobile, Furo has no space between the page ToC and dark mode icons.
+ margin-left: 8px;
+ }
+}
diff --git a/src/qiskit_sphinx_theme/assets/styles/qiskit-sphinx-theme.scss b/src/qiskit_sphinx_theme/assets/styles/qiskit-sphinx-theme.scss
index 6b2dfd9a..74a0f147 100644
--- a/src/qiskit_sphinx_theme/assets/styles/qiskit-sphinx-theme.scss
+++ b/src/qiskit_sphinx_theme/assets/styles/qiskit-sphinx-theme.scss
@@ -18,6 +18,7 @@
@import "icons";
@import "layout";
@import "left-sidebar";
+@import "mobile-header";
@import "scaffold";
@import "sphinx-extensions";
@import "tables";
diff --git a/src/qiskit_sphinx_theme/theme/qiskit-sphinx-theme/partials/icons.html b/src/qiskit_sphinx_theme/theme/qiskit-sphinx-theme/partials/icons.html
index 0a2a6b6f..ea271d30 100644
--- a/src/qiskit_sphinx_theme/theme/qiskit-sphinx-theme/partials/icons.html
+++ b/src/qiskit_sphinx_theme/theme/qiskit-sphinx-theme/partials/icons.html
@@ -60,19 +60,6 @@
-
- Auto light/dark mode
-
-
Auto light/dark, in light mode