From bf9fb143f7399eeda60a8851ddb763ec89805eee Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Tue, 4 Mar 2025 11:54:57 +0100 Subject: [PATCH 01/13] feat: migrate to stb --- pyproject.toml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a48b6cc87..a13bfafa3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,12 @@ [build-system] -requires = ["flit_core >=3.2,<4"] -build-backend = "flit_core.buildapi" +requires = [ + "sphinx-theme-builder @ https://github.com/pradyunsg/sphinx-theme-builder/archive/87214d0671c943992c05e3db01dca997e156e8d6.zip", +] +build-backend = "sphinx_theme_builder" + +#[tool.sphinx-theme-builder] +#node_version = "22.9.0" +#theme = "ansys_sphinx_theme" [project] # Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections @@ -65,17 +71,15 @@ changelog = [ [project.entry-points."sphinx.html_themes"] ansys_sphinx_theme = "ansys_sphinx_theme" -[tool.flit.module] -name = "ansys_sphinx_theme" -[tool.flit.sdist] -include = [ - "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/layout.html", - "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/components/breadcrumbs.html", - "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/theme.conf", - "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/_templates/", - "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/", -] +#[tool.flit.sdist] +#include = [ +# "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/layout.html", +# "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/components/breadcrumbs.html", +# "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/theme.conf", +# "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/_templates/", +# "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/", +#] [project.urls] Home = "https://sphinxdocs.ansys.com/" From cd60c6288302afa496b5c497cfec70c675946d29 Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Tue, 4 Mar 2025 16:35:43 +0100 Subject: [PATCH 02/13] feat: add necessary files --- pyproject.toml | 8 +- .../assets/scripts/.gitkeep | 0 .../assets/scripts/ansys-sphinx-theme.js | 269 ++++++++++++++++++ .../assets/styles/ansys-sphinx-theme.css | 42 +++ .../theme/ansys_sphinx_theme/theme.conf | 1 + 5 files changed, 316 insertions(+), 4 deletions(-) create mode 100644 src/ansys_sphinx_theme/assets/scripts/.gitkeep create mode 100644 src/ansys_sphinx_theme/assets/scripts/ansys-sphinx-theme.js create mode 100644 src/ansys_sphinx_theme/assets/styles/ansys-sphinx-theme.css diff --git a/pyproject.toml b/pyproject.toml index a13bfafa3..744610946 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,9 +4,9 @@ requires = [ ] build-backend = "sphinx_theme_builder" -#[tool.sphinx-theme-builder] -#node_version = "22.9.0" -#theme = "ansys_sphinx_theme" +[tool.sphinx-theme-builder] +node-version = "22.9.0" +theme-name = "ansys_sphinx_theme" [project] # Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections @@ -69,7 +69,7 @@ changelog = [ ] [project.entry-points."sphinx.html_themes"] -ansys_sphinx_theme = "ansys_sphinx_theme" +"ansys_sphinx_theme" = "ansys_sphinx_theme" #[tool.flit.sdist] diff --git a/src/ansys_sphinx_theme/assets/scripts/.gitkeep b/src/ansys_sphinx_theme/assets/scripts/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/src/ansys_sphinx_theme/assets/scripts/ansys-sphinx-theme.js b/src/ansys_sphinx_theme/assets/scripts/ansys-sphinx-theme.js new file mode 100644 index 000000000..059f253bd --- /dev/null +++ b/src/ansys_sphinx_theme/assets/scripts/ansys-sphinx-theme.js @@ -0,0 +1,269 @@ +const SEARCH_BAR = document.getElementById("search-bar"); +const SEARCH_INPUT = SEARCH_BAR.querySelector(".bd-search input.form-control"); +const RESULTS = document.getElementById("static-search-results"); +const MAIN_PAGE_CONTENT = document.querySelector(".bd-main"); +let CURRENT_INDEX = -1; + +const FUSE_VERSION = "6.4.6"; + +require.config({ + paths: { + fuse: `https://cdn.jsdelivr.net/npm/fuse.js@${FUSE_VERSION}/dist/fuse.min`, + }, +}); + +require(["fuse"], function (Fuse) { + // Declare global variables + let fuse; + + // Debounce function to limit the rate of function calls + function debounce(func, delay) { + let timeout; + return function (...args) { + clearTimeout(timeout); + timeout = setTimeout(() => func.apply(this, args), delay); + }; + } + + // Initialize Fuse when the data is fetched + function initializeFuse(data, options) { + fuse = new Fuse(data, options); + // add env variable "FUSE_ACTIVE" to indicate that the search is ready + document.documentElement.setAttribute("data-fuse_active", "true"); + } + + // Expand the search bar input + function expandSearchInput() { + RESULTS.style.display = "flex"; + SEARCH_INPUT.classList.add("expanded"); + MAIN_PAGE_CONTENT.classList.add("blurred"); + SEARCH_INPUT.focus(); + } + + // Collapse the search bar input and hide any results + function collapseSearchInput() { + RESULTS.style.display = "none"; + SEARCH_INPUT.classList.remove("expanded"); + SEARCH_INPUT.value = ""; + MAIN_PAGE_CONTENT.classList.remove("blurred"); + } + + // Truncate the preview of the text + function truncateTextPreview(text, maxLength = 200) { + if (text.length <= maxLength) { + return text; // If the text is already within the limit, return as is + } + return text.slice(0, maxLength) + "..."; + } + + // Display search results + function displayResults(results) { + if (!RESULTS) { + console.error("RESULTS element is not defined."); + return; + } + + if (results.length === 0) { + noResultsFoundBanner(); + RESULTS.style.display = "none"; + return; + } + + RESULTS.style.display = "flex"; + RESULTS.innerHTML = ""; + + const fragment = document.createDocumentFragment(); + + results.forEach((result) => { + const { title, text, href } = result.item; + + const resultItem = document.createElement("div"); + resultItem.className = "result-item"; + resultItem.dataset.href = href; + resultItem.addEventListener("click", () => navigateToHref(href)); + + const resultTitle = document.createElement("div"); + resultTitle.className = "result-title"; + resultTitle.textContent = title; + resultItem.appendChild(resultTitle); + + const resultText = document.createElement("div"); + resultText.className = "result-text"; + const highlightedText = truncateTextPreview(text); + resultText.textContent = highlightedText; + resultItem.appendChild(resultText); + + fragment.appendChild(resultItem); + }); + + RESULTS.appendChild(fragment); + } + + // Focus the selected result item + function focusSelected(resultsItems) { + if (CURRENT_INDEX >= 0 && CURRENT_INDEX < resultsItems.length) { + resultsItems.forEach((item) => item.classList.remove("selected")); + const currentItem = resultsItems[CURRENT_INDEX]; + currentItem.classList.add("selected"); + currentItem.focus(); + currentItem.scrollIntoView({ block: "nearest" }); + } + } + + // Display a banner indicating that the search is running + function noResultsFoundBanner() { + RESULTS.innerHTML = ""; + RESULTS.style.display = "flex"; + const warningBanner = document.createElement("div"); + warningBanner.className = "warning-banner"; + warningBanner.textContent = + "No results found. Press Enter for extended search."; + warningBanner.style.display = "block"; + warningBanner.style.fontStyle = "italic"; + RESULTS.appendChild(warningBanner); + } + + // Build the complete hyperlink for the target file + function getDynamicPath(targetFile) { + const contentRoot = + document.documentElement.getAttribute("data-content_root"); + return `${contentRoot}${targetFile}`; + } + + // Navigate to the desired file + function navigateToHref(href) { + const finalUrl = getDynamicPath(href); + window.location.href = finalUrl; + } + + // Display a banner indicating that no results were found + function searchingForResultsBanner() { + RESULTS.innerHTML = ""; + RESULTS.style.display = "flex"; + const searchingBanner = document.createElement("div"); + searchingBanner.className = "searching-banner"; + searchingBanner.textContent = "Searching..."; + searchingBanner.style.display = "block"; + console.log("Searching..."); + searchingBanner.style.fontStyle = "italic"; + RESULTS.appendChild(searchingBanner); + } + + // Handle search input + const handleSearchInput = debounce( + () => { + const query = SEARCH_INPUT.value.trim(); + if (query.length > 0) { + const searchResults = fuse.search(query, { + limit: parseInt(SEARCH_OPTIONS.limit), + }); + if (searchResults.length === 0) { + noResultsFoundBanner(); + } else { + displayResults(searchResults); + } + } else { + RESULTS.style.display = "none"; + } + }, + parseInt(SEARCH_OPTIONS.delay) || 300, + ); + + // Handle keydown event for the search input + function handleKeyDownSearchInput(event) { + const resultItems = RESULTS.querySelectorAll(".result-item"); + + switch (event.key) { + case "Tab": + event.preventDefault(); + break; + + case "Escape": + collapseSearchInput(); + break; // Added break to avoid fall-through + + case "Enter": + // Optionally handle Enter key here + if (CURRENT_INDEX >= 0 && CURRENT_INDEX < resultItems.length) { + event.preventDefault(); // Prevent default enter action + const href = resultItems[CURRENT_INDEX].dataset.href; + navigateToHref(href); + } + if (resultItems.length > 0) { + event.preventDefault(); // Prevent default enter action + const href = resultItems[0].dataset.href; + navigateToHref(href); + } + + break; + + case "ArrowDown": + if (resultItems.length > 0) { + CURRENT_INDEX = (CURRENT_INDEX + 1) % resultItems.length; // Move down + focusSelected(resultItems); + } + break; + + case "ArrowUp": + if (resultItems.length > 0) { + CURRENT_INDEX = + (CURRENT_INDEX - 1 + resultItems.length) % resultItems.length; // Move up + focusSelected(resultItems); + } + break; + + default: + // if environment variable "FUSE_ACTIVE" is set to true + if ( + document.documentElement.getAttribute("data-fuse_active") === "true" + ) { + searchingForResultsBanner(); + } else { + console.error("[AST]: Fuse is not active yet."); + RESULTS.style.display = "none"; + } + handleSearchInput(); + } + } + + // Handle keydown event globally + function handleGlobalKeyDown(event) { + switch (event.key) { + case "k": + if (event.ctrlKey) { + expandSearchInput(); + } + break; + + case "Escape": + collapseSearchInput(); + break; + } + } + + // Handle click event globally + function handleGlobalClick(event) { + if (!RESULTS.contains(event.target) && event.target !== SEARCH_INPUT) { + collapseSearchInput(); + } + } + + // Add event listeners + SEARCH_INPUT.addEventListener("click", expandSearchInput); + SEARCH_INPUT.addEventListener("keydown", handleKeyDownSearchInput); + document.addEventListener("keydown", handleGlobalKeyDown); + document.addEventListener("click", handleGlobalClick); + + // Fetch search data and initialize Fuse + fetch(SEARCH_FILE) + .then((response) => { + if (!response.ok) { + throw new Error(`[AST]: HTTPS error ${response.statusText}`); + } + return response.json(); + }) + .then((SEARCH_DATA) => initializeFuse(SEARCH_DATA, SEARCH_OPTIONS)) + .catch((error) => + console.error(`[AST]: Can not fetch ${SEARCH_FILE}`, error.message), + ); +}); diff --git a/src/ansys_sphinx_theme/assets/styles/ansys-sphinx-theme.css b/src/ansys_sphinx_theme/assets/styles/ansys-sphinx-theme.css new file mode 100644 index 000000000..e11693261 --- /dev/null +++ b/src/ansys_sphinx_theme/assets/styles/ansys-sphinx-theme.css @@ -0,0 +1,42 @@ +/* Provided by the Sphinx base theme template at build time */ + +@import "pydata-sphinx-theme-custom.css"; +@import "breadcrumbs.css"; +@import "ast-search.css"; +@import "sphinx-design.css"; +@import "table-custom.css"; +@import "sphinx-gallery.css"; + +/* +* Code cell +*/ +.xref.std.std-ref { + color: var(--pst-color-inline-code); + font-family: "Inconsolata"; + font-weight: var(--ast-font-weight-regular); + font-style: italic; + padding: 0.1rem 0.25rem; + padding-top: 0.1rem; + padding-right: 0.25rem; + padding-bottom: 0.1rem; + padding-left: 0.25rem; + font-size: 90%; + background-color: var(--pst-color-on-surface); + border: 1px solid var(--pst-color-border); + border-radius: 0.25rem; +} + +/* Reduce empty-space around Notes and Examples headings */ +p.rubric { + margin-top: 0.75em; + margin-bottom: 0.75em; +} + +/* +* Autosummary +*/ + +.autosummary tr:nth-child(odd), +.autosummary tr:nth-child(even) { + background-color: var(--pst-color-background); +} diff --git a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/theme.conf b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/theme.conf index b25441b24..5d06f558c 100644 --- a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/theme.conf +++ b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/theme.conf @@ -1,5 +1,6 @@ [theme] inherit = pydata_sphinx_theme +stylesheet = styles/ansys-sphinx-theme.css [options] contact_mail = From 6eb8a249878ca00648e45c6f020babd062f7396d Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Wed, 5 Mar 2025 08:51:45 +0100 Subject: [PATCH 03/13] maint: add json file --- .gitignore | 6 +- package-lock.json | 490 ++++++++++++++++++ package.json | 8 + .../assets/scripts/ansys-sphinx-theme.js | 269 ---------- .../static/styles/ansys-sphinx-theme.css | 41 ++ .../static/styles/ansys-sphinx-theme.css.map | 1 + 6 files changed, 545 insertions(+), 270 deletions(-) create mode 100644 package-lock.json create mode 100644 package.json delete mode 100644 src/ansys_sphinx_theme/assets/scripts/ansys-sphinx-theme.js create mode 100644 src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/styles/ansys-sphinx-theme.css create mode 100644 src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/styles/ansys-sphinx-theme.css.map diff --git a/.gitignore b/.gitignore index c68b289bb..09103371e 100644 --- a/.gitignore +++ b/.gitignore @@ -35,7 +35,6 @@ MANIFEST # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec - # Installer logs pip-log.txt pip-delete-this-directory.txt @@ -163,3 +162,8 @@ doc/source/examples/gallery-examples/ doc/source/sg_execution_times.rst # rendering of sphinx autoapi examples doc/source/examples/api/ + + +# node modules and env +node_modules/ +.nodeenv/ \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..7d59f34ba --- /dev/null +++ b/package-lock.json @@ -0,0 +1,490 @@ +{ + "name": "ansys-sphinx-theme", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "sass": "^1.43.4" + } + }, + "node_modules/@parcel/watcher": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", + "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "detect-libc": "^1.0.3", + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "node-addon-api": "^7.0.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.1", + "@parcel/watcher-darwin-arm64": "2.5.1", + "@parcel/watcher-darwin-x64": "2.5.1", + "@parcel/watcher-freebsd-x64": "2.5.1", + "@parcel/watcher-linux-arm-glibc": "2.5.1", + "@parcel/watcher-linux-arm-musl": "2.5.1", + "@parcel/watcher-linux-arm64-glibc": "2.5.1", + "@parcel/watcher-linux-arm64-musl": "2.5.1", + "@parcel/watcher-linux-x64-glibc": "2.5.1", + "@parcel/watcher-linux-x64-musl": "2.5.1", + "@parcel/watcher-win32-arm64": "2.5.1", + "@parcel/watcher-win32-ia32": "2.5.1", + "@parcel/watcher-win32-x64": "2.5.1" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", + "integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz", + "integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz", + "integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz", + "integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz", + "integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz", + "integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz", + "integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz", + "integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz", + "integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz", + "integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz", + "integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-ia32": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz", + "integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz", + "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", + "optional": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "license": "Apache-2.0", + "optional": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", + "optional": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/immutable": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.0.3.tgz", + "integrity": "sha512-P8IdPQHq3lA1xVeBRi5VPqUm5HDgKnx0Ru51wZz5mjxHr5n3RWhjIpOFU7ybkUxfB+5IToy+OLaHYDBIWsv+uw==", + "license": "MIT" + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", + "optional": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", + "optional": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "license": "MIT", + "optional": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/sass": { + "version": "1.85.1", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.85.1.tgz", + "integrity": "sha512-Uk8WpxM5v+0cMR0XjX9KfRIacmSG86RH4DCCZjLU2rFh5tyutt9siAXJ7G+YfxQ99Q6wrRMbMlVl6KqUms71ag==", + "license": "MIT", + "dependencies": { + "chokidar": "^4.0.0", + "immutable": "^5.0.2", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + }, + "optionalDependencies": { + "@parcel/watcher": "^2.4.1" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 000000000..b65cef984 --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "scripts": { + "build": "sass src/ansys_sphinx_theme/assets/styles/ansys-sphinx-theme.css src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/styles/ansys-sphinx-theme.css" + }, + "dependencies": { + "sass": "^1.43.4" + } +} \ No newline at end of file diff --git a/src/ansys_sphinx_theme/assets/scripts/ansys-sphinx-theme.js b/src/ansys_sphinx_theme/assets/scripts/ansys-sphinx-theme.js deleted file mode 100644 index 059f253bd..000000000 --- a/src/ansys_sphinx_theme/assets/scripts/ansys-sphinx-theme.js +++ /dev/null @@ -1,269 +0,0 @@ -const SEARCH_BAR = document.getElementById("search-bar"); -const SEARCH_INPUT = SEARCH_BAR.querySelector(".bd-search input.form-control"); -const RESULTS = document.getElementById("static-search-results"); -const MAIN_PAGE_CONTENT = document.querySelector(".bd-main"); -let CURRENT_INDEX = -1; - -const FUSE_VERSION = "6.4.6"; - -require.config({ - paths: { - fuse: `https://cdn.jsdelivr.net/npm/fuse.js@${FUSE_VERSION}/dist/fuse.min`, - }, -}); - -require(["fuse"], function (Fuse) { - // Declare global variables - let fuse; - - // Debounce function to limit the rate of function calls - function debounce(func, delay) { - let timeout; - return function (...args) { - clearTimeout(timeout); - timeout = setTimeout(() => func.apply(this, args), delay); - }; - } - - // Initialize Fuse when the data is fetched - function initializeFuse(data, options) { - fuse = new Fuse(data, options); - // add env variable "FUSE_ACTIVE" to indicate that the search is ready - document.documentElement.setAttribute("data-fuse_active", "true"); - } - - // Expand the search bar input - function expandSearchInput() { - RESULTS.style.display = "flex"; - SEARCH_INPUT.classList.add("expanded"); - MAIN_PAGE_CONTENT.classList.add("blurred"); - SEARCH_INPUT.focus(); - } - - // Collapse the search bar input and hide any results - function collapseSearchInput() { - RESULTS.style.display = "none"; - SEARCH_INPUT.classList.remove("expanded"); - SEARCH_INPUT.value = ""; - MAIN_PAGE_CONTENT.classList.remove("blurred"); - } - - // Truncate the preview of the text - function truncateTextPreview(text, maxLength = 200) { - if (text.length <= maxLength) { - return text; // If the text is already within the limit, return as is - } - return text.slice(0, maxLength) + "..."; - } - - // Display search results - function displayResults(results) { - if (!RESULTS) { - console.error("RESULTS element is not defined."); - return; - } - - if (results.length === 0) { - noResultsFoundBanner(); - RESULTS.style.display = "none"; - return; - } - - RESULTS.style.display = "flex"; - RESULTS.innerHTML = ""; - - const fragment = document.createDocumentFragment(); - - results.forEach((result) => { - const { title, text, href } = result.item; - - const resultItem = document.createElement("div"); - resultItem.className = "result-item"; - resultItem.dataset.href = href; - resultItem.addEventListener("click", () => navigateToHref(href)); - - const resultTitle = document.createElement("div"); - resultTitle.className = "result-title"; - resultTitle.textContent = title; - resultItem.appendChild(resultTitle); - - const resultText = document.createElement("div"); - resultText.className = "result-text"; - const highlightedText = truncateTextPreview(text); - resultText.textContent = highlightedText; - resultItem.appendChild(resultText); - - fragment.appendChild(resultItem); - }); - - RESULTS.appendChild(fragment); - } - - // Focus the selected result item - function focusSelected(resultsItems) { - if (CURRENT_INDEX >= 0 && CURRENT_INDEX < resultsItems.length) { - resultsItems.forEach((item) => item.classList.remove("selected")); - const currentItem = resultsItems[CURRENT_INDEX]; - currentItem.classList.add("selected"); - currentItem.focus(); - currentItem.scrollIntoView({ block: "nearest" }); - } - } - - // Display a banner indicating that the search is running - function noResultsFoundBanner() { - RESULTS.innerHTML = ""; - RESULTS.style.display = "flex"; - const warningBanner = document.createElement("div"); - warningBanner.className = "warning-banner"; - warningBanner.textContent = - "No results found. Press Enter for extended search."; - warningBanner.style.display = "block"; - warningBanner.style.fontStyle = "italic"; - RESULTS.appendChild(warningBanner); - } - - // Build the complete hyperlink for the target file - function getDynamicPath(targetFile) { - const contentRoot = - document.documentElement.getAttribute("data-content_root"); - return `${contentRoot}${targetFile}`; - } - - // Navigate to the desired file - function navigateToHref(href) { - const finalUrl = getDynamicPath(href); - window.location.href = finalUrl; - } - - // Display a banner indicating that no results were found - function searchingForResultsBanner() { - RESULTS.innerHTML = ""; - RESULTS.style.display = "flex"; - const searchingBanner = document.createElement("div"); - searchingBanner.className = "searching-banner"; - searchingBanner.textContent = "Searching..."; - searchingBanner.style.display = "block"; - console.log("Searching..."); - searchingBanner.style.fontStyle = "italic"; - RESULTS.appendChild(searchingBanner); - } - - // Handle search input - const handleSearchInput = debounce( - () => { - const query = SEARCH_INPUT.value.trim(); - if (query.length > 0) { - const searchResults = fuse.search(query, { - limit: parseInt(SEARCH_OPTIONS.limit), - }); - if (searchResults.length === 0) { - noResultsFoundBanner(); - } else { - displayResults(searchResults); - } - } else { - RESULTS.style.display = "none"; - } - }, - parseInt(SEARCH_OPTIONS.delay) || 300, - ); - - // Handle keydown event for the search input - function handleKeyDownSearchInput(event) { - const resultItems = RESULTS.querySelectorAll(".result-item"); - - switch (event.key) { - case "Tab": - event.preventDefault(); - break; - - case "Escape": - collapseSearchInput(); - break; // Added break to avoid fall-through - - case "Enter": - // Optionally handle Enter key here - if (CURRENT_INDEX >= 0 && CURRENT_INDEX < resultItems.length) { - event.preventDefault(); // Prevent default enter action - const href = resultItems[CURRENT_INDEX].dataset.href; - navigateToHref(href); - } - if (resultItems.length > 0) { - event.preventDefault(); // Prevent default enter action - const href = resultItems[0].dataset.href; - navigateToHref(href); - } - - break; - - case "ArrowDown": - if (resultItems.length > 0) { - CURRENT_INDEX = (CURRENT_INDEX + 1) % resultItems.length; // Move down - focusSelected(resultItems); - } - break; - - case "ArrowUp": - if (resultItems.length > 0) { - CURRENT_INDEX = - (CURRENT_INDEX - 1 + resultItems.length) % resultItems.length; // Move up - focusSelected(resultItems); - } - break; - - default: - // if environment variable "FUSE_ACTIVE" is set to true - if ( - document.documentElement.getAttribute("data-fuse_active") === "true" - ) { - searchingForResultsBanner(); - } else { - console.error("[AST]: Fuse is not active yet."); - RESULTS.style.display = "none"; - } - handleSearchInput(); - } - } - - // Handle keydown event globally - function handleGlobalKeyDown(event) { - switch (event.key) { - case "k": - if (event.ctrlKey) { - expandSearchInput(); - } - break; - - case "Escape": - collapseSearchInput(); - break; - } - } - - // Handle click event globally - function handleGlobalClick(event) { - if (!RESULTS.contains(event.target) && event.target !== SEARCH_INPUT) { - collapseSearchInput(); - } - } - - // Add event listeners - SEARCH_INPUT.addEventListener("click", expandSearchInput); - SEARCH_INPUT.addEventListener("keydown", handleKeyDownSearchInput); - document.addEventListener("keydown", handleGlobalKeyDown); - document.addEventListener("click", handleGlobalClick); - - // Fetch search data and initialize Fuse - fetch(SEARCH_FILE) - .then((response) => { - if (!response.ok) { - throw new Error(`[AST]: HTTPS error ${response.statusText}`); - } - return response.json(); - }) - .then((SEARCH_DATA) => initializeFuse(SEARCH_DATA, SEARCH_OPTIONS)) - .catch((error) => - console.error(`[AST]: Can not fetch ${SEARCH_FILE}`, error.message), - ); -}); diff --git a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/styles/ansys-sphinx-theme.css b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/styles/ansys-sphinx-theme.css new file mode 100644 index 000000000..3eb842f25 --- /dev/null +++ b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/styles/ansys-sphinx-theme.css @@ -0,0 +1,41 @@ +/* Provided by the Sphinx base theme template at build time */ +@import "pydata-sphinx-theme-custom.css"; +@import "breadcrumbs.css"; +@import "ast-search.css"; +@import "sphinx-design.css"; +@import "table-custom.css"; +@import "sphinx-gallery.css"; +/* +* Code cell +*/ +.xref.std.std-ref { + color: var(--pst-color-inline-code); + font-family: "Inconsolata"; + font-weight: var(--ast-font-weight-regular); + font-style: italic; + padding: 0.1rem 0.25rem; + padding-top: 0.1rem; + padding-right: 0.25rem; + padding-bottom: 0.1rem; + padding-left: 0.25rem; + font-size: 90%; + background-color: var(--pst-color-on-surface); + border: 1px solid var(--pst-color-border); + border-radius: 0.25rem; +} + +/* Reduce empty-space around Notes and Examples headings */ +p.rubric { + margin-top: 0.75em; + margin-bottom: 0.75em; +} + +/* +* Autosummary +*/ +.autosummary tr:nth-child(odd), +.autosummary tr:nth-child(even) { + background-color: var(--pst-color-background); +} + +/*# sourceMappingURL=ansys-sphinx-theme.css.map */ diff --git a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/styles/ansys-sphinx-theme.css.map b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/styles/ansys-sphinx-theme.css.map new file mode 100644 index 000000000..f6f1ad9b4 --- /dev/null +++ b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/styles/ansys-sphinx-theme.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../../../assets/styles/ansys-sphinx-theme.css"],"names":[],"mappings":"AAAA;AAEQ;AACA;AACA;AACA;AACA;AACA;AAER;AAAA;AAAA;AAGA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;AACA;EACE;EACA;;;AAGF;AAAA;AAAA;AAIA;AAAA;EAEE","file":"ansys-sphinx-theme.css"} \ No newline at end of file From 2627b3d62d4f0acce92d48daa33d14efa5eb4135 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Wed, 5 Mar 2025 07:52:55 +0000 Subject: [PATCH 04/13] chore: adding changelog file 639.miscellaneous.md [dependabot-skip] --- doc/changelog.d/639.miscellaneous.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/639.miscellaneous.md diff --git a/doc/changelog.d/639.miscellaneous.md b/doc/changelog.d/639.miscellaneous.md new file mode 100644 index 000000000..2c722911d --- /dev/null +++ b/doc/changelog.d/639.miscellaneous.md @@ -0,0 +1 @@ +feat: migrate the builds system to stb \ No newline at end of file From 66da7a96dd9e1a6e3ffc28c8af8f8e50d6a447c4 Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Wed, 5 Mar 2025 11:21:28 +0100 Subject: [PATCH 05/13] maint: update css and poackge file --- package-lock.json | 485 +----------------- package.json | 14 +- .../assets/styles/ansys-sphinx-theme.css | 42 -- .../static/css/ansys_sphinx_theme.css | 3 + .../static/css/ast-search.css | 2 - .../static/css/breadcrumbs.css | 3 - .../static/css/pydata-sphinx-theme-custom.css | 2 - .../static/css/sphinx-gallery.css | 2 - 8 files changed, 15 insertions(+), 538 deletions(-) delete mode 100644 src/ansys_sphinx_theme/assets/styles/ansys-sphinx-theme.css diff --git a/package-lock.json b/package-lock.json index 7d59f34ba..3e8391ab9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,490 +1,11 @@ { - "name": "ansys-sphinx-theme", + "name": "ansys_sphinx_theme", "lockfileVersion": 3, "requires": true, "packages": { "": { - "dependencies": { - "sass": "^1.43.4" - } - }, - "node_modules/@parcel/watcher": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", - "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "dependencies": { - "detect-libc": "^1.0.3", - "is-glob": "^4.0.3", - "micromatch": "^4.0.5", - "node-addon-api": "^7.0.0" - }, - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "@parcel/watcher-android-arm64": "2.5.1", - "@parcel/watcher-darwin-arm64": "2.5.1", - "@parcel/watcher-darwin-x64": "2.5.1", - "@parcel/watcher-freebsd-x64": "2.5.1", - "@parcel/watcher-linux-arm-glibc": "2.5.1", - "@parcel/watcher-linux-arm-musl": "2.5.1", - "@parcel/watcher-linux-arm64-glibc": "2.5.1", - "@parcel/watcher-linux-arm64-musl": "2.5.1", - "@parcel/watcher-linux-x64-glibc": "2.5.1", - "@parcel/watcher-linux-x64-musl": "2.5.1", - "@parcel/watcher-win32-arm64": "2.5.1", - "@parcel/watcher-win32-ia32": "2.5.1", - "@parcel/watcher-win32-x64": "2.5.1" - } - }, - "node_modules/@parcel/watcher-android-arm64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", - "integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-darwin-arm64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz", - "integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-darwin-x64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz", - "integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-freebsd-x64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz", - "integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm-glibc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz", - "integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm-musl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz", - "integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm64-glibc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz", - "integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm64-musl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz", - "integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-x64-glibc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz", - "integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-x64-musl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz", - "integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-arm64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz", - "integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-ia32": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz", - "integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-x64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz", - "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "license": "MIT", - "optional": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "license": "MIT", - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "license": "Apache-2.0", - "optional": true, - "bin": { - "detect-libc": "bin/detect-libc.js" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "license": "MIT", - "optional": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/immutable": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.0.3.tgz", - "integrity": "sha512-P8IdPQHq3lA1xVeBRi5VPqUm5HDgKnx0Ru51wZz5mjxHr5n3RWhjIpOFU7ybkUxfB+5IToy+OLaHYDBIWsv+uw==", - "license": "MIT" - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "license": "MIT", - "optional": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "license": "MIT", - "optional": true, - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/node-addon-api": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", - "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", - "license": "MIT", - "optional": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "license": "MIT", - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/sass": { - "version": "1.85.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.85.1.tgz", - "integrity": "sha512-Uk8WpxM5v+0cMR0XjX9KfRIacmSG86RH4DCCZjLU2rFh5tyutt9siAXJ7G+YfxQ99Q6wrRMbMlVl6KqUms71ag==", - "license": "MIT", - "dependencies": { - "chokidar": "^4.0.0", - "immutable": "^5.0.2", - "source-map-js": ">=0.6.2 <2.0.0" - }, - "bin": { - "sass": "sass.js" - }, - "engines": { - "node": ">=14.0.0" - }, - "optionalDependencies": { - "@parcel/watcher": "^2.4.1" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "license": "MIT", - "optional": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } + "name": "ansys_sphinx_theme", + "devDependencies": {} } } } diff --git a/package.json b/package.json index b65cef984..893d26ffb 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,12 @@ { + "name": "ansys_sphinx_theme", + "repository": "https://github.com/ansys/ansys-sphinx-theme", + + "description": "", + "main": "", "scripts": { - "build": "sass src/ansys_sphinx_theme/assets/styles/ansys-sphinx-theme.css src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/styles/ansys-sphinx-theme.css" - }, - "dependencies": { - "sass": "^1.43.4" - } + "build": "echo 'No build step needed' " + }, + "dependencies": {}, + "devDependencies": {} } \ No newline at end of file diff --git a/src/ansys_sphinx_theme/assets/styles/ansys-sphinx-theme.css b/src/ansys_sphinx_theme/assets/styles/ansys-sphinx-theme.css deleted file mode 100644 index e11693261..000000000 --- a/src/ansys_sphinx_theme/assets/styles/ansys-sphinx-theme.css +++ /dev/null @@ -1,42 +0,0 @@ -/* Provided by the Sphinx base theme template at build time */ - -@import "pydata-sphinx-theme-custom.css"; -@import "breadcrumbs.css"; -@import "ast-search.css"; -@import "sphinx-design.css"; -@import "table-custom.css"; -@import "sphinx-gallery.css"; - -/* -* Code cell -*/ -.xref.std.std-ref { - color: var(--pst-color-inline-code); - font-family: "Inconsolata"; - font-weight: var(--ast-font-weight-regular); - font-style: italic; - padding: 0.1rem 0.25rem; - padding-top: 0.1rem; - padding-right: 0.25rem; - padding-bottom: 0.1rem; - padding-left: 0.25rem; - font-size: 90%; - background-color: var(--pst-color-on-surface); - border: 1px solid var(--pst-color-border); - border-radius: 0.25rem; -} - -/* Reduce empty-space around Notes and Examples headings */ -p.rubric { - margin-top: 0.75em; - margin-bottom: 0.75em; -} - -/* -* Autosummary -*/ - -.autosummary tr:nth-child(odd), -.autosummary tr:nth-child(even) { - background-color: var(--pst-color-background); -} diff --git a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css index e11693261..35b38f09c 100644 --- a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css +++ b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css @@ -6,6 +6,9 @@ @import "sphinx-design.css"; @import "table-custom.css"; @import "sphinx-gallery.css"; +@import "whatsnew.css"; +@import "nbsphinx.css"; +@import "ansys-sphinx-theme-variable.css"; /* * Code cell diff --git a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ast-search.css b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ast-search.css index 130272e36..fafdd2bdd 100644 --- a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ast-search.css +++ b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/ast-search.css @@ -1,5 +1,3 @@ -@import "ansys-sphinx-theme-variable.css"; - .static-search-results { display: flex; flex-direction: column; diff --git a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/breadcrumbs.css b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/breadcrumbs.css index 27e67d65f..75df543d2 100644 --- a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/breadcrumbs.css +++ b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/breadcrumbs.css @@ -1,8 +1,5 @@ /* Provided by the Sphinx base theme template at build time, styles exclusively for the ansys-sphinx-theme classes. */ - -@import "ansys-sphinx-theme-variable.css"; - /** * Breadcrumbs */ diff --git a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/pydata-sphinx-theme-custom.css b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/pydata-sphinx-theme-custom.css index 1a594ff86..bb840db80 100644 --- a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/pydata-sphinx-theme-custom.css +++ b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/pydata-sphinx-theme-custom.css @@ -1,7 +1,5 @@ /* Changes associated with the Ansys Sphinx Theme */ /* for pydata-sphinx-theme */ -@import "ansys-sphinx-theme-variable.css"; - /* * * _secondary sidebar and primary sidebars diff --git a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/sphinx-gallery.css b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/sphinx-gallery.css index b24541f30..6d6078f30 100644 --- a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/sphinx-gallery.css +++ b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/css/sphinx-gallery.css @@ -1,5 +1,3 @@ -@import "ansys-sphinx-theme-variable.css"; - /** * Sphinx gallery output cell */ From 1771f03dd01a988ff5032187e11d0290482450e2 Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Wed, 5 Mar 2025 11:26:57 +0100 Subject: [PATCH 06/13] maint: update changes --- src/ansys_sphinx_theme/assets/styles/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/ansys_sphinx_theme/assets/styles/.gitkeep diff --git a/src/ansys_sphinx_theme/assets/styles/.gitkeep b/src/ansys_sphinx_theme/assets/styles/.gitkeep new file mode 100644 index 000000000..e69de29bb From fd6daae75e91dfc04a190f8c39db87675d7b9e33 Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Wed, 5 Mar 2025 11:39:56 +0100 Subject: [PATCH 07/13] maint: remove unwanted files --- .../static/styles/ansys-sphinx-theme.css | 41 ------------------- .../static/styles/ansys-sphinx-theme.css.map | 1 - 2 files changed, 42 deletions(-) delete mode 100644 src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/styles/ansys-sphinx-theme.css delete mode 100644 src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/styles/ansys-sphinx-theme.css.map diff --git a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/styles/ansys-sphinx-theme.css b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/styles/ansys-sphinx-theme.css deleted file mode 100644 index 3eb842f25..000000000 --- a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/styles/ansys-sphinx-theme.css +++ /dev/null @@ -1,41 +0,0 @@ -/* Provided by the Sphinx base theme template at build time */ -@import "pydata-sphinx-theme-custom.css"; -@import "breadcrumbs.css"; -@import "ast-search.css"; -@import "sphinx-design.css"; -@import "table-custom.css"; -@import "sphinx-gallery.css"; -/* -* Code cell -*/ -.xref.std.std-ref { - color: var(--pst-color-inline-code); - font-family: "Inconsolata"; - font-weight: var(--ast-font-weight-regular); - font-style: italic; - padding: 0.1rem 0.25rem; - padding-top: 0.1rem; - padding-right: 0.25rem; - padding-bottom: 0.1rem; - padding-left: 0.25rem; - font-size: 90%; - background-color: var(--pst-color-on-surface); - border: 1px solid var(--pst-color-border); - border-radius: 0.25rem; -} - -/* Reduce empty-space around Notes and Examples headings */ -p.rubric { - margin-top: 0.75em; - margin-bottom: 0.75em; -} - -/* -* Autosummary -*/ -.autosummary tr:nth-child(odd), -.autosummary tr:nth-child(even) { - background-color: var(--pst-color-background); -} - -/*# sourceMappingURL=ansys-sphinx-theme.css.map */ diff --git a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/styles/ansys-sphinx-theme.css.map b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/styles/ansys-sphinx-theme.css.map deleted file mode 100644 index f6f1ad9b4..000000000 --- a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/styles/ansys-sphinx-theme.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sourceRoot":"","sources":["../../../../assets/styles/ansys-sphinx-theme.css"],"names":[],"mappings":"AAAA;AAEQ;AACA;AACA;AACA;AACA;AACA;AAER;AAAA;AAAA;AAGA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;AACA;EACE;EACA;;;AAGF;AAAA;AAAA;AAIA;AAAA;EAEE","file":"ansys-sphinx-theme.css"} \ No newline at end of file From f6543c049758b2c125bc6eb140338ef96344d2e9 Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Wed, 5 Mar 2025 14:43:54 +0100 Subject: [PATCH 08/13] maint: change toml type order --- pyproject.toml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 744610946..f3c7bfba0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -151,18 +151,18 @@ name = "Fixed" showcontent = true [[tool.towncrier.type]] -directory = "dependencies" -name = "Dependencies" +directory = "documentation" +name = "Documentation" showcontent = true [[tool.towncrier.type]] -directory = "miscellaneous" -name = "Miscellaneous" +directory = "test" +name = "Test" showcontent = true [[tool.towncrier.type]] -directory = "documentation" -name = "Documentation" +directory = "dependencies" +name = "Dependencies" showcontent = true [[tool.towncrier.type]] @@ -171,6 +171,6 @@ name = "Maintenance" showcontent = true [[tool.towncrier.type]] -directory = "test" -name = "Test" -showcontent = true +directory = "miscellaneous" +name = "Miscellaneous" +showcontent = true \ No newline at end of file From 60fb034a0020c19228d3280ce2e24185fa2c9439 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Wed, 5 Mar 2025 13:45:06 +0000 Subject: [PATCH 09/13] chore: adding changelog file 639.miscellaneous.md [dependabot-skip] --- doc/changelog.d/changelog_template.jinja | 39 +++++++++++++----------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/doc/changelog.d/changelog_template.jinja b/doc/changelog.d/changelog_template.jinja index 0e90e56c3..3ca0146b8 100644 --- a/doc/changelog.d/changelog_template.jinja +++ b/doc/changelog.d/changelog_template.jinja @@ -1,17 +1,22 @@ -{% if sections[""] %} -{% for category, val in definitions.items() if category in sections[""] %} - -{{ definitions[category]['name'] }} -{% set underline = '^' * definitions[category]['name']|length %} -{{ underline }} - -{% for text, values in sections[""][category].items() %} -- {{ text }} {{ values|join(', ') }} -{% endfor %} - -{% endfor %} -{% else %} -No significant changes. - - -{% endif %} +{% if sections[""] %} + +.. tab-set:: + +{%+ for category, val in definitions.items() if category in sections[""] %} + + .. tab-item:: {{ definitions[category]['name'] }} + + .. list-table:: + :header-rows: 0 + :widths: auto + +{% for text, values in sections[""][category].items() %} + * - {{ text }} + - {{ values|join(', ') }} + +{% endfor %} +{% endfor %} + +{% else %} +No significant changes. +{% endif %} From 664c12f94ea1b010d933bffab3395ee197665f8f Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Wed, 5 Mar 2025 14:59:26 +0100 Subject: [PATCH 10/13] fix: remove sdist entry --- pyproject.toml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f3c7bfba0..9ea56cb31 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,16 +71,6 @@ changelog = [ [project.entry-points."sphinx.html_themes"] "ansys_sphinx_theme" = "ansys_sphinx_theme" - -#[tool.flit.sdist] -#include = [ -# "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/layout.html", -# "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/components/breadcrumbs.html", -# "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/theme.conf", -# "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/_templates/", -# "src/ansys_sphinx_theme/theme/ansys_sphinx_theme/static/", -#] - [project.urls] Home = "https://sphinxdocs.ansys.com/" Source = "https://github.com/ansys/ansys-sphinx-theme" From 822908d4f1a9ed1f2df07b1429f58340166453a2 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Wed, 5 Mar 2025 14:00:48 +0000 Subject: [PATCH 11/13] chore: adding changelog file 639.maintenance.md [dependabot-skip] --- doc/changelog.d/{639.miscellaneous.md => 639.maintenance.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/changelog.d/{639.miscellaneous.md => 639.maintenance.md} (100%) diff --git a/doc/changelog.d/639.miscellaneous.md b/doc/changelog.d/639.maintenance.md similarity index 100% rename from doc/changelog.d/639.miscellaneous.md rename to doc/changelog.d/639.maintenance.md From 2354e1014bb3cb312b4041003fdfa9d619ee0422 Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Wed, 5 Mar 2025 17:11:22 +0100 Subject: [PATCH 12/13] fix: package.json file --- .gitignore | 3 ++- package-lock.json | 11 ----------- pyproject.toml | 4 ++-- 3 files changed, 4 insertions(+), 14 deletions(-) delete mode 100644 package-lock.json diff --git a/.gitignore b/.gitignore index 09103371e..98e1418fd 100644 --- a/.gitignore +++ b/.gitignore @@ -166,4 +166,5 @@ doc/source/examples/api/ # node modules and env node_modules/ -.nodeenv/ \ No newline at end of file +.nodeenv/ +package-lock.json \ No newline at end of file diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 3e8391ab9..000000000 --- a/package-lock.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "ansys_sphinx_theme", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "ansys_sphinx_theme", - "devDependencies": {} - } - } -} diff --git a/pyproject.toml b/pyproject.toml index 9ea56cb31..72729c33a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,11 @@ [build-system] requires = [ - "sphinx-theme-builder @ https://github.com/pradyunsg/sphinx-theme-builder/archive/87214d0671c943992c05e3db01dca997e156e8d6.zip", + "sphinx-theme-builder >= 0.2.0b2", ] build-backend = "sphinx_theme_builder" [tool.sphinx-theme-builder] -node-version = "22.9.0" +node-version = "22.14.0" theme-name = "ansys_sphinx_theme" [project] From b6aa45fe8519a3168c4c40d2355d66a01e7fcaa0 Mon Sep 17 00:00:00 2001 From: Revathy Venugopal <104772255+Revathyvenugopal162@users.noreply.github.com> Date: Thu, 6 Mar 2025 09:35:38 +0100 Subject: [PATCH 13/13] Update pyproject.toml Co-authored-by: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 72729c33a..91aba3f76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "sphinx-theme-builder >= 0.2.0b2", + "sphinx-theme-builder >= 0.2.0b2,<1", ] build-backend = "sphinx_theme_builder"