diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 613c089b..1d31a1f3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -141,8 +141,12 @@ We try to keep changes to a minimum because every divergence we make from base F Copy the HTML template from Furo and save it in the same file path. Then, at the top of the file, add this header: ``` -{#- This file is vendored from Furo. When adding custom Qiskit code, surround it with -`QISKIT CHANGE: start` and `QISKIT CHANGE: end` Jinja-style comments. -#} +{#- + This file is vendored from Furo (created by Pradyun Gedam) and used under the MIT license. + + When adding custom Qiskit code, surround it with `QISKIT CHANGE: start` and + `QISKIT CHANGE: end` Jinja-style comments. +-#} ``` When making changes, use those comments to make clear where and what we changed. For example: diff --git a/Dockerfile b/Dockerfile index ddbaacea..08505c9a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,15 @@ +# This code is part of Qiskit. +# +# (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. + # This Dockerfile is used to preview the docs in pull requests via GitHub Actions. # # To test it out locally: diff --git a/LICENSE b/LICENSE index a8446008..0a1649b5 100644 --- a/LICENSE +++ b/LICENSE @@ -224,3 +224,26 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +The MIT License (MIT) + +Copyright (c) 2020 Pradyun Gedam + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/playwright.config.js b/playwright.config.js index 1c5ef519..ba5aa502 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -1,3 +1,16 @@ +/* This code is part of Qiskit. + * + * (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. + */ + import { defineConfig } from "@playwright/test"; const baseURL = "http://127.0.0.1:8080"; diff --git a/pyproject.toml b/pyproject.toml index 892d7e30..a1303f11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "qiskit-sphinx-theme" description = "A Sphinx theme for Qiskit and Qiskit Ecosystem projects" dynamic = ["version"] -license = { text = "Apache 2" } +license = { file = "LICENSE" } authors = [{ name = "Qiskit Development Team", email = "hello@qiskit.org" }] classifiers = [ "Development Status :: 5 - Production/Stable", diff --git a/src/qiskit_sphinx_theme/assets/scripts/gumshoe-patched.js b/src/qiskit_sphinx_theme/assets/scripts/gumshoe-patched.js index 0642937e..1882b8c4 100644 --- a/src/qiskit_sphinx_theme/assets/scripts/gumshoe-patched.js +++ b/src/qiskit_sphinx_theme/assets/scripts/gumshoe-patched.js @@ -1,4 +1,4 @@ -// Vendored exactly from Furo's `assets/scripts/gumshoe-patched.js`. +/*! This file is vendored from Furo (created by Pradyun Gedam) and used under the MIT license. */ /*! * gumshoejs v5.1.2 (patched by @pradyunsg) * A simple, framework-agnostic scrollspy script. diff --git a/src/qiskit_sphinx_theme/assets/scripts/qiskit-sphinx-theme.js b/src/qiskit_sphinx_theme/assets/scripts/qiskit-sphinx-theme.js index ff9bffa8..4a1b9ff3 100644 --- a/src/qiskit_sphinx_theme/assets/scripts/qiskit-sphinx-theme.js +++ b/src/qiskit_sphinx_theme/assets/scripts/qiskit-sphinx-theme.js @@ -1,5 +1,5 @@ -// This file is vendored from Furo's `assets/scripts/furo.js`. When adding custom Qiskit code, -// surround it with `QISKIT CHANGE: start` and `QISKIT CHANGE: end` comments. +/*! This file is vendored from Furo (created by Pradyun Gedam) and used under the MIT license. */ +// When making changes, surround it with `QISKIT CHANGE: start` and `QISKIT CHANGE: end` comments. import Gumshoe from "./gumshoe-patched.js"; diff --git a/src/qiskit_sphinx_theme/assets/styles/_admonitions.scss b/src/qiskit_sphinx_theme/assets/styles/_admonitions.scss index c9d038df..c541ff9e 100644 --- a/src/qiskit_sphinx_theme/assets/styles/_admonitions.scss +++ b/src/qiskit_sphinx_theme/assets/styles/_admonitions.scss @@ -1,3 +1,16 @@ +/* This code is part of Qiskit. + * + * (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. + */ + // We use https://carbondesignsystem.com/components/notification/style/ for admonitions // (e.g. warning boxes. We don't use the Success admonition though. diff --git a/src/qiskit_sphinx_theme/assets/styles/_api.scss b/src/qiskit_sphinx_theme/assets/styles/_api.scss index 5746e266..1dd036d0 100644 --- a/src/qiskit_sphinx_theme/assets/styles/_api.scss +++ b/src/qiskit_sphinx_theme/assets/styles/_api.scss @@ -1,3 +1,16 @@ +/* This code is part of Qiskit. + * + * (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. + */ + // By default, Furo uses an aggressive red color for API docs. We use a more muted black and gray. body { --color-api-name: var(--color-foreground-primary); diff --git a/src/qiskit_sphinx_theme/assets/styles/_custom-directives.scss b/src/qiskit_sphinx_theme/assets/styles/_custom-directives.scss index 7424c2d0..5ff322d1 100644 --- a/src/qiskit_sphinx_theme/assets/styles/_custom-directives.scss +++ b/src/qiskit_sphinx_theme/assets/styles/_custom-directives.scss @@ -1,3 +1,16 @@ +/* This code is part of Qiskit. + * + * (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. + */ + // This creates a purple border at the bottom. We set the width to 0. The relevant rule // should change the width to 100% on hover so that it transitions in. @mixin purple-underline { diff --git a/src/qiskit_sphinx_theme/assets/styles/_drop-shadows.scss b/src/qiskit_sphinx_theme/assets/styles/_drop-shadows.scss index 46a3942d..14b4d109 100644 --- a/src/qiskit_sphinx_theme/assets/styles/_drop-shadows.scss +++ b/src/qiskit_sphinx_theme/assets/styles/_drop-shadows.scss @@ -1,3 +1,16 @@ +/* This code is part of Qiskit. + * + * (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. + */ + // We use a flat design with Carbon, so disable box-shadows and rounded borders. // // `:not(#specifity-war)` is to work around specifity wars. diff --git a/src/qiskit_sphinx_theme/assets/styles/_footer.scss b/src/qiskit_sphinx_theme/assets/styles/_footer.scss index a0da62ec..46e27d71 100644 --- a/src/qiskit_sphinx_theme/assets/styles/_footer.scss +++ b/src/qiskit_sphinx_theme/assets/styles/_footer.scss @@ -1,3 +1,16 @@ +/* This code is part of Qiskit. + * + * (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. + */ + .qiskit-analytics-container { display: inline-flex; border-top: 1px solid var(--color-background-border); diff --git a/src/qiskit_sphinx_theme/assets/styles/_icons.scss b/src/qiskit_sphinx_theme/assets/styles/_icons.scss index 3fea5126..7babecae 100644 --- a/src/qiskit_sphinx_theme/assets/styles/_icons.scss +++ b/src/qiskit_sphinx_theme/assets/styles/_icons.scss @@ -1,3 +1,16 @@ +/* This code is part of Qiskit. + * + * (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. + */ + // We must use Carbon for all icons: https://carbondesignsystem.com/guidelines/icons/library/. // To use an icon, download it and format it to one line. // diff --git a/src/qiskit_sphinx_theme/assets/styles/_layout.scss b/src/qiskit_sphinx_theme/assets/styles/_layout.scss index 0935f8ba..1ddca127 100644 --- a/src/qiskit_sphinx_theme/assets/styles/_layout.scss +++ b/src/qiskit_sphinx_theme/assets/styles/_layout.scss @@ -1,3 +1,16 @@ +/* This code is part of Qiskit. + * + * (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. + */ + // By default, Furo expands the left and right sidebars when the page width increases, but it // doesn't increase the entry size. It also keeps the page contents fixed at 46em. // diff --git a/src/qiskit_sphinx_theme/assets/styles/_left-sidebar.scss b/src/qiskit_sphinx_theme/assets/styles/_left-sidebar.scss index f27b628b..d1b29c84 100644 --- a/src/qiskit_sphinx_theme/assets/styles/_left-sidebar.scss +++ b/src/qiskit_sphinx_theme/assets/styles/_left-sidebar.scss @@ -1,3 +1,16 @@ +/* This code is part of Qiskit. + * + * (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. + */ + // ------------------------------------------------------------------------------ // Colors // ------------------------------------------------------------------------------ diff --git a/src/qiskit_sphinx_theme/assets/styles/_sphinx-extensions.scss b/src/qiskit_sphinx_theme/assets/styles/_sphinx-extensions.scss index 80051d9e..71b07200 100644 --- a/src/qiskit_sphinx_theme/assets/styles/_sphinx-extensions.scss +++ b/src/qiskit_sphinx_theme/assets/styles/_sphinx-extensions.scss @@ -1,3 +1,16 @@ +/* This code is part of Qiskit. + * + * (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. + */ + // --------------------------------------------------------------------------- // nbsphinx (tutorials) // --------------------------------------------------------------------------- diff --git a/src/qiskit_sphinx_theme/assets/styles/_tables.scss b/src/qiskit_sphinx_theme/assets/styles/_tables.scss index f04192cc..d5021bf3 100644 --- a/src/qiskit_sphinx_theme/assets/styles/_tables.scss +++ b/src/qiskit_sphinx_theme/assets/styles/_tables.scss @@ -1,3 +1,16 @@ +/* This code is part of Qiskit. + * + * (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 { // Use the same table header color as qiskit.org. --color-table-header-background: #dde1e6; diff --git a/src/qiskit_sphinx_theme/assets/styles/_top-nav-bar.scss b/src/qiskit_sphinx_theme/assets/styles/_top-nav-bar.scss index e71096ee..dbbfb97b 100644 --- a/src/qiskit_sphinx_theme/assets/styles/_top-nav-bar.scss +++ b/src/qiskit_sphinx_theme/assets/styles/_top-nav-bar.scss @@ -1,3 +1,16 @@ +/* This code is part of Qiskit. + * + * (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. + */ + // This value is duplicated from `top-nav-bar.js`. Its definition of the variable is not // exposed globally. Keep in sync. // diff --git a/src/qiskit_sphinx_theme/assets/styles/_typography.scss b/src/qiskit_sphinx_theme/assets/styles/_typography.scss index aaaa4f09..c107cc5a 100644 --- a/src/qiskit_sphinx_theme/assets/styles/_typography.scss +++ b/src/qiskit_sphinx_theme/assets/styles/_typography.scss @@ -1,3 +1,16 @@ +/* This code is part of Qiskit. + * + * (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 { --font-stack: 'IBM Plex Sans', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif; --font-stack--monospace: 'IBM Plex Mono', 'Consolas', 'Courier New', monospace; 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 8b50aa6a..8db51e8a 100644 --- a/src/qiskit_sphinx_theme/assets/styles/qiskit-sphinx-theme.scss +++ b/src/qiskit_sphinx_theme/assets/styles/qiskit-sphinx-theme.scss @@ -1,3 +1,16 @@ +/* This code is part of Qiskit. + * + * (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. + */ + @import "admonitions"; @import "api"; @import "custom-directives"; diff --git a/src/qiskit_sphinx_theme/pytorch/breadcrumbs.html b/src/qiskit_sphinx_theme/pytorch/breadcrumbs.html index 1dcd711d..a8d787bd 100644 --- a/src/qiskit_sphinx_theme/pytorch/breadcrumbs.html +++ b/src/qiskit_sphinx_theme/pytorch/breadcrumbs.html @@ -1,3 +1,17 @@ +{#- + This code is part of Qiskit. + + (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. +-#} +