-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add banner feature to qiskit theme (#530)
In this PR: - [x] add optional purple gradient banner to all pages - [x] add optional "Learn more" link to banner - [x] update readme - [x] works for mobile view - [ ] snapshot tests for banner component I'm struggling to figure out how to add new snapshots for this component, any help appreciated! <img width="1330" alt="Screenshot 2023-08-07 at 5 13 10 PM" src="https://github.com/Qiskit/qiskit_sphinx_theme/assets/23662430/02fe6fd7-59b1-448d-bd4e-5939e67b5ab7"> <img width="1327" alt="Screenshot 2023-08-07 at 5 12 02 PM" src="https://github.com/Qiskit/qiskit_sphinx_theme/assets/23662430/68c2aecc-1303-4a89-b90b-b4ba7539c76a"> <img width="211" alt="Screenshot 2023-08-07 at 5 19 30 PM" src="https://github.com/Qiskit/qiskit_sphinx_theme/assets/23662430/b3b7cd8f-9987-4ae5-9007-e6a79142d130">
- Loading branch information
Showing
26 changed files
with
118 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* This code is a Qiskit project. | ||
* | ||
* (C) Copyright IBM 2023. | ||
* | ||
* 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. | ||
*/ | ||
|
||
body { | ||
--qiskit-top-nav-bar-height: 3.5rem; | ||
} | ||
|
||
// custom announcement banner with purple gradient | ||
.custom-announcement { | ||
background: linear-gradient(90deg, rgba(245,239,255,1) 0%, rgba(255,255,255,1) 100%); | ||
border-bottom: 1px solid var(--color-background-border); | ||
padding: 14px var(--sidebar-item-spacing-horizontal); | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
// custom styling for inner text/link content for custom announcement banner | ||
.custom-announcement-content { | ||
text-align: left; | ||
font-weight: bold; | ||
color: black; | ||
|
||
a { | ||
color: var(--qiskit-color-purple); | ||
font-weight: normal; | ||
padding-left: 0.5rem; | ||
|
||
&:hover { | ||
color: var(--qiskit-color-purple); | ||
} | ||
|
||
.icon { | ||
position: relative; | ||
top: 0.15rem; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-32 Bytes
(100%)
tests/js/ecosystem.test.js-snapshots/colors-can-be-changed-footer-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-60 Bytes
(100%)
tests/js/ecosystem.test.js-snapshots/left-side-bar-renders-correctly-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9 Bytes
(100%)
...test.js-snapshots/Furo-menu-bars-use-custom-icon-and-text-on-mobile-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1 Byte
(100%)
...test.js-snapshots/Furo-menu-bars-use-custom-page-ToC-icon-on-tablet-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-14 Bytes
(100%)
.../js/qiskit.test.js-snapshots/Sphinx-Design-elements-have-no-shadows-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-24 Bytes
(100%)
tests/js/qiskit.test.js-snapshots/admonitions-use-Carbon-style-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2 Bytes
(100%)
tests/js/qiskit.test.js-snapshots/api-docs-class-page-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+8 Bytes
(100%)
tests/js/qiskit.test.js-snapshots/api-docs-function-page-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+178 Bytes
(100%)
tests/js/qiskit.test.js-snapshots/api-docs-module-page-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+7 Bytes
(100%)
tests/js/qiskit.test.js-snapshots/custom-directives-2-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+45 Bytes
(100%)
tests/js/qiskit.test.js-snapshots/custom-directives-3-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-116 Bytes
(100%)
tests/js/qiskit.test.js-snapshots/custom-directives-4-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+11 Bytes
(100%)
tests/js/qiskit.test.js-snapshots/footer-includes-page-analytics-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-4 Bytes
(100%)
...skit.test.js-snapshots/footer-says-thank-you-when-analytics-clicked-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10 Bytes
(100%)
...iskit.test.js-snapshots/inline-table-of-contents-have-correct-fonts-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3 Bytes
(100%)
...it.test.js-snapshots/left-side-bar-previous-releases-are-expandable-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-109 Bytes
(100%)
tests/js/qiskit.test.js-snapshots/left-side-bar-renders-correctly-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3 Bytes
(100%)
...t.test.js-snapshots/right-side-bar-is-not-broken-by-our-page-layout-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+52 Bytes
(100%)
tests/js/qiskit.test.js-snapshots/tables-align-with-qiskit-org-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+129 Bytes
(100%)
tests/js/qiskit.test.js-snapshots/tutorials-do-not-have-purple-border-1-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.