Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Do not merge] Proof of concept of theme variants #215

Closed
wants to merge 2 commits into from

Conversation

Eric-Arellano
Copy link
Collaborator

This sets up two theme variants: qiskit_core__legacy_pytorch and qiskit_ecosystem__legacy_pytorch. Users only need to set html_theme to the variant they want in conf.py.

For code reuse, the variants are built on top of a "base" Pytorch theme. The variants will inherit every part of this base theme, but can override things.

Images:

Screenshot 2023-03-16 at 8 42 50 AM

Screenshot 2023-03-16 at 8 43 07 AM

HTML templates (see the second line, middle):

Screenshot 2023-03-16 at 9 21 11 AM

Screenshot 2023-03-16 at 9 22 16 AM

For CSS, we have a file overrides.css:

Screenshot 2023-03-16 at 9 33 41 AM

Screenshot 2023-03-16 at 9 33 46 AM

Eric-Arellano added a commit that referenced this pull request Mar 16, 2023
## Summary

We plan to add variants of the Sphinx theme so that we can differentiate
between Core vs the Ecosystem.

They'll be distributed in the same package, and users only need to
choose the `html_theme` in their `conf.py`. They will also share a
"base" theme and override the CSS/images/HTML templates they care about.
See #215 for an
example of this.

This PR reorganizes our folder structure so that we can add variants in
followup PRs.

## Details

We call the folder `pytorch_base` because we likely will want
Pytorch-based variants for Core vs Ecosystem, and they'll use this
folder as their base. Those variants will be added in follow ups.

This also simplifies our `MANIFEST.in` and `setup.py` with
@jakelishman's recommendation from
#212 (review).
The benefit of that is we make fewer changes when adding new theme
variants (we have to add `graft qiskit_sphinx_theme/<variant>/static` to
MANIFEST.in). I verified this works by using `python -m build` and
inspecting the RECORD of the wheel, which shows the contents.
@Eric-Arellano
Copy link
Collaborator Author

Superseded by #229

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant