Skip to content

Commit

Permalink
Remove IBM blue from Ecosystem theme
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Arellano committed Dec 5, 2023
1 parent 985654c commit bb08fb7
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 39 deletions.
13 changes: 0 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,6 @@ html_theme_options = {
}
```

## IBM Projects: how to use blue color scheme for Ecosystem theme

By default, the `qiskit-ecosystem` theme uses purple as an accent color. Most projects should continue to use this, but certain highly IBM-affiliated projects like Qiskit IBM Runtime can change the accent color to blue by setting up `conf.py` like this:

```python
# Only intended for specific IBM projects.
html_theme_options = {
"light_css_variables": {
"color-brand-primary": "var(--qiskit-color-blue)",
}
}
```

## Tip: suggested site structure

To keep UX/UI similar across different Qiskit packages, we encourage the following structure for you sidebar, which can be set in the toctree of your `index.rst`:
Expand Down
11 changes: 0 additions & 11 deletions example_docs/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"sphinx.ext.autosummary",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"sphinx.ext.extlinks",
"jupyter_sphinx",
"sphinx_copybutton",
"sphinx_design",
Expand All @@ -64,16 +63,6 @@
_THEME = os.getenv("THEME", "qiskit")
html_theme = _THEME

if _THEME == "qiskit-ecosystem":
# This tests out that ecosystem projects can change the color scheme.
# Only specific IBM projects should set this! Most Ecosystem projects
# should use the default of purple.
html_theme_options = {
"light_css_variables": {
"color-brand-primary": "var(--qiskit-color-blue)",
}
}

html_context = {
# Users of the theme can set prior version numbers. They'll
# show up in the sidebar under the "Previous Versions" section.
Expand Down
6 changes: 2 additions & 4 deletions src/qiskit_sphinx_theme/assets/styles/_colors.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
body {
// Define some Carbon color schemes from
// Define the Carbon color schemes from
// https://github.com/carbon-design-system/carbon/blob/v10/packages/colors/src/colors.js
// that are consistent with Qiskit's branding.
//
// While we set default colors, IBM-focused projects will want to use blue.
// Projects can override `--color-brand-primary` to whatever they want.
--qiskit-color-purple: #6929C4; // purple70
--qiskit-color-blue: #0043ce; // blue70

// Furo normally distinguishes between these two variables, but
// we want them to be the same.
Expand Down
11 changes: 0 additions & 11 deletions tests/js/ecosystem.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,8 @@

import { expect, test } from "@playwright/test";

import { click } from "./utils";

test("left side bar renders correctly", async ({ page }) => {
await page.goto("");
const leftToC = page.locator(".sidebar-drawer");
await expect(leftToC).toHaveScreenshot();
});

test.describe("colors can be changed", () => {
test("translations", async ({ page }) => {
await page.goto("");
await click(page, "div.qiskit-translations-container i");
const translations = page.locator("div.qiskit-translations-container");
await expect(translations).toHaveScreenshot();
});
});
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bb08fb7

Please sign in to comment.