diff --git a/.gitignore b/.gitignore index c8d5cc9e04..32d3851084 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,10 @@ # MkDocs build dir site/ +# Python bytecode generated while running MkDocs hooks +__pycache__/ +*.py[cod] + # OS generated files .DS_Store @@ -28,4 +32,3 @@ tools/*.csv #Ignore vscode AI rules .github/instructions/codacy.instructions.md - diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e36cc8569c..716ef7588a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,6 +3,7 @@ You're welcome to make fixes and changes to the documentation. Here are a few steps to get you going: - [Authoring documentation pages](#authoring-documentation-pages) +- [Working on the documentation theme](#working-on-the-documentation-theme) - [Releasing a new Codacy Self-hosted documentation version](#releasing-a-new-codacy-self-hosted-documentation-version) - [Updating an existing Codacy Self-hosted documentation version](#updating-an-existing-codacy-self-hosted-documentation-version) - [Applying documentation hotfixes to existing chart releases](#applying-documentation-hotfixes-to-existing-chart-releases) @@ -39,6 +40,75 @@ You're welcome to make fixes and changes to the documentation. Here are a few st mkdocs serve ``` +### Working on the documentation theme + +The documentation uses the installed `mkdocs-material` package with a small, +Codacy-owned theme layer in [`theme/`](theme/). This is +the current theme source of truth. Do not copy, modify, or revive the legacy +`submodules/codacy-mkdocs-material` clone when changing this site's theme. + +The theme is intentionally plain CSS and minimal Jinja overrides: + +- [`theme/stylesheets/tokens.css`](theme/stylesheets/tokens.css) + defines the Codacy color tokens and Material color mappings. +- The visual styling lives in [`theme/stylesheets/`](theme/stylesheets/), + split by concern (`base`, `header`, `navigation`, `content`, `home`, + `footer`, `layout`, `responsive`) and loaded in that order via `extra_css`. + The files are plain, comment-free CSS; keep a rule in the file that matches + its concern, and keep `extra_css` in cascade order (it layers over the + Material package, so order and specificity are what make an override win). +- [`theme/main.html`](theme/main.html) and its + [`partials/`](theme/partials/) retain only the overrides and + integrations that Codacy needs. +- [`mkdocs.yml`](mkdocs.yml) connects this layer through `theme.custom_dir` + and loads the small supporting browser scripts and stylesheets. + +Several partials under [`theme/partials/`](theme/partials/) (for example +`nav-item.html`, `header.html`, `search.html`, and `toc.html`) are derived from +the equivalent templates in the `mkdocs-material` version pinned in +[`requirements.txt`](requirements.txt) and then trimmed to Codacy's needs. They +are coupled to that version's markup, CSS class names, and JavaScript component +contracts, so **bumping `mkdocs-material` requires re-diffing these partials +against the new upstream templates** and re-testing search, the palette toggle, +and navigation. Pin the package to an exact version and treat an upgrade as a +deliberate task, not an incidental dependency bump. + +There is no front-end build step. Edit the CSS, Jinja partials, or supporting +JavaScript directly, then use the normal MkDocs preview: + +```bash +mkdocs serve +``` + +The theme self-hosts the Inter and Roboto Mono font files under +`theme/assets/fonts/`; it doesn't contact a third-party font service. Keep the +font license beside those assets when updating them. + +Icons are provided by Ionicons, also vendored locally under +`theme/assets/vendor/ionicons/` (the runtime loader plus only the SVGs the theme +references) so the docs render fully offline and don't depend on a third-party +CDN — this matters for Self-hosted installations. When you add an +`` or a `sidebar_icons` entry, copy the matching +`svg/.svg` from the Ionicons package into that folder; unreferenced icons +are intentionally not vendored. Keep the Ionicons license beside the assets. + +The `theme/hooks/image_metadata.py` hook adds intrinsic dimensions and safe +loading hints to local documentation images at build time. Authors normally use +standard Markdown image syntax; explicit HTML image attributes are preserved +when a page needs an exception. + +Before opening a pull request that changes the theme, build with warnings +treated as errors and check representative pages in the local preview: + +```bash +mkdocs build --strict +``` + +Check a Cloud page and, when relevant, a Self-hosted page. Also check light and +dark color schemes, desktop and narrow mobile widths, search, the version +picker, and any changed content component. Preserve analytics, feedback, +preview and Self-hosted notices, source metadata, and existing URLs. + ### Markdown conventions Follow these Markdown conventions when editing the documentation: diff --git a/docs/account/emails.md b/docs/account/emails.md index be0bad6bf5..749da99675 100644 --- a/docs/account/emails.md +++ b/docs/account/emails.md @@ -8,7 +8,7 @@ To manage the email addresses associated with your account and your email notifi Codacy automatically links to your Codacy account the email addresses from the Git provider associated with your current session. On the **Emails** page, you can verify which email addresses are linked to your Codacy account. -!!! notes +!!! note - For **GitHub**, if you have [email privacy enabled](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address?platform=mac#about-commit-email-addresses) on the provider, Codacy doesn't show your private emails and uses another available email address when displaying your personal details on lists, search filters, or activity. - Codacy doesn't allow you to have one email associated with more than one GitHub account. You can manage your [associated emails in the provider GitHub](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/adding-an-email-address-to-your-github-account). diff --git a/docs/assets/images/codacy-docs-logo-light.svg b/docs/assets/images/codacy-docs-logo-light.svg new file mode 100644 index 0000000000..2c5cfc0408 --- /dev/null +++ b/docs/assets/images/codacy-docs-logo-light.svg @@ -0,0 +1 @@ + diff --git a/docs/assets/images/codacy-docs-logo.svg b/docs/assets/images/codacy-docs-logo.svg index 12cd5df14e..6728340b6e 100644 --- a/docs/assets/images/codacy-docs-logo.svg +++ b/docs/assets/images/codacy-docs-logo.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/docs/assets/javascripts/docs-theme.js b/docs/assets/javascripts/docs-theme.js new file mode 100644 index 0000000000..88d5b6e072 --- /dev/null +++ b/docs/assets/javascripts/docs-theme.js @@ -0,0 +1,333 @@ +var searchReturnTarget; +var tocScrollCleanup; + +function openSearch(opener) { + var searchToggle = document.querySelector("#__search"); + var trigger = opener || document.querySelector("[data-search-trigger]"); + var drawerToggle = document.querySelector("#__drawer"); + if (!searchToggle) { + return; + } + + if (!searchToggle.checked) { + if (drawerToggle && drawerToggle.checked) { + drawerToggle.click(); + } + searchToggle.click(); + } + + if (trigger) { + searchReturnTarget = trigger; + trigger.setAttribute("aria-expanded", "true"); + } + + window.setTimeout(function () { + var input = document.querySelector(".md-search__input"); + if (input) { + input.focus(); + } + }, 0); +} + +function closeSearch() { + var searchToggle = document.querySelector("#__search"); + + if (searchToggle && searchToggle.checked) { + searchToggle.click(); + } +} + +function getVisibleFocusableElements(container) { + if (!container) { + return []; + } + + return Array.from(container.querySelectorAll("*")).filter(function (element) { + return element.tabIndex >= 0 && element.offsetParent !== null; + }); +} + +function initializeDocsTheme() { + document.querySelectorAll("[data-copyright-year]").forEach(function (element) { + element.textContent = String(new Date().getFullYear()); + }); + + if (tocScrollCleanup) { + tocScrollCleanup(); + tocScrollCleanup = undefined; + } + + var trigger = document.querySelector("[data-search-trigger]"); + var searchTriggers = document.querySelectorAll("[data-search-trigger]"); + var shortcut = document.querySelector("[data-search-shortcut]"); + if (shortcut && !/Mac|iPhone|iPad/.test(navigator.platform)) { + shortcut.textContent = "Ctrl K"; + } + // The header search trigger persists across navigation.instant page loads, + // so bind each trigger once; otherwise every navigation stacks another + // handler on the same element. + searchTriggers.forEach(function (searchTrigger) { + if (searchTrigger.dataset.docsSearchTriggerInitialized) { + return; + } + searchTrigger.dataset.docsSearchTriggerInitialized = "true"; + searchTrigger.addEventListener("click", function (event) { + event.preventDefault(); + openSearch(searchTrigger); + }); + searchTrigger.addEventListener("keydown", function (event) { + if (event.key === "Enter" || event.key === " ") { + event.preventDefault(); + openSearch(searchTrigger); + } + }); + }); + + var drawerToggle = document.querySelector("#__drawer"); + var drawerTrigger = document.querySelector("[data-drawer-trigger]"); + var drawer = document.querySelector(".md-sidebar--primary"); + if (drawer) { + drawer.id = "docs-navigation"; + } + // With navigation.instant, Material keeps the header and drawer mounted + // while emitting document$ for each page. Only bind these persistent + // controls once; otherwise every navigation adds another click handler + // and a hamburger tap toggles the checkbox an even number of times. + if (drawerToggle && drawerTrigger && drawer && !drawerTrigger.dataset.docsDrawerInitialized) { + drawerTrigger.dataset.docsDrawerInitialized = "true"; + let suppressDrawerKeyboardClick = false; + drawerTrigger.addEventListener("keydown", function (event) { + if (event.key === "Enter" || event.key === " ") { + event.preventDefault(); + suppressDrawerKeyboardClick = true; + drawerToggle.click(); + window.setTimeout(function () { + suppressDrawerKeyboardClick = false; + }, 250); + } + }); + drawerTrigger.addEventListener("click", function (event) { + event.preventDefault(); + if (suppressDrawerKeyboardClick && event.detail === 0) { + return; + } + drawerToggle.click(); + }); + drawerToggle.addEventListener("change", function () { + drawerTrigger.setAttribute("aria-expanded", String(drawerToggle.checked)); + drawerTrigger.setAttribute("aria-label", drawerToggle.checked ? "Close navigation" : "Open navigation"); + document.querySelectorAll(".md-content, .md-sidebar--secondary, footer").forEach(function (element) { + element.toggleAttribute("inert", drawerToggle.checked); + }); + + if (drawerToggle.checked) { + window.setTimeout(function () { + var firstLink = drawer.querySelector(".md-nav__list a[href]"); + if (firstLink) { + firstLink.focus(); + } + }, 0); + } else { + drawerTrigger.focus(); + } + }); + } + + var breadcrumb = document.querySelector(".md-path"); + if (breadcrumb) { + breadcrumb.setAttribute("aria-label", "Breadcrumb"); + } + + document.querySelectorAll(".md-nav--primary a.md-nav__link--active[href]").forEach(function (link) { + if (new URL(link.href, window.location.href).pathname === window.location.pathname) { + link.setAttribute("aria-current", "page"); + } + }); + + var pageOutline = document.querySelector(".md-sidebar--secondary .md-nav--secondary"); + if (pageOutline && !pageOutline.querySelector("a[href]")) { + pageOutline.hidden = true; + } + + var searchToggle = document.querySelector("#__search"); + if (searchToggle && trigger && !searchToggle.dataset.docsSearchToggleInitialized) { + searchToggle.dataset.docsSearchToggleInitialized = "true"; + searchToggle.addEventListener("change", function () { + searchTriggers.forEach(function (searchTrigger) { + searchTrigger.setAttribute("aria-expanded", String(searchToggle.checked)); + }); + + document.querySelectorAll(".md-main, footer").forEach(function (element) { + element.toggleAttribute("inert", searchToggle.checked); + }); + + if (!searchToggle.checked) { + (searchReturnTarget || trigger).focus(); + } + }); + } + + var searchInput = document.querySelector(".md-search__input"); + if (searchInput && !searchInput.dataset.docsSearchInputInitialized) { + searchInput.dataset.docsSearchInputInitialized = "true"; + searchInput.addEventListener("input", function (event) { + // Material listens for keyup. Mirroring input events also covers + // paste, autofill, and browser automation without duplicating + // queries because Material de-duplicates unchanged values. + if (event.isComposing) { + return; + } + searchInput.dispatchEvent(new Event("keyup", { bubbles: true })); + }); + searchInput.addEventListener("compositionend", function () { + searchInput.dispatchEvent(new Event("keyup", { bubbles: true })); + }); + } + + document.querySelectorAll(".md-typeset table").forEach(function (table) { + if (table.classList.contains("highlighttable") || table.closest(".highlight, .md-typeset__scrollwrap") || table.parentElement.classList.contains("docs-table-scroll")) { + return; + } + + var wrapper = document.createElement("div"); + wrapper.className = "docs-table-scroll"; + table.parentNode.insertBefore(wrapper, table); + wrapper.appendChild(table); + }); + + // Material's legacy scroll spy activates a heading only once it clears the + // header. The outline is more useful when it reflects the reading position, + // so activate the latest heading that has crossed 40% of the viewport. + const tocLinks = Array.from(document.querySelectorAll(".md-sidebar--secondary .md-nav__link")).filter(function (link) { + var target = new URL(link.href, window.location.href); + return target.pathname === window.location.pathname && target.hash; + }); + if (tocLinks.length) { + // Material keeps its own active-link state. Mark the custom scroll spy + // as authoritative so the theme can suppress Material's stale state + // when the two updates occur in different animation frames. + document.documentElement.classList.add("docs-toc-scrollspy"); + + const updateTableOfContents = function () { + const threshold = window.innerHeight * 0.4; + let activeLink = tocLinks[0]; + + tocLinks.forEach(function (link) { + var id = decodeURIComponent(link.hash.slice(1)); + var heading = id ? document.getElementById(id) : null; + if (heading && heading.getBoundingClientRect().top <= threshold) { + activeLink = link; + } + }); + + tocLinks.forEach(function (link) { + link.classList.toggle("docs-toc-active", link === activeLink); + }); + }; + + let tocFrame; + const onTocScroll = function () { + window.cancelAnimationFrame(tocFrame); + tocFrame = window.requestAnimationFrame(updateTableOfContents); + }; + window.addEventListener("scroll", onTocScroll, { passive: true }); + window.addEventListener("resize", updateTableOfContents); + tocScrollCleanup = function () { + window.cancelAnimationFrame(tocFrame); + window.removeEventListener("scroll", onTocScroll); + window.removeEventListener("resize", updateTableOfContents); + document.documentElement.classList.remove("docs-toc-scrollspy"); + }; + window.setTimeout(updateTableOfContents, 0); + } + + // Frame block screenshots the way Mintlify does. Only images that stand + // alone in their own paragraph and are wide enough to be a screenshot get a + // border/rounded corners — inline badges, emoji, and card icons are left + // untouched by the size threshold and the empty-paragraph requirement. + document.querySelectorAll(".md-typeset img").forEach(function (img) { + if (img.closest(".tc-icon, table")) { + return; + } + + var paragraph = img.closest("p"); + var declaredWidth = Number(img.getAttribute("width")) || 0; + var frame = function () { + var intrinsicWidth = img.naturalWidth || declaredWidth; + if (intrinsicWidth && intrinsicWidth < 280) { + return; + } + img.classList.add("docs-image"); + if (paragraph && paragraph.textContent.trim() === "" && paragraph.querySelectorAll("img").length === 1) { + paragraph.classList.add("docs-image-block"); + } + }; + + if (declaredWidth >= 280 || (img.complete && img.naturalWidth)) { + frame(); + } else { + img.addEventListener("load", frame, { once: true }); + } + }); +} + +if (typeof document$ !== "undefined" && document$.subscribe) { + document$.subscribe(initializeDocsTheme); +} else { + window.addEventListener("DOMContentLoaded", initializeDocsTheme); +} + +window.addEventListener("keydown", function (event) { + if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "k") { + const target = event.target; + if (target && (target.matches("input, textarea, select") || target.isContentEditable)) { + return; + } + event.preventDefault(); + openSearch(); + } + + if (event.key === "Escape") { + closeSearch(); + const drawerToggle = document.querySelector("#__drawer"); + if (drawerToggle && drawerToggle.checked) { + drawerToggle.click(); + } + } + + const searchToggle = document.querySelector("#__search"); + if (event.key === "Tab" && searchToggle && searchToggle.checked) { + const dialog = document.querySelector("#docs-search"); + const focusable = getVisibleFocusableElements(dialog); + if (focusable.length) { + const first = focusable[0]; + const last = focusable[focusable.length - 1]; + if (event.shiftKey && document.activeElement === first) { + event.preventDefault(); + last.focus(); + } else if (!event.shiftKey && document.activeElement === last) { + event.preventDefault(); + first.focus(); + } + } + } + + if (event.key === "Tab") { + const drawerToggle = document.querySelector("#__drawer"); + if (drawerToggle && drawerToggle.checked) { + const drawer = document.querySelector("#docs-navigation"); + const drawerFocusable = getVisibleFocusableElements(drawer); + if (drawerFocusable.length) { + const drawerFirst = drawerFocusable[0]; + const drawerLast = drawerFocusable[drawerFocusable.length - 1]; + if (event.shiftKey && document.activeElement === drawerFirst) { + event.preventDefault(); + drawerLast.focus(); + } else if (!event.shiftKey && document.activeElement === drawerLast) { + event.preventDefault(); + drawerFirst.focus(); + } + } + } + } +}, true); diff --git a/docs/assets/javascripts/version-select.js b/docs/assets/javascripts/version-select.js index 272a1ca9f9..05f31167e5 100644 --- a/docs/assets/javascripts/version-select.js +++ b/docs/assets/javascripts/version-select.js @@ -1,4 +1,25 @@ -window.addEventListener("DOMContentLoaded", function() { +function initializeVersionSelector() { + var selector = document.querySelector("#version-selector"); + if (!selector || selector.dataset.versionSelectorBound === "true") { + return; + } + selector.dataset.versionSelectorBound = "true"; + var selectorScrollPosition; + var preserveScrollPosition = function() { + if (!selectorScrollPosition) { + return; + } + window.scrollTo(selectorScrollPosition.left, selectorScrollPosition.top); + }; + selector.addEventListener("pointerdown", function() { + selectorScrollPosition = { left: window.scrollX, top: window.scrollY }; + }); + selector.addEventListener("focus", function() { + window.requestAnimationFrame(preserveScrollPosition); + }); + selector.addEventListener("blur", function() { + selectorScrollPosition = undefined; + }); window.versionPages = {}; var VERSION = window.location.pathname.split("/")[1]; var VERSION_LATEST = "latest"; @@ -9,26 +30,39 @@ window.addEventListener("DOMContentLoaded", function() { } function populateVersionSitemap(version) { + if (window.versionPages[version]) { + return Promise.resolve(); + } var versionPath = version === VERSION_LATEST ? "" : "/" + version; window.versionPages[version] = []; - var xhrSitemap = new XMLHttpRequest(); - var sitemapURL = window.location.origin + versionPath + "/sitemap.xml"; - xhrSitemap.open("GET", sitemapURL); - xhrSitemap.onload = function() { - var xmlLoc = this.responseXML.getElementsByTagName("loc"); - var nodeText = []; - - for (var index = 0; index < xmlLoc.length; index++) { - var element = xmlLoc[index]; - nodeText.push(element.textContent); - } - var prefix = nodeText[0].slice(0,-1); - window.versionPages[version] = nodeText.map(function(e) { - return removePrefix(e, prefix); - }); - }; - xhrSitemap.send(); + return new Promise(function(resolve) { + var xhrSitemap = new XMLHttpRequest(); + var sitemapURL = window.location.origin + versionPath + "/sitemap.xml"; + xhrSitemap.open("GET", sitemapURL); + xhrSitemap.onload = function() { + var xmlLoc = this.responseXML && this.responseXML.getElementsByTagName("loc"); + var nodeText = []; + + if (this.status >= 200 && this.status < 300 && xmlLoc) { + for (var index = 0; index < xmlLoc.length; index++) { + nodeText.push(xmlLoc[index].textContent); + } + } + + if (nodeText.length) { + const prefix = nodeText[0].slice(0, -1); + window.versionPages[version] = nodeText.map(function(e) { + return removePrefix(e, prefix); + }); + } + resolve(); + }; + xhrSitemap.onerror = resolve; + xhrSitemap.ontimeout = resolve; + xhrSitemap.timeout = 10000; + xhrSitemap.send(); + }); } function makeSelect(options, selected) { @@ -124,41 +158,34 @@ window.addEventListener("DOMContentLoaded", function() { function fetchVersions(callback) { var xhr = new XMLHttpRequest(); + var fallback = function() { + callback([{ "version": "latest", "title": "Cloud (Latest)", "aliases": [] }]); + }; // Obtain JSON listing all available versions xhr.open("GET", window.location.origin + "/versions.json"); xhr.onload = function() { - if (this.status === 404) { - // Use mock JSON as fallback - var staticJSON = [{"version": "latest", "title": "Cloud (Latest)", "aliases": []}]; - callback(staticJSON) - } else { - callback(JSON.parse(this.responseText)); + if (this.status < 200 || this.status >= 300) { + fallback(); + return; + } + try { + const versions = JSON.parse(this.responseText); + if (!Array.isArray(versions) || !versions.length) { + fallback(); + return; + } + callback(versions); + } catch { + fallback(); } }; + xhr.onerror = fallback; + xhr.ontimeout = fallback; + xhr.timeout = 10000; xhr.send(); } - function placeSelectElement(ele) { - // Place the HTML select element in the DOM - var container = document.createElement("div"); - container.id = "version-selector"; - container.className = "version-select-container"; - - var span = document.createElement("span"); - span.innerText = "Version"; - - container.appendChild(span); - container.appendChild(ele); - - var article = document.querySelector(".search-cta-top > .md-search"); - article.insertAdjacentElement("afterend", container); - } - function generateVersionSwitcher(versionJSON) { - versionJSON.forEach(function(e) { - populateVersionSitemap(e.version); - }); - // Identify which is the current version var currentVersion = versionJSON.find(function(i) { return i.version === VERSION || @@ -174,31 +201,41 @@ window.addEventListener("DOMContentLoaded", function() { } // Build the HTML select element - var select = makeSelect(versionJSON.map(function(i) { + var generatedSelect = makeSelect(versionJSON.map(function(i) { return {text: i.title, value: i.version}; }), currentVersion.version); + selector.replaceChildren.apply(selector, Array.prototype.slice.call(generatedSelect.options)); + var select = selector; + select.disabled = false; // Navigate to the selected version select.addEventListener("change", function() { + var targetVersion = this.value; var currentPath = window.location.pathname; - var targetVersionPath = this.value === VERSION_LATEST ? "" : "/" + this.value; + var targetVersionPath = targetVersion === VERSION_LATEST ? "" : "/" + targetVersion; if(currentVersion.version !== VERSION_LATEST) { currentPath = removePrefix(window.location.pathname, "/" + currentVersion.version); } - if(window.versionPages[this.value].includes(currentPath)) { - window.location.href = window.location.origin + targetVersionPath + currentPath; - } else { - window.location.href = window.location.origin + targetVersionPath; - } + select.disabled = true; + populateVersionSitemap(targetVersion).then(function() { + if(window.versionPages[targetVersion].includes(currentPath)) { + window.location.href = window.location.origin + targetVersionPath + currentPath; + } else { + window.location.href = window.location.origin + targetVersionPath; + } + }); }); select.title = "For Codacy Cloud, select Latest.\nFor Codacy Self-Hosted, select the version of your Codacy installation."; - - // Place the HTML select element in the DOM - placeSelectElement(select); } fetchVersions(generateVersionSwitcher); -}); +} + +if (typeof document$ !== "undefined" && document$.subscribe) { + document$.subscribe(initializeVersionSelector); +} else { + window.addEventListener("DOMContentLoaded", initializeVersionSelector); +} diff --git a/docs/assets/stylesheets/version-select.css b/docs/assets/stylesheets/version-select.css deleted file mode 100644 index 52b11932a5..0000000000 --- a/docs/assets/stylesheets/version-select.css +++ /dev/null @@ -1,45 +0,0 @@ -.version-select-container > span { - color: #4c6083; - font-size: 0.6rem; - margin-right: 0.6rem; -} - -.version-select-container .select-css { - display: inline-block; - cursor: pointer; - height: 2rem; - font-size: 0.7rem; - box-sizing: border-box; - color: #354b71; - padding: 0.5rem; - padding-right: 1.2rem; - margin: 0; - border: 0; - border-radius: 0.25em; - -moz-appearance: none; - -webkit-appearance: none; - appearance: none; - background-color: #e5ecf5; - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='451.847' height='451.847'%3E%3Cpath fill='%23354B71' d='M225.923 354.706c-8.098 0-16.195-3.092-22.369-9.263L9.27 151.157c-12.359-12.359-12.359-32.397 0-44.751 12.354-12.354 32.388-12.354 44.748 0l171.905 171.915 171.906-171.909c12.359-12.354 32.391-12.354 44.744 0 12.365 12.354 12.365 32.392 0 44.751L248.292 345.449c-6.177 6.172-14.274 9.257-22.369 9.257z'/%3E%3C/svg%3E"); - background-repeat: no-repeat, repeat; - background-position: right 0.6em top 50%, 0 0; - background-size: 0.55em auto, 100%; -} - -.version-select-container .select-css::-ms-expand { - display: none; -} - -.version-select-container .select-css:hover { - background-color: #c9d8ef; -} - -.version-select-container .select-css option { - font-weight: normal; -} - -@media screen and (max-width: 719px) { - .version-select-container .select-css { - max-width: 38vw; - } -} diff --git a/docs/codacy-cloud-cli/index.md b/docs/codacy-cloud-cli/index.md index 5d77c37a37..65b1ab7cb3 100644 --- a/docs/codacy-cloud-cli/index.md +++ b/docs/codacy-cloud-cli/index.md @@ -8,7 +8,7 @@ The Codacy Cloud CLI gives you a fast terminal interface to your Codacy data. Ad Pair it with [Codacy Skills](#install-the-codacy-skills) to interact with your Codacy data in plain language directly from your AI assistant. -
+
## Installation diff --git a/docs/codacy-guardrails/codacy-guardrails-getting-started.md b/docs/codacy-guardrails/codacy-guardrails-getting-started.md index 8189c86512..9aa15f3ab9 100644 --- a/docs/codacy-guardrails/codacy-guardrails-getting-started.md +++ b/docs/codacy-guardrails/codacy-guardrails-getting-started.md @@ -9,7 +9,7 @@ Besides real-time AI code scanning, Guardrails users can now prompt all their Co -# VSCode-based IDEs +## VSCode-based IDEs ## Prerequisites @@ -235,7 +235,7 @@ If your proxy uses a custom CA certificate, the extension has an extra setting a ![Codacy proxy CA certificate path setting](images/codacy-proxy-ca-cert-path.png) -# JetBrains IDEs +## JetBrains IDEs ### Supported Operating Systems @@ -343,4 +343,4 @@ Install the guidelines by clicking on **Install AiAgent Guidelines** on the Coda ### 6. Start using your Agent and Codacy will be there with you! -![Codacy Guardrails running in JetBrains](images/codacy-guardrails-junie.png) \ No newline at end of file +![Codacy Guardrails running in JetBrains](images/codacy-guardrails-junie.png) diff --git a/docs/getting-started/codacy-quickstart.md b/docs/getting-started/codacy-quickstart.md index f4e25fa0ee..09788e13c8 100644 --- a/docs/getting-started/codacy-quickstart.md +++ b/docs/getting-started/codacy-quickstart.md @@ -9,7 +9,7 @@ Codacy is an automated code quality and coverage platform that analyzes your sou Check out our product demo for an overview of Codacy's main features (recorded on November, 2025): -
+
By integrating with your Git provider, Codacy keeps track of your team’s work, analyzes relevant commits, highlights problems, suggests improvements, and protects your codebase from unwelcome changes. From organization and repository level to individual files, pull requests, and commits, Codacy monitors the following metrics across your projects: diff --git a/docs/getting-started/supported-languages-and-tools.md b/docs/getting-started/supported-languages-and-tools.md index c5f68318cc..14b48f2948 100644 --- a/docs/getting-started/supported-languages-and-tools.md +++ b/docs/getting-started/supported-languages-and-tools.md @@ -25,18 +25,18 @@ The table below lists all languages that Codacy supports and the corresponding t !!! important Codacy runs security and other analysis tools when code changes are pushed to your repositories. These tools don't scan code for issues continuously. - +
- - + + - - - + + + diff --git a/docs/index.md b/docs/index.md index 0803bda357..0d00b61b5a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,66 +2,69 @@ description: Documentation homepage for the Codacy automated code review tool. --- -# Documentation home +# Codacy documentation + +Everything you need to set up Codacy, integrate it into your workflow, and get more value from your code-quality data. +{ .docs-home-lead } -

Most popular topics

+ \ No newline at end of file + diff --git a/docs/organizations/managing-security-and-risk.md b/docs/organizations/managing-security-and-risk.md index 8262ebf251..cacd5ad148 100644 --- a/docs/organizations/managing-security-and-risk.md +++ b/docs/organizations/managing-security-and-risk.md @@ -113,7 +113,7 @@ The same Common Vulnerability and Exposure can be classified with different seve To share the current view of the overview or findings page, click the **Copy URL** button in the top right-hand corner of the page. This action copies the URL with the current filters applied to the clipboard. -!!! Important " [**Segments**](../segments) filter won't be considered when sharing the filtered view" +!!! important " [**Segments**](../segments) filter won't be considered when sharing the filtered view" ## Ignoring findings {: id="ignoring-findings"} @@ -129,7 +129,7 @@ From Codacy's standpoint, ignoring a finding means it will be removed from the m !!! info "[Jira](./integrations/jira-integration.md) findings can't be ignored in Codacy. You should closed the issue directly in Jira." -!!! Important "Ignoring findings detected on [Git repositories](#opening-and-closing-items) will also [ignore the issue at the repository level](../repositories/issues.md#ignoring-and-managing-issues)." +!!! important "Ignoring findings detected on [Git repositories](#opening-and-closing-items) will also [ignore the issue at the repository level](../repositories/issues.md#ignoring-and-managing-issues)." You can still see **Ignored** findings in the [findings list](#item-list), by filtering for the **Ignored** status in the **Statuses** dropdown. You can assess which status a finding has at his overview, on the right top corner. @@ -141,7 +141,7 @@ Unignoring a finding reverts the effects of ignoring it. ![Security and risk management finding unignore](images/security-risk-management-finding-unignore.png) -!!! Important "Unignoring findings detected on [Git repositories](#opening-and-closing-items) will also [unignore the issue at the repository level](../repositories/issues.md#ignoring-and-managing-issues)." +!!! important "Unignoring findings detected on [Git repositories](#opening-and-closing-items) will also [unignore the issue at the repository level](../repositories/issues.md#ignoring-and-managing-issues)." !!! info "Ignoring and unignoring findings are [auditable actions](../organizations/audit-logs-for-organizations.md#organization)." @@ -839,4 +839,3 @@ If there is no last analysis date for an image tag, it means that the SBOM file !!! note Remember that scans run nightly (UTC). If you just uploaded the SBOM file, but need results immediately, consider using our [Codacy CLI v2](https://github.com/codacy/codacy-cli-v2) to run a local analysis to scan for any issues. - \ No newline at end of file diff --git a/docs/release-notes/index.md b/docs/release-notes/index.md index 92ec489feb..eaa7deaa42 100644 --- a/docs/release-notes/index.md +++ b/docs/release-notes/index.md @@ -2,7 +2,8 @@ rss_title: Codacy release notes RSS feed rss_href: /feed_rss_created.xml description: Index of release notes for Codacy Cloud and Codacy Self-hosted. -hide_toc: true +hide: + - toc --- # Codacy release notes @@ -16,7 +17,7 @@ For product updates that are in progress or planned [visit the Codacy public roa ## Codacy Cloud release notes {: id="cloud"} -2026 +### 2026 {.release-series} - [PHP_CodeSniffer Upgrade and Legacy Package Deprecations July, 2026](cloud/cloud-2026-07-remove-codesniffer-packages.md) - [Cloud June 2026](cloud/cloud-2026-06.md) @@ -29,7 +30,7 @@ For product updates that are in progress or planned [visit the Codacy public roa - [Cloud January 2026](cloud/cloud-2026-01.md) - [Adding GolangCI-Lint as new supported tool January, 2026](cloud/cloud-2026-01-adding-golangci-lint.md) -2025 +### 2025 {.release-series} - [Cloud December 2025](cloud/cloud-2025-12.md) - [Cloud November 2025](cloud/cloud-2025-11.md) @@ -46,7 +47,7 @@ For product updates that are in progress or planned [visit the Codacy public roa - [Cloud February 2025](cloud/cloud-2025-02.md) - [Cloud January 2025](cloud/cloud-2025-01.md) -2024 +### 2024 {.release-series} - [Cloud December 2024](cloud/cloud-2024-12.md) - [Cloud November 2024](cloud/cloud-2024-11.md) @@ -63,7 +64,7 @@ For product updates that are in progress or planned [visit the Codacy public roa - [Cloud January 2024](cloud/cloud-2024-01.md) - [Discontinuation of SSH keys for GitHub repositories January 15, 2024](cloud/cloud-2024-01-15-gh-repository-ssh-keys-discontinuation.md) -2023 +### 2023 {.release-series} - [Cloud December 2023](cloud/cloud-2023-12.md) - [Cloud November 2023](cloud/cloud-2023-11.md) @@ -82,7 +83,7 @@ For product updates that are in progress or planned [visit the Codacy public roa - [Cloud February 2023](cloud/cloud-2023-02.md) - [Cloud January 2023](cloud/cloud-2023-01.md) -2022 +### 2022 {.release-series} - [Cloud December 2022](cloud/cloud-2022-12.md) - [Cloud November 2022](cloud/cloud-2022-11.md) @@ -99,7 +100,7 @@ For product updates that are in progress or planned [visit the Codacy public roa - [Removal of PMD (Legacy) February 16, 2022](cloud/cloud-2022-02-16-pmd-legacy-removal.md) - [Cloud January 2022](cloud/cloud-2022-01.md) -2021 +### 2021 {.release-series} - [Cloud December 2021](cloud/cloud-2021-12.md) - [Cloud November 2021](cloud/cloud-2021-11.md) @@ -109,13 +110,13 @@ For product updates that are in progress or planned [visit the Codacy public roa - [Cloud August 2021](cloud/cloud-2021-08.md) - [Performing scheduled database maintenance July 3, 2021](cloud/cloud-2021-07-03-scheduled-db-maintenance.md) -2020 +### 2020 {.release-series} - [Deprecating HTTP headers for API tokens April 1, 2020](cloud/cloud-2020-04-01-deprecating-http-headers-for-api-tokens.md) - [Removal of NodeSecurity, GoLint, and SCSS Lint March 9, 2020](cloud/cloud-2020-03-09-nodesecurity-golint-scsslint-removal.md) - [Codacy now supports GitHub Apps February 2, 2020](cloud/cloud-2020-02-github-apps.md) -2019 +### 2019 {.release-series} - [Cloud November 15, 2019](cloud/cloud-2019-11-15.md) - [Cloud October 30, 2019](cloud/cloud-2019-10-30.md) @@ -129,7 +130,7 @@ For product updates that are in progress or planned [visit the Codacy public roa - [Bitbucket changes February 18, 2019](cloud/cloud-2019-02-18-bitbucket-changes.md) - [Cloud January 2, 2019](cloud/cloud-2019-01-02.md) -2018 +### 2018 {.release-series} - [Cloud November 16, 2018](cloud/cloud-2018-11-16.md) - [Cloud November 2, 2018](cloud/cloud-2018-11-02.md) @@ -138,58 +139,58 @@ For product updates that are in progress or planned [visit the Codacy public roa ## Codacy Self-hosted release notes {: id="self-hosted"} -v16 +### v16 {.release-series} - [v16.0.0](self-hosted/self-hosted-v16.0.0.md) (January, 2026) -v15 +### v15 {.release-series} - [v15.0.0](self-hosted/self-hosted-v15.0.0.md) (April 10, 2025) -v14 +### v14 {.release-series} - [v14.1.1](self-hosted/self-hosted-v14.1.1.md) (March 10, 2025) - [v14.0.0](self-hosted/self-hosted-v14.0.0.md) (June 26, 2024) -v13 +### v13 {.release-series} - [v13.0.0](self-hosted/self-hosted-v13.0.0.md) (November 23, 2023) -v12 +### v12 {.release-series} - [v12.0.0](self-hosted/self-hosted-v12.0.0.md) (July 20, 2023) -v11 +### v11 {.release-series} - [v11.0.0](self-hosted/self-hosted-v11.0.0.md) (April 20, 2023) -v10 +### v10 {.release-series} - [v10.0.0](self-hosted/self-hosted-v10.0.0.md) (February 3, 2023) -v9 +### v9 {.release-series} - [v9.0.0](self-hosted/self-hosted-v9.0.0.md) (September 23, 2022) -v8 +### v8 {.release-series} - [v8.1.0](self-hosted/self-hosted-v8.1.0.md) (June 17, 2022) - [v8.0.0](self-hosted/self-hosted-v8.0.0.md) (May 12, 2022) -v7 +### v7 {.release-series} - [v7.0.0](self-hosted/self-hosted-v7.0.0.md) (April 4, 2022) -v6 +### v6 {.release-series} - [v6.0.0](self-hosted/self-hosted-v6.0.0.md) (March 2, 2022) -v5 +### v5 {.release-series} - [v5.1.0](self-hosted/self-hosted-v5.1.0.md) (January 6, 2022) - [v5.0.0](self-hosted/self-hosted-v5.0.0.md) (December 17, 2021) -v4 +### v4 {.release-series} - [v4.4.0](self-hosted/self-hosted-v4.4.0.md) (October 12, 2021) - [v4.3.0](self-hosted/self-hosted-v4.3.0.md) (September 16, 2021) @@ -198,7 +199,7 @@ v4 - [v4.0.1](self-hosted/self-hosted-v4.0.1.md) (June 2, 2021) - [v4.0.0](self-hosted/self-hosted-v4.0.0.md) (May 18, 2021) -v3 +### v3 {.release-series} - [v3.5.1](self-hosted/self-hosted-v3.5.1.md) (June 1, 2021) - [v3.5.0](self-hosted/self-hosted-v3.5.0.md) (March 31, 2021) @@ -208,7 +209,7 @@ v3 - [v3.1.0](self-hosted/self-hosted-v3.1.0.md) (December 10, 2020) - [v3.0.0](self-hosted/self-hosted-v3.0.0.md) (November 2, 2020) -v2 +### v2 {.release-series} - [v2.2.1](self-hosted/self-hosted-v2.2.1.md) (October 22, 2020) - [v2.2.0](self-hosted/self-hosted-v2.2.0.md) (October 8, 2020) @@ -216,7 +217,7 @@ v2 - [v2.1.0](self-hosted/self-hosted-v2.1.0.md) (September 16, 2020) - [v2.0.0](self-hosted/self-hosted-v2.0.0.md) (August 18, 2020) -v1 +### v1 {.release-series} - [v1.5.0](self-hosted/self-hosted-v1.5.0.md) (July 20, 2020) - [v1.4.0](self-hosted/self-hosted-v1.4.0.md) (June 23, 2020) diff --git a/mkdocs.yml b/mkdocs.yml index 1fc74ce711..b17149ce15 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -3,7 +3,7 @@ site_name: "Codacy docs" site_description: "Documentation for the Codacy automated code review tool." site_url: "https://docs.codacy.com/" site_author: "support@codacy.com (Codacy Support)" -copyright: "© Codacy - Automated code review" +copyright: "© 2026Codacy - Automated code review" # Repository information repo_name: "codacy/docs" @@ -12,19 +12,52 @@ repo_url: "https://github.com/codacy/docs" # Theme configuration theme: name: "material" - custom_dir: "submodules/codacy-mkdocs-material/material" - font: false + # A small, plain-CSS theme layer over the installed Material package. + # It deliberately contains no vendored Material source or frontend build tooling. + custom_dir: "theme" + font: + text: "Inter" + code: "Roboto Mono" language: "en" favicon: "assets/images/favicon.ico" palette: - primary: "indigo" - accent: "indigo" + - media: "(prefers-color-scheme: light)" + scheme: "codacy-light" + primary: "custom" + accent: "custom" + toggle: + name: "Switch to dark mode" + - media: "(prefers-color-scheme: dark)" + scheme: "codacy-dark" + primary: "custom" + accent: "custom" + toggle: + name: "Switch to light mode" logo: "assets/images/codacy-docs-logo.svg" - features: [] + features: + - "search.suggest" + - "content.code.copy" + - "content.tabs.link" + - "navigation.instant" + - "navigation.path" extra_css: - - "assets/stylesheets/version-select.css" + - "stylesheets/fonts.css" + - "stylesheets/tokens.css" + - "stylesheets/base.css" + - "stylesheets/header.css" + - "stylesheets/navigation.css" + - "stylesheets/content.css" + - "stylesheets/home.css" + - "stylesheets/footer.css" + - "stylesheets/layout.css" + - "stylesheets/responsive.css" extra_javascript: - "assets/javascripts/version-select.js" + - "assets/javascripts/docs-theme.js" + +# Reserve image space and defer below-the-fold screenshots without a frontend build step. +hooks: + - "theme/hooks/image_metadata.py" # Extra variables # https://github.com/rosscdh/mkdocs-markdownextradata-plugin @@ -35,6 +68,25 @@ extra: user_feedback: "true" community_url: "https://community.codacy.com/" support_email: "support@codacy.com" + # Ionicons displayed for top-level entries in the navigation sidebar. + sidebar_icons: + "Documentation home": "home-outline" + "Getting started": "rocket-outline" + "Codacy Guardrails (IDE Extension)": "shield-checkmark-outline" + "Codacy Cloud CLI": "terminal-outline" + "Codacy AI": "sparkles-outline" + "Repositories on Codacy": "folder-open-outline" + "Configuring your repositories": "settings-outline" + "Organizations": "people-outline" + "Enterprise Cloud": "business-outline" + "Your account": "person-circle-outline" + "Codacy API": "code-slash-outline" + "Managing Codacy Self-hosted": "server-outline" + "Troubleshooting and FAQs": "medical-outline" + "Release notes": "megaphone-outline" + "Special thanks": "heart-outline" + # Do not show a generated-by badge in the footer. + generator: false # Add pull request preview banner preview_branch: !ENV [MKDOCS_PREVIEW_BRANCH, false] preview_pull_request: !ENV [MKDOCS_PREVIEW_PULL_REQUEST, false] @@ -53,12 +105,17 @@ markdown_extensions: # Add attributes to the generated HTML elements, such as explicit ids for section titles # https://python-markdown.github.io/extensions/attr_list/ - attr_list + # Allow collapsible sections without introducing custom JavaScript + - pymdownx.details # Add syntax highlighting to code blocks # https://facelessuser.github.io/pymdown-extensions/extensions/highlight/ - pymdownx.highlight # Extended syntax for fenced code blocks # https://facelessuser.github.io/pymdown-extensions/extensions/superfences/ - pymdownx.superfences + # Support linked, accessible content tabs using Material's native markup + - pymdownx.tabbed: + alternate_style: true # Strip comments from the generated HTML # https://facelessuser.github.io/pymdown-extensions/extensions/striphtml/ - pymdownx.striphtml @@ -66,13 +123,14 @@ markdown_extensions: # https://python-markdown.github.io/extensions/toc/ - toc: permalink: "#" + title: "On this page" toc_depth: 2 # Plugins plugins: # Built-in plugin to activate the search # https://www.mkdocs.org/user-guide/configuration/#search - - search + - material/search # Exclude files to avoid warnings during the MkDocs build # https://github.com/apenwarr/mkdocs-exclude - exclude: diff --git a/requirements.txt b/requirements.txt index 0ec507ef19..bf71b890f3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,9 @@ mkdocs==1.6.1 mike==2.1.3 markdown==3.7 -mkdocs-material==8.2.3 +mkdocs-material==9.7.6 Jinja2==3.1.6 +defusedxml==0.7.1 # Markdown extensions Pygments==2.18.0 @@ -17,4 +18,4 @@ mkdocs-macros-plugin==1.2.0 mkdocs-meta-descriptions-plugin==3.0.0 mkdocs-monorepo-plugin==1.1.0 mkdocs-redirects==1.2.1 -mkdocs-rss-plugin==1.15.0 \ No newline at end of file +mkdocs-rss-plugin==1.15.0 diff --git a/theme/404.html b/theme/404.html new file mode 100644 index 0000000000..e506deb72a --- /dev/null +++ b/theme/404.html @@ -0,0 +1,23 @@ +{% extends "main.html" %} + +{% block content %} +
+

404

+

Page not found

+

The page you requested does not exist. If you think something is missing, let us know.

+
+ Browse documentation + +
+
+ +{% endblock %} diff --git a/theme/assets/fonts/OFL.txt b/theme/assets/fonts/OFL.txt new file mode 100644 index 0000000000..8a34a59c08 --- /dev/null +++ b/theme/assets/fonts/OFL.txt @@ -0,0 +1,94 @@ +Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter) +Copyright 2015 The Roboto Mono Project Authors (https://github.com/googlefonts/robotomono) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created using +the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/theme/assets/fonts/inter-latin-ext.woff2 b/theme/assets/fonts/inter-latin-ext.woff2 new file mode 100644 index 0000000000..57da6f8d46 Binary files /dev/null and b/theme/assets/fonts/inter-latin-ext.woff2 differ diff --git a/theme/assets/fonts/inter-latin.woff2 b/theme/assets/fonts/inter-latin.woff2 new file mode 100644 index 0000000000..91dc3e8529 Binary files /dev/null and b/theme/assets/fonts/inter-latin.woff2 differ diff --git a/theme/assets/fonts/roboto-mono-latin-ext.woff2 b/theme/assets/fonts/roboto-mono-latin-ext.woff2 new file mode 100644 index 0000000000..91f4f8c04d Binary files /dev/null and b/theme/assets/fonts/roboto-mono-latin-ext.woff2 differ diff --git a/theme/assets/fonts/roboto-mono-latin.woff2 b/theme/assets/fonts/roboto-mono-latin.woff2 new file mode 100644 index 0000000000..4a23268168 Binary files /dev/null and b/theme/assets/fonts/roboto-mono-latin.woff2 differ diff --git a/theme/assets/vendor/ionicons/LICENSE b/theme/assets/vendor/ionicons/LICENSE new file mode 100644 index 0000000000..6be4c3e10d --- /dev/null +++ b/theme/assets/vendor/ionicons/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-present Ionic (http://ionic.io/) + +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 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. diff --git a/theme/assets/vendor/ionicons/index.esm.js b/theme/assets/vendor/ionicons/index.esm.js new file mode 100644 index 0000000000..895219c129 --- /dev/null +++ b/theme/assets/vendor/ionicons/index.esm.js @@ -0,0 +1 @@ +export{a as setAssetPath}from"./p-e298ede3.js";export{a as addIcons}from"./p-006dba1a.js"; \ No newline at end of file diff --git a/theme/assets/vendor/ionicons/ionicons.esm.js b/theme/assets/vendor/ionicons/ionicons.esm.js new file mode 100644 index 0000000000..78180d31e5 --- /dev/null +++ b/theme/assets/vendor/ionicons/ionicons.esm.js @@ -0,0 +1 @@ +import{p as e,b as o}from"./p-e298ede3.js";export{s as setNonce}from"./p-e298ede3.js";(()=>{const o=import.meta.url,s={};return""!==o&&(s.resourcesUrl=new URL(".",o).href),e(s)})().then((e=>o([["p-748a23b9",[[1,"ion-icon",{mode:[1025],color:[1],ios:[1],md:[1],flipRtl:[4,"flip-rtl"],name:[513],src:[1],icon:[8],size:[1],lazy:[4],sanitize:[4],svgContent:[32],isVisible:[32]}]]]],e))); \ No newline at end of file diff --git a/theme/assets/vendor/ionicons/ionicons.js b/theme/assets/vendor/ionicons/ionicons.js new file mode 100644 index 0000000000..3f157c731a --- /dev/null +++ b/theme/assets/vendor/ionicons/ionicons.js @@ -0,0 +1,127 @@ + +'use strict'; +(function () { + var currentScript = document.currentScript; + + // Safari 10 support type="module" but still download and executes the nomodule script + if (!currentScript || !currentScript.hasAttribute('nomodule') || !('onbeforeload' in currentScript)) { + + /** + * core-js 3.6.5 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2019 Denis Pushkarev (zloirock.ru) + */ +!function(t){"use strict";!function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=0)}([function(t,n,e){e(1),e(55),e(62),e(68),e(70),e(71),e(72),e(73),e(75),e(76),e(78),e(87),e(88),e(89),e(98),e(99),e(101),e(102),e(103),e(105),e(106),e(107),e(108),e(110),e(111),e(112),e(113),e(114),e(115),e(116),e(117),e(118),e(127),e(130),e(131),e(133),e(135),e(136),e(137),e(138),e(139),e(141),e(143),e(146),e(148),e(150),e(151),e(153),e(154),e(155),e(156),e(157),e(159),e(160),e(162),e(163),e(164),e(165),e(166),e(167),e(168),e(169),e(170),e(172),e(173),e(183),e(184),e(185),e(189),e(191),e(192),e(193),e(194),e(195),e(196),e(198),e(201),e(202),e(203),e(204),e(208),e(209),e(212),e(213),e(214),e(215),e(216),e(217),e(218),e(219),e(221),e(222),e(223),e(226),e(227),e(228),e(229),e(230),e(231),e(232),e(233),e(234),e(235),e(236),e(237),e(238),e(240),e(241),e(243),e(248),t.exports=e(246)},function(t,n,e){var r=e(2),o=e(6),i=e(45),a=e(14),u=e(46),c=e(39),f=e(47),s=e(48),l=e(52),p=e(49),h=e(53),v=p("isConcatSpreadable"),g=h>=51||!o((function(){var t=[];return t[v]=!1,t.concat()[0]!==t})),d=l("concat"),y=function(t){if(!a(t))return!1;var n=t[v];return void 0!==n?!!n:i(t)};r({target:"Array",proto:!0,forced:!g||!d},{concat:function(t){var n,e,r,o,i,a=u(this),l=s(a,0),p=0;for(n=-1,r=arguments.length;n9007199254740991)throw TypeError("Maximum allowed index exceeded");for(e=0;e=9007199254740991)throw TypeError("Maximum allowed index exceeded");f(l,p++,i)}return l.length=p,l}})},function(t,n,e){var r=e(3),o=e(4).f,i=e(18),a=e(21),u=e(22),c=e(32),f=e(44);t.exports=function(t,n){var e,s,l,p,h,v=t.target,g=t.global,d=t.stat;if(e=g?r:d?r[v]||u(v,{}):(r[v]||{}).prototype)for(s in n){if(p=n[s],l=t.noTargetGet?(h=o(e,s))&&h.value:e[s],!f(g?s:v+(d?".":"#")+s,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;c(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),a(e,s,p,t)}}},function(t,n){var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof global&&global)||Function("return this")()},function(t,n,e){var r=e(5),o=e(7),i=e(8),a=e(9),u=e(13),c=e(15),f=e(16),s=Object.getOwnPropertyDescriptor;n.f=r?s:function(t,n){if(t=a(t),n=u(n,!0),f)try{return s(t,n)}catch(t){}if(c(t,n))return i(!o.f.call(t,n),t[n])}},function(t,n,e){var r=e(6);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n,e){var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);n.f=i?function(t){var n=o(this,t);return!!n&&n.enumerable}:r},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,e){var r=e(10),o=e(12);t.exports=function(t){return r(o(t))}},function(t,n,e){var r=e(6),o=e(11),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,e){var r=e(14);t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){var r=e(5),o=e(6),i=e(17);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(3),o=e(14),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},function(t,n,e){var r=e(5),o=e(19),i=e(8);t.exports=r?function(t,n,e){return o.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(5),o=e(16),i=e(20),a=e(13),u=Object.defineProperty;n.f=r?u:function(t,n,e){if(i(t),n=a(n,!0),i(e),o)try{return u(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(14);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,n,e){var r=e(3),o=e(18),i=e(15),a=e(22),u=e(23),c=e(25),f=c.get,s=c.enforce,l=String(String).split("String");(t.exports=function(t,n,e,u){var c=!!u&&!!u.unsafe,f=!!u&&!!u.enumerable,p=!!u&&!!u.noTargetGet;"function"==typeof e&&("string"!=typeof n||i(e,"name")||o(e,"name",n),s(e).source=l.join("string"==typeof n?n:"")),t!==r?(c?!p&&t[n]&&(f=!0):delete t[n],f?t[n]=e:o(t,n,e)):f?t[n]=e:a(n,e)})(Function.prototype,"toString",(function(){return"function"==typeof this&&f(this).source||u(this)}))},function(t,n,e){var r=e(3),o=e(18);t.exports=function(t,n){try{o(r,t,n)}catch(e){r[t]=n}return n}},function(t,n,e){var r=e(24),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return o.call(t)}),t.exports=r.inspectSource},function(t,n,e){var r=e(3),o=e(22),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,n,e){var r,o,i,a=e(26),u=e(3),c=e(14),f=e(18),s=e(15),l=e(27),p=e(31),h=u.WeakMap;if(a){var v=new h,g=v.get,d=v.has,y=v.set;r=function(t,n){return y.call(v,t,n),n},o=function(t){return g.call(v,t)||{}},i=function(t){return d.call(v,t)}}else{var x=l("state");p[x]=!0,r=function(t,n){return f(t,x,n),n},o=function(t){return s(t,x)?t[x]:{}},i=function(t){return s(t,x)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(n){var e;if(!c(n)||(e=o(n)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return e}}}},function(t,n,e){var r=e(3),o=e(23),i=r.WeakMap;t.exports="function"==typeof i&&/native code/.test(o(i))},function(t,n,e){var r=e(28),o=e(30),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,n,e){var r=e(29),o=e(24);(t.exports=function(t,n){return o[t]||(o[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,n){t.exports=!1},function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+r).toString(36)}},function(t,n){t.exports={}},function(t,n,e){var r=e(15),o=e(33),i=e(4),a=e(19);t.exports=function(t,n){for(var e=o(n),u=a.f,c=i.f,f=0;fc;)r(u,e=n[c++])&&(~i(f,e)||f.push(e));return f}},function(t,n,e){var r=e(9),o=e(39),i=e(41),a=function(t){return function(n,e,a){var u,c=r(n),f=o(c.length),s=i(a,f);if(t&&e!=e){for(;f>s;)if((u=c[s++])!=u)return!0}else for(;f>s;s++)if((t||s in c)&&c[s]===e)return t||s||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,n,e){var r=e(40),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n,e){var r=e(40),o=Math.max,i=Math.min;t.exports=function(t,n){var e=r(t);return e<0?o(e+n,0):i(e,n)}},function(t,n){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var r=e(6),o=/#|\.prototype\./,i=function(t,n){var e=u[a(t)];return e==f||e!=c&&("function"==typeof n?r(n):!!n)},a=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},u=i.data={},c=i.NATIVE="N",f=i.POLYFILL="P";t.exports=i},function(t,n,e){var r=e(11);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n,e){var r=e(12);t.exports=function(t){return Object(r(t))}},function(t,n,e){var r=e(13),o=e(19),i=e(8);t.exports=function(t,n,e){var a=r(n);a in t?o.f(t,a,i(0,e)):t[a]=e}},function(t,n,e){var r=e(14),o=e(45),i=e(49)("species");t.exports=function(t,n){var e;return o(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!o(e.prototype)?r(e)&&null===(e=e[i])&&(e=void 0):e=void 0),new(void 0===e?Array:e)(0===n?0:n)}},function(t,n,e){var r=e(3),o=e(28),i=e(15),a=e(30),u=e(50),c=e(51),f=o("wks"),s=r.Symbol,l=c?s:s&&s.withoutSetter||a;t.exports=function(t){return i(f,t)||(u&&i(s,t)?f[t]=s[t]:f[t]=l("Symbol."+t)),f[t]}},function(t,n,e){var r=e(6);t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(t,n,e){var r=e(50);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,n,e){var r=e(6),o=e(49),i=e(53),a=o("species");t.exports=function(t){return i>=51||!r((function(){var n=[];return(n.constructor={})[a]=function(){return{foo:1}},1!==n[t](Boolean).foo}))}},function(t,n,e){var r,o,i=e(3),a=e(54),u=i.process,c=u&&u.versions,f=c&&c.v8;f?o=(r=f.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),t.exports=o&&+o},function(t,n,e){var r=e(34);t.exports=r("navigator","userAgent")||""},function(t,n,e){var r=e(2),o=e(56),i=e(57);r({target:"Array",proto:!0},{copyWithin:o}),i("copyWithin")},function(t,n,e){var r=e(46),o=e(41),i=e(39),a=Math.min;t.exports=[].copyWithin||function(t,n){var e=r(this),u=i(e.length),c=o(t,u),f=o(n,u),s=arguments.length>2?arguments[2]:void 0,l=a((void 0===s?u:o(s,u))-f,u-c),p=1;for(f0;)f in e?e[c]=e[f]:delete e[c],c+=p,f+=p;return e}},function(t,n,e){var r=e(49),o=e(58),i=e(19),a=r("unscopables"),u=Array.prototype;null==u[a]&&i.f(u,a,{configurable:!0,value:o(null)}),t.exports=function(t){u[a][t]=!0}},function(t,n,e){var r,o=e(20),i=e(59),a=e(42),u=e(31),c=e(61),f=e(17),s=e(27),l=s("IE_PROTO"),p=function(){},h=function(t){return" + +{% endblock %} + +{% block analytics %} + {{ super() }} + {% if config.extra.segment_key %}{% include "partials/integrations/segment.html" %}{% endif %} +{% endblock %} + +{% block content %} + {% include "partials/notices.html" %} + {% if page and page.meta and page.meta.source %}{% include "partials/source-link.html" %}{% endif %} + {% include "partials/content.html" %} + {% include "partials/integrations/disqus.html" %} + {% include "partials/integrations/feedback.html" %} + {% if page.previous_page or page.next_page %} + + {% endif %} +{% endblock %} + +{% block config %} + {{ super() }} + {% include "partials/integrations/zendesk.html" %} +{% endblock %} diff --git a/theme/partials/actions.html b/theme/partials/actions.html new file mode 100644 index 0000000000..b85217e351 --- /dev/null +++ b/theme/partials/actions.html @@ -0,0 +1,2 @@ +{# Page-level copy actions are intentionally omitted. Code examples retain their + native copy control via the `content.code.copy` feature. #} diff --git a/theme/partials/footer.html b/theme/partials/footer.html new file mode 100644 index 0000000000..ffb34eb5c4 --- /dev/null +++ b/theme/partials/footer.html @@ -0,0 +1,12 @@ +
+ +
diff --git a/theme/partials/header.html b/theme/partials/header.html new file mode 100644 index 0000000000..a2459b569b --- /dev/null +++ b/theme/partials/header.html @@ -0,0 +1,35 @@ +{% set class = "md-header" %} +{% if "navigation.tabs.sticky" in features %} + {% set class = class ~ " md-header--shadow md-header--lifted" %} +{% elif "navigation.tabs" not in features %} + {% set class = class ~ " md-header--shadow" %} +{% endif %} +
+ + {% if "navigation.tabs.sticky" in features and "navigation.tabs" in features %}{% include "partials/tabs.html" %}{% endif %} +
diff --git a/theme/partials/integrations/disqus.html b/theme/partials/integrations/disqus.html new file mode 100644 index 0000000000..6e60ad9323 --- /dev/null +++ b/theme/partials/integrations/disqus.html @@ -0,0 +1,7 @@ +{% set disqus = config.extra.disqus %} +{% if page and page.meta and page.meta.disqus is string %}{% set disqus = page.meta.disqus %}{% endif %} +{% if not page.is_homepage and disqus %} +

Comments

+
+ +{% endif %} diff --git a/theme/partials/integrations/feedback.html b/theme/partials/integrations/feedback.html new file mode 100644 index 0000000000..21f14154fc --- /dev/null +++ b/theme/partials/integrations/feedback.html @@ -0,0 +1,54 @@ +{% if config.extra.user_feedback == "true" and not page.is_homepage and page.content %} +
+

Was this page helpful?

+

Your feedback helps us improve the documentation.

+
+ + +
+ + + + +
+ +{% endif %} diff --git a/theme/partials/integrations/segment.html b/theme/partials/integrations/segment.html new file mode 100644 index 0000000000..dd1ab64e7d --- /dev/null +++ b/theme/partials/integrations/segment.html @@ -0,0 +1 @@ + diff --git a/theme/partials/integrations/zendesk.html b/theme/partials/integrations/zendesk.html new file mode 100644 index 0000000000..f48b942611 --- /dev/null +++ b/theme/partials/integrations/zendesk.html @@ -0,0 +1 @@ + diff --git a/theme/partials/logo.html b/theme/partials/logo.html new file mode 100644 index 0000000000..bfaf2ef990 --- /dev/null +++ b/theme/partials/logo.html @@ -0,0 +1,2 @@ + + diff --git a/theme/partials/nav-item.html b/theme/partials/nav-item.html new file mode 100644 index 0000000000..054a7d00fe --- /dev/null +++ b/theme/partials/nav-item.html @@ -0,0 +1,106 @@ +{% macro render_status(nav_item, type) %} + {% set class = "md-status md-status--" ~ type %} + {% if config.extra.status and config.extra.status[type] %} + + {% else %} + + {% endif %} +{% endmacro %} +{% macro render_title(nav_item) %} + {% if nav_item.typeset %} + {{ nav_item.typeset.title }} + {% else %} + {{ nav_item.title }} + {% endif %} +{% endmacro %} +{% macro render_content(nav_item, ref, level = none) %} + {% set ref = ref or nav_item %} + {% set section_icons = config.extra.sidebar_icons or {} %} + {% if level == 1 and section_icons.get(nav_item.title) %} + + {% elif nav_item.meta and nav_item.meta.icon %} + {% include ".icons/" ~ nav_item.meta.icon ~ ".svg" %} + {% endif %} + + {{ render_title(ref) }} + {% if nav_item.meta and nav_item.meta.subtitle %}
{{ nav_item.meta.subtitle }}{% endif %} +
+ {% if nav_item.meta and nav_item.encrypted %}{{ render_status(nav_item, "encrypted") }}{% endif %} + {% if nav_item.meta and nav_item.meta.status %}{{ render_status(nav_item, nav_item.meta.status) }}{% endif %} +{% endmacro %} +{% macro render_pruned(nav_item, ref) %} + {% set ref = ref or nav_item %} + {% set first = nav_item.children | first %} + {% if first and first.children %} + {{ render_pruned(first, ref) }} + {% else %} + + {{ render_content(ref) }} + {% if nav_item.children | length > 0 %}{% endif %} + + {% endif %} +{% endmacro %} +{% macro render(nav_item, path, level, parent) %} + {% set class = "md-nav__item" %} + {% if nav_item.active %}{% set class = class ~ " md-nav__item--active" %}{% endif %} + {% if nav_item.pages and page in nav_item.pages %}{% set nav_item = page %}{% endif %} + {% if nav_item.children %} + {% set _ = namespace(index = none) %} + {% if "navigation.indexes" in features %} + {% for item in nav_item.children %}{% if item.is_index and _.index is none %}{% set _.index = item %}{% endif %}{% endfor %} + {% endif %} + {% set index = _.index %} + {% if "navigation.tabs" in features %} + {% if level == 1 and nav_item.active %}{% set class = class ~ " md-nav__item--section" %}{% set is_section = true %}{% endif %} + {% if "navigation.sections" in features and level == 2 and parent.active %}{% set class = class ~ " md-nav__item--section" %}{% set is_section = true %}{% endif %} + {% elif "navigation.sections" in features and level == 1 %} + {% set class = class ~ " md-nav__item--section" %}{% set is_section = true %} + {% endif %} + {% if "navigation.prune" in features and not is_section and not nav_item.active %} + {% set class = class ~ " md-nav__item--pruned" %}{% set is_pruned = true %} + {% endif %} +
  • + {% if not is_pruned %} + {% set checked = "checked" if nav_item.active %} + {% if "navigation.expand" in features and not checked %}{% set indeterminate = "md-toggle--indeterminate" %}{% endif %} + + {% if not index %} + {% set tabindex = "0" if not is_section %} + + {% else %} + {% set active_class = "md-nav__link--active" if index == page %} + + {% endif %} + + {% else %} + {{ render_pruned(nav_item) }} + {% endif %} +
  • + {% elif nav_item == page %} +
  • + {% set toc = page.toc %} + + {% set first = toc | first %} + {% if first and first.level == 1 %}{% set toc = first.children %}{% endif %} + {% if toc %}{% endif %} + {{ render_content(nav_item, none, level) }} + {% if toc %}{% include "partials/toc.html" %}{% endif %} +
  • + {% else %} +
  • {{ render_content(nav_item, none, level) }}
  • + {% endif %} +{% endmacro %} diff --git a/theme/partials/nav.html b/theme/partials/nav.html new file mode 100644 index 0000000000..5d4b705fa2 --- /dev/null +++ b/theme/partials/nav.html @@ -0,0 +1,21 @@ +{% import "partials/nav-item.html" as item with context %} +{% set class = "md-nav md-nav--primary" %} +{% if "navigation.tabs" in features %} + {% set class = class ~ " md-nav--lifted" %} +{% endif %} +{% if "toc.integrate" in features %} + {% set class = class ~ " md-nav--integrated" %} +{% endif %} + diff --git a/theme/partials/notices.html b/theme/partials/notices.html new file mode 100644 index 0000000000..cf27375016 --- /dev/null +++ b/theme/partials/notices.html @@ -0,0 +1,19 @@ +{% if config.extra.preview_pull_request or config.extra.preview_branch %} + +{% endif %} +{% if config.extra.self_hosted %} + +{% endif %} diff --git a/theme/partials/palette.html b/theme/partials/palette.html new file mode 100644 index 0000000000..e0b5937869 --- /dev/null +++ b/theme/partials/palette.html @@ -0,0 +1,13 @@ +
    + {% for option in config.theme.palette %} + {% set scheme = option.scheme | d("default", true) %} + {% set primary = option.primary | d("indigo", true) %} + {% set accent = option.accent | d("indigo", true) %} + + {% if option.toggle %} + + {% endif %} + {% endfor %} + diff --git a/theme/partials/path-item.html b/theme/partials/path-item.html new file mode 100644 index 0000000000..fb57dcd89e --- /dev/null +++ b/theme/partials/path-item.html @@ -0,0 +1,16 @@ +{% macro render_content(nav_item) %} + {{ nav_item.title }} +{% endmacro %} +{% macro render(nav_item, ref) %} + {% set ref = ref or nav_item %} + {% if nav_item.children %} + {% set first = nav_item.children | first %} + {% if first.children %} + {{ render(first, ref) }} + {% else %} +
  • {{ render_content(ref) }}
  • + {% endif %} + {% else %} +
  • {{ render_content(ref) }}
  • + {% endif %} +{% endmacro %} diff --git a/theme/partials/search.html b/theme/partials/search.html new file mode 100644 index 0000000000..f6bdf8b66e --- /dev/null +++ b/theme/partials/search.html @@ -0,0 +1,40 @@ + diff --git a/theme/partials/source-file.html b/theme/partials/source-file.html new file mode 100644 index 0000000000..4d018191f4 --- /dev/null +++ b/theme/partials/source-file.html @@ -0,0 +1,13 @@ +{% if page.meta %} + {% if page.meta.git_revision_date_localized %} + {% set updated = page.meta.git_revision_date_localized %} + {% elif page.meta.revision_date %} + {% set updated = page.meta.revision_date %} + {% endif %} +{% endif %} +{% if updated %} + +{% endif %} diff --git a/theme/partials/source-link.html b/theme/partials/source-link.html new file mode 100644 index 0000000000..3d0dcac02d --- /dev/null +++ b/theme/partials/source-link.html @@ -0,0 +1,5 @@ +{% set repo = config.repo_url | trim('/') %} +{% set path = page.meta.path | default('') %} + + View source + diff --git a/theme/partials/source.html b/theme/partials/source.html new file mode 100644 index 0000000000..69360a42aa --- /dev/null +++ b/theme/partials/source.html @@ -0,0 +1,4 @@ + +
    +
    {{ config.repo_name }}
    +
    diff --git a/theme/partials/toc.html b/theme/partials/toc.html new file mode 100644 index 0000000000..56cf6f8d12 --- /dev/null +++ b/theme/partials/toc.html @@ -0,0 +1,10 @@ +{% set title = config.mdx_configs.toc.title if config.mdx_configs.toc and config.mdx_configs.toc.title else lang.t("toc") %} + diff --git a/theme/stylesheets/base.css b/theme/stylesheets/base.css new file mode 100644 index 0000000000..0395706d6f --- /dev/null +++ b/theme/stylesheets/base.css @@ -0,0 +1,7 @@ +html { font-size: 100%; } + +html { scroll-padding-top: 5rem; scroll-behavior: smooth; } +@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } } + +body { color: var(--docs-text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; } +.md-grid { max-width: 90rem; } diff --git a/theme/stylesheets/content.css b/theme/stylesheets/content.css new file mode 100644 index 0000000000..ed1d4c73af --- /dev/null +++ b/theme/stylesheets/content.css @@ -0,0 +1,92 @@ +.md-content__inner { position: relative; padding-top: 1.25rem; padding-bottom: 3rem; } +.md-typeset { color: var(--docs-text-secondary); font-size: 1rem; line-height: 1.7; } +.md-typeset h1, .md-typeset h2, .md-typeset h3, .md-typeset h4 { color: var(--docs-text); font-weight: 700; letter-spacing: -.025em; } +.md-typeset h1 { margin: 0 0 1.5rem; font-size: 1.875rem; line-height: 1.25; } +.md-typeset h2 { margin-top: 3rem; padding-top: .25rem; font-size: 1.5rem; line-height: 1.35; } +.md-typeset h3 { margin-top: 2rem; font-size: 1.2rem; } +.md-content__inner > h1 + p { color: var(--docs-text-secondary); font-size: 1.0625rem; line-height: 1.65; } +.md-typeset a { color: var(--docs-link); font-weight: 500; text-decoration-thickness: 1px; text-underline-offset: .14em; } +.md-typeset a:hover { color: var(--docs-link-hover); } +.md-typeset code { padding: .14em .32em; border-radius: var(--docs-radius); background: var(--docs-bg-subtle); color: var(--docs-text); } + +.md-typeset :not(pre) > code { border: 1px solid var(--docs-border); } +.md-typeset a code { color: inherit; } +.md-typeset pre { border: 1px solid var(--docs-border); border-radius: var(--docs-radius); background: var(--docs-code-bg); box-shadow: none; } +.md-typeset pre > code { color: var(--docs-code-text); background: transparent; } +.md-typeset pre > code, .md-typeset .highlighttable .code pre > code { overflow-x: auto; overflow-wrap: anywhere; white-space: pre-wrap; } +.md-typeset .highlighttable { overflow: hidden; border: 1px solid var(--docs-border); border-radius: var(--docs-radius); background: var(--docs-code-bg); } +.md-typeset .highlighttable .linenos { background: color-mix(in srgb, var(--docs-code-bg) 82%, var(--docs-bg)); color: var(--docs-text-tertiary); } +.md-typeset .highlighttable pre { border: 0; border-radius: 0; } +.md-typeset .md-code__nav { top: .35rem; right: .35rem; gap: .2rem; padding: 0; } +.md-typeset .md-code__button { display: grid; width: 1.75rem; height: 1.75rem; padding: .35rem; place-items: center; border-radius: var(--docs-radius); color: var(--docs-text-tertiary); } +.md-typeset :is(.md-code__button, .md-clipboard)::after { display: block; width: 1rem; height: 1rem; margin: 0; background-color: currentColor; -webkit-mask-image: url("../assets/vendor/ionicons/svg/copy-outline.svg"); mask-image: url("../assets/vendor/ionicons/svg/copy-outline.svg"); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; } +.md-typeset .tabbed-control--prev .tabbed-button::after, .md-typeset .tabbed-control--next .tabbed-button::after { display: block; width: 1rem; height: 1rem; margin: 0; background-color: currentColor; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; } +.md-typeset .tabbed-control--prev .tabbed-button::after { -webkit-mask-image: url("../assets/vendor/ionicons/svg/chevron-back-outline.svg"); mask-image: url("../assets/vendor/ionicons/svg/chevron-back-outline.svg"); } +.md-typeset .tabbed-control--next .tabbed-button::after { -webkit-mask-image: url("../assets/vendor/ionicons/svg/chevron-forward-outline.svg"); mask-image: url("../assets/vendor/ionicons/svg/chevron-forward-outline.svg"); } +.md-typeset .md-code__button:hover, .md-typeset .md-code__button:focus-visible { background: color-mix(in srgb, var(--docs-text) 8%, transparent); color: var(--docs-text); } +.md-typeset .md-code__button:focus-visible { outline: 2px solid var(--docs-link); outline-offset: 1px; } + +.md-dialog { border: 1px solid var(--docs-border); background: var(--docs-bg-secondary); } +.md-dialog__inner { color: var(--docs-text); } +.md-typeset .highlight span.hll { display: inline-block; width: 100%; background: color-mix(in srgb, var(--docs-link) 18%, transparent); } +.md-typeset .tabbed-set { margin: 1.5rem 0; border: 1px solid var(--docs-border); border-radius: var(--docs-radius); background: var(--docs-bg); overflow: hidden; } +.md-typeset .tabbed-labels { padding: .25rem .5rem 0; border-bottom: 1px solid var(--docs-border); background: var(--docs-bg-secondary); } +.md-typeset .tabbed-labels > label { padding: .55rem .65rem; color: var(--docs-text-tertiary); font-size: .78rem; font-weight: 600; } +.md-typeset .tabbed-labels > label:hover { color: var(--docs-text); } +.md-typeset .tabbed-labels::before { background: var(--docs-link); } +.md-typeset .tabbed-content { box-shadow: none; } +.md-typeset .tabbed-content > .tabbed-block { margin: 0; } +.md-typeset .tabbed-content pre { margin: 0; border: 0; border-radius: 0; } +.md-typeset table:not([class]) { border: 1px solid var(--docs-border); border-radius: var(--docs-radius); box-shadow: none; } +.docs-table-scroll { width: 100%; overflow-x: auto; margin: 1.5rem 0; } +.docs-table-scroll > table { margin: 0; } +.md-typeset table:not([class]) th { color: var(--docs-text); background: var(--docs-bg-secondary); } +.md-typeset table:not([class]) tr:hover { background: var(--docs-bg-secondary); } + +.md-typeset table:not([class]):not([style]) { font-size: .8125rem; } +.md-typeset table:not([class]):not([style]) :is(th, td) { padding: .6rem .9rem; } +.md-typeset table:not([class]):not([style]) th { border-bottom: 1px solid var(--docs-border); } +.md-typeset .admonition, .md-typeset details { margin: 1.25rem 0; padding: .7rem .9rem; border: 1px solid color-mix(in srgb, var(--docs-link) 28%, var(--docs-border)); border-radius: var(--docs-radius); background: color-mix(in srgb, var(--docs-link) 4%, var(--docs-bg)); color: var(--docs-text-secondary); box-shadow: none; font-size: .875rem; line-height: 1.55; } +.md-typeset .admonition > :last-child, .md-typeset details > :last-child { margin-bottom: 0; } +.md-typeset .admonition > :first-child:not(.admonition-title), .md-typeset details > :first-child:not(summary) { margin-top: 0; } +.md-typeset .admonition > p, .md-typeset details > p { color: var(--docs-text-secondary); } +.md-typeset .admonition > .admonition-title + p, .md-typeset details > summary + p { margin: 0; } +.md-typeset .admonition > .admonition-title, .md-typeset details > summary { display: flex; gap: .6rem; align-items: flex-start; margin: 0 0 .3rem; padding: 0; background: transparent; color: var(--docs-text); font-size: .875rem; font-weight: 600; line-height: 1.45; list-style: none; } +.md-typeset .admonition > .admonition-title:only-child, .md-typeset details > summary:only-child { margin-bottom: 0; } +.md-typeset .admonition > .admonition-title::before, .md-typeset details > summary::before { content: ""; position: static; display: block; flex: 0 0 .9rem; width: .9rem; height: .9rem; margin-top: .18rem; background-color: var(--docs-link); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; } +.md-typeset .admonition.important > .admonition-title::before, .md-typeset details.important > summary::before { -webkit-mask-image: var(--md-admonition-icon--info); mask-image: var(--md-admonition-icon--info); } +.md-typeset .admonition.info > .admonition-title::before, .md-typeset details.info > summary::before { background-color: #00b8d4; } +.md-typeset .admonition.tip > .admonition-title::before, .md-typeset details.tip > summary::before, .md-typeset .admonition.success > .admonition-title::before, .md-typeset details.success > summary::before { background-color: var(--docs-success); } +.md-typeset .admonition.warning > .admonition-title::before, .md-typeset details.warning > summary::before { background-color: var(--docs-warning); } +.md-typeset .admonition.danger > .admonition-title::before, .md-typeset details.danger > summary::before { background-color: var(--docs-danger); } +.md-typeset .admonition.tip, .md-typeset details.tip, .md-typeset .admonition.success, .md-typeset details.success { border-color: color-mix(in srgb, var(--docs-success) 35%, var(--docs-border)); background: color-mix(in srgb, var(--docs-success) 6%, var(--docs-bg)); } +.md-typeset .admonition.warning, .md-typeset details.warning { border-color: color-mix(in srgb, var(--docs-warning) 38%, var(--docs-border)); background: color-mix(in srgb, var(--docs-warning) 6%, var(--docs-bg)); } +.md-typeset .admonition.danger, .md-typeset details.danger { border-color: color-mix(in srgb, var(--docs-danger) 35%, var(--docs-border)); background: color-mix(in srgb, var(--docs-danger) 6%, var(--docs-bg)); } +.md-content article.md-typeset blockquote { margin: 1.5rem 0; padding: .15rem 0 .15rem 1rem; border-left: 2px solid var(--docs-border-strong); color: var(--docs-text-secondary); } +.md-content article.md-typeset blockquote > :first-child { margin-top: 0; } +.md-content article.md-typeset blockquote > :last-child { margin-bottom: 0; } + +.docs-notice { margin: 0 0 1.5rem; padding: 1rem 1.1rem; border: 1px solid var(--docs-border-strong); border-radius: var(--docs-radius); background: var(--docs-bg-brand); color: var(--docs-text-secondary); } +.docs-notice strong { color: var(--docs-text); } +.docs-notice p { margin: .35rem 0 0; } +.docs-source-link { float: right; margin: .25rem 0 1rem 1rem; color: var(--docs-text-tertiary); font-size: .78rem; font-weight: 600; text-decoration: none; } +.docs-revision { display: flex; align-items: center; gap: .35rem; margin-top: 2.5rem; color: var(--docs-text-tertiary); font-size: .78rem; } +.docs-revision span { color: var(--docs-text-secondary); font-weight: 600; } +.docs-revision span::after { color: var(--docs-text-tertiary); content: "·"; margin-left: .35rem; } +.docs-revision .git-revision-date-localized-plugin::after { content: none; } + +.docs-error { max-width: 34rem; padding: 4rem 0 7rem; } +.docs-error__code { margin: 0 0 .55rem; color: var(--docs-link); font-size: .78rem; font-weight: 700; letter-spacing: .08em; } +.docs-error h1 { margin-bottom: 1rem; } +.docs-error > p:not(.docs-error__code) { max-width: 31rem; } +.docs-error__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; } +.md-typeset .docs-error__actions a, .md-typeset .docs-error__actions label { display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center; padding: .65rem 1rem; border: 1px solid var(--docs-border); border-radius: var(--docs-radius); background: var(--docs-bg); color: var(--docs-text); cursor: pointer; font-size: .85rem; font-weight: 600; text-decoration: none; } +.md-typeset .docs-error__actions .docs-error__primary { border-color: var(--docs-link); background: var(--docs-link); color: #fff; } +.md-typeset .docs-error__actions a:hover, .md-typeset .docs-error__actions label:hover { border-color: var(--docs-border-strong); background: var(--docs-bg-secondary); color: var(--docs-link); } +.md-typeset .docs-error__actions .docs-error__primary:hover { border-color: var(--docs-link-hover); background: var(--docs-link-hover); color: #fff; } +.docs-error__actions a:focus-visible, .docs-error__actions label:focus-visible { outline: 2px solid var(--docs-link); outline-offset: 3px; } +.md-main__inner:has(.docs-error) .md-sidebar { display: none; } + +.md-typeset img.docs-image { display: block; max-width: 100%; height: auto; margin: 1.5rem 0; border: 1px solid var(--docs-border); border-radius: var(--docs-radius); box-shadow: var(--docs-shadow-1); } +.md-typeset p.docs-image-block { margin: 1.75rem 0; } +.md-typeset p.docs-image-block img.docs-image { margin: 0; } diff --git a/theme/stylesheets/fonts.css b/theme/stylesheets/fonts.css new file mode 100644 index 0000000000..5ea4f0933d --- /dev/null +++ b/theme/stylesheets/fonts.css @@ -0,0 +1,36 @@ +/* Self-hosted Google Fonts subsets. No external font service is required. */ +@font-face { + font-family: "Inter"; + font-style: normal; + font-weight: 400 700; + font-display: swap; + src: url("../assets/fonts/inter-latin-ext.woff2") format("woff2"); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +@font-face { + font-family: "Inter"; + font-style: normal; + font-weight: 400 700; + font-display: swap; + src: url("../assets/fonts/inter-latin.woff2") format("woff2"); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: "Roboto Mono"; + font-style: normal; + font-weight: 400 700; + font-display: swap; + src: url("../assets/fonts/roboto-mono-latin-ext.woff2") format("woff2"); + unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +@font-face { + font-family: "Roboto Mono"; + font-style: normal; + font-weight: 400 700; + font-display: swap; + src: url("../assets/fonts/roboto-mono-latin.woff2") format("woff2"); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} diff --git a/theme/stylesheets/footer.css b/theme/stylesheets/footer.css new file mode 100644 index 0000000000..6c55d817dd --- /dev/null +++ b/theme/stylesheets/footer.css @@ -0,0 +1,34 @@ +.docs-page-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--docs-border); } +.docs-page-nav a { display: grid; gap: .25rem; min-height: 4.75rem; padding: .9rem 1rem; border: 1px solid var(--docs-border); border-radius: var(--docs-radius); color: var(--docs-text); text-decoration: none; } +.docs-page-nav a:hover { border-color: var(--docs-border-strong); background: var(--docs-bg-secondary); text-decoration: none; } +.docs-page-nav span { color: var(--docs-text-tertiary); font-size: .72rem; } +.docs-page-nav strong { font-size: .86rem; font-weight: 600; } +.docs-page-nav__next { grid-column: 2; text-align: right; } +.docs-footer { border-top: 1px solid var(--docs-border); background: var(--docs-bg); } +.docs-footer__inner { display: flex; justify-content: space-between; gap: 2rem; max-width: 90rem; padding: 1.4rem 1rem; margin: auto; color: var(--docs-text-tertiary); font-size: .78rem; } +.docs-footer__brand { display: grid; gap: .4rem; max-width: 31rem; } +.docs-footer__brand strong { color: var(--docs-text); font-size: .86rem; font-weight: 600; } +.docs-footer__brand span { line-height: 1.5; } +.docs-footer__brand b { margin: 0 .35rem; color: var(--docs-border-strong); font-weight: 400; } +.docs-footer__meta { display: grid; align-content: space-between; justify-items: end; gap: .9rem; text-align: right; } +.docs-footer nav { display: flex; flex-wrap: wrap; gap: 1rem; } +.docs-footer a { color: var(--docs-text-secondary); text-decoration: none; } +.docs-footer a:hover { color: var(--docs-link); } + +.docs-feedback { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; row-gap: .25rem; margin-top: 3rem; padding: 1.5rem 0; border: 0; border-top: 1px solid var(--docs-border); border-bottom: 1px solid var(--docs-border); border-radius: 0; background: transparent; } +.docs-feedback h2 { grid-column: 1; margin: 0; padding: 0; font-size: 1rem; } +.docs-feedback p { grid-column: 1 / -1; margin: .25rem 0 0; } +.docs-feedback > p:first-of-type { grid-column: 1; color: var(--docs-text-tertiary); font-size: .82rem; } +.docs-feedback button { padding: .45rem .75rem; border: 1px solid var(--docs-border); border-radius: var(--docs-radius); background: var(--docs-bg); color: var(--docs-text-secondary); cursor: pointer; font: inherit; font-size: .8rem; } +.docs-feedback button:hover { border-color: var(--docs-border-strong); color: var(--docs-link); } +.docs-feedback button[aria-pressed="true"] { border-color: color-mix(in srgb, var(--docs-link) 55%, var(--docs-border)); background: color-mix(in srgb, var(--docs-link) 9%, var(--docs-bg)); color: var(--docs-link); font-weight: 600; } +.docs-feedback button:disabled { cursor: default; opacity: .65; } +.docs-feedback.is-submitted .docs-feedback__choices { opacity: .7; } +.docs-feedback__choices { display: flex; grid-column: 2; grid-row: 1 / span 2; align-self: center; gap: .5rem; } +.docs-feedback__form { grid-column: 1 / -1; margin-top: 1rem; } +.docs-feedback textarea { display: block; width: 100%; box-sizing: border-box; margin-top: .5rem; padding: .7rem; border: 1px solid var(--docs-border); border-radius: var(--docs-radius); background: var(--docs-bg); color: var(--docs-text); font: inherit; } +.docs-feedback__count { color: var(--docs-text-tertiary); font-size: .72rem; } +.docs-feedback__thanks { color: var(--docs-success); font-weight: 600; } +.docs-feedback__thanks:focus { outline: none; } +.docs-feedback__links { display: flex; flex-wrap: wrap; gap: .5rem 1rem; padding-top: .75rem; color: var(--docs-text-tertiary); font-size: .78rem; } +.docs-search-trigger:focus-visible, .docs-header__cta:focus-visible, .version-select-container .select-css:focus-visible, .content-link:focus-visible, .topic-card:focus-visible, .docs-page-nav a:focus-visible, .docs-feedback button:focus-visible, .docs-feedback textarea:focus-visible, .docs-feedback a:focus-visible, .docs-footer a:focus-visible, .docs-source-link:focus-visible { outline: 2px solid var(--docs-link); outline-offset: 3px; } diff --git a/theme/stylesheets/header.css b/theme/stylesheets/header.css new file mode 100644 index 0000000000..28d603ee3b --- /dev/null +++ b/theme/stylesheets/header.css @@ -0,0 +1,71 @@ +.md-header { border-bottom: 1px solid var(--docs-border); background: color-mix(in srgb, var(--docs-bg) 68%, transparent); box-shadow: none; -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%); } +.md-header__inner { display: grid; grid-template-columns: auto 1fr minmax(15rem, 30rem) 1fr auto auto auto; gap: .65rem; min-height: 4rem; align-items: center; } +.md-header__button { margin: 0; color: var(--docs-text-secondary); } + +.md-header__button.md-logo { display: inline-flex; margin: 0; overflow: hidden; } +.md-header__button.md-logo img { display: block; width: auto; height: 1.75rem; max-width: none; } +.md-header__button.md-logo img.docs-logo--light { display: none; } +[data-md-color-scheme="codacy-light"] .md-header__button.md-logo img.docs-logo--dark { display: none; } +[data-md-color-scheme="codacy-light"] .md-header__button.md-logo img.docs-logo--light { display: block; } + +.md-nav__title .md-nav__button.md-logo img.docs-logo--light { display: none; } +[data-md-color-scheme="codacy-light"] .md-nav__title .md-nav__button.md-logo img.docs-logo--dark { display: none; } +[data-md-color-scheme="codacy-light"] .md-nav__title .md-nav__button.md-logo img.docs-logo--light { display: block; } +.md-header__button > ion-icon { display: block; width: 1.2rem; height: 1.2rem; } +.docs-search-trigger { display: flex; grid-column: 3; align-items: center; gap: .55rem; width: 100%; box-sizing: border-box; min-height: 2.25rem; padding: 0 .75rem; border: 1px solid var(--docs-border); border-radius: var(--docs-radius); background: var(--docs-bg); color: var(--docs-text-tertiary); cursor: pointer; font: inherit; font-size: .82rem; text-align: left; } +.docs-search-trigger:hover { border-color: var(--docs-border-strong); color: var(--docs-text-secondary); } +.docs-search-trigger > ion-icon { flex: 0 0 1.2rem; width: 1.2rem; height: 1.2rem; } +.docs-search-trigger kbd { margin-left: auto; padding: .1rem .32rem; border: 1px solid var(--docs-border); border-radius: var(--docs-radius); background: var(--docs-bg-secondary); color: var(--docs-text-tertiary); font: inherit; font-size: .66rem; } +.docs-header__cta { grid-column: 6; display: inline-flex; min-height: 2.25rem; align-items: center; justify-content: center; padding: 0 .85rem; border: 1px solid var(--docs-link); border-radius: var(--docs-radius); background: var(--docs-link); color: #fff; font-size: .875rem; font-weight: 600; line-height: 1.25; text-decoration: none; white-space: nowrap; } +.docs-header__cta:hover { border-color: var(--docs-link-hover); background: var(--docs-link-hover); color: #fff; } +.version-select-container { position: relative; grid-column: 5; } +.version-select-container .select-css { width: 8.5rem; height: 2.25rem; padding: 0 2rem 0 .7rem; border: 1px solid var(--docs-border); border-radius: var(--docs-radius); background: var(--docs-bg); color: var(--docs-text-secondary); font: inherit; font-size: .78rem; font-weight: 500; appearance: none; -webkit-appearance: none; } +.docs-version-select__icon { position: absolute; top: 50%; right: .65rem; width: 1rem; height: 1rem; transform: translateY(-50%); color: var(--docs-text-secondary); pointer-events: none; } +.version-select-container .select-css:disabled { opacity: 1; color: var(--docs-text-secondary); cursor: wait; } +.version-select-container .select-css:hover, .version-select-container .select-css:focus { border-color: var(--docs-border-strong); } +.md-header [data-md-component="palette"] { grid-column: 7; } +.md-header [data-md-component="palette"] .md-header__button:not([hidden]) { display: inline-flex; width: 2.25rem; height: 2.25rem; align-items: center; justify-content: center; box-sizing: border-box; padding: 0; border: 1px solid var(--docs-border); border-radius: var(--docs-radius); background: var(--docs-bg); color: var(--docs-text-tertiary); } +.md-header [data-md-component="palette"] .md-header__button:hover { border-color: var(--docs-border-strong); color: var(--docs-text-secondary); } +.md-header [data-md-component="palette"] .md-header__button:focus-visible { outline: 2px solid var(--docs-link); outline-offset: 3px; } +.md-header .md-search { display: block; position: fixed; inset: 0; z-index: 100; width: auto; visibility: hidden; opacity: 0; pointer-events: none; background: color-mix(in srgb, var(--docs-bg) 55%, transparent); backdrop-filter: blur(3px); } +.md-toggle[data-md-toggle="search"]:not(:checked) ~ .md-header .md-search__inner { width: 0; height: 0; margin: 0; overflow: hidden; } +.md-toggle[data-md-toggle="search"]:checked ~ .md-header .md-search { visibility: visible; opacity: 1; pointer-events: auto; } +.md-search__overlay { display: block; position: absolute; inset: 0; background: transparent; } +.md-search__inner { position: relative; z-index: 1; display: flex; float: none; flex-direction: column; width: min(40rem, calc(100vw - 3rem)); max-height: calc(100dvh - 6.5rem); height: auto; margin: clamp(3.25rem, 7.5vh, 5rem) auto 0; overflow: hidden; border: 1px solid var(--docs-border); border-radius: var(--docs-radius); background: var(--docs-bg); box-shadow: 0 24px 48px color-mix(in srgb, var(--docs-text) 12%, transparent), 0 0 0 1px color-mix(in srgb, var(--docs-bg) 72%, transparent) inset; } +[dir="ltr"] .md-search__inner, [dir="rtl"] .md-search__inner { float: none; } +.md-toggle[data-md-toggle="search"]:checked ~ .md-header .md-search__inner { width: min(40rem, calc(100vw - 3rem)); max-height: calc(100dvh - 6.5rem); height: auto; margin: clamp(3.25rem, 7.5vh, 5rem) auto 0; overflow: hidden; transform: none; } +.md-search .md-search__form { flex: 0 0 3.5rem; min-height: 3.5rem; border: 0; border-radius: 0; background: transparent; box-shadow: none; } +.md-search .md-search__input, .md-search .md-search__suggest { height: 3.5rem; padding-right: 3rem; padding-left: 2.8rem; background: transparent; font-size: .9375rem; line-height: 3.5rem; } +.md-search .md-search__input { color: var(--docs-text); } +.md-search .md-search__suggest { color: var(--docs-text-tertiary); } +.md-search .md-search__icon[for="__search"] { top: 50%; left: 1rem; width: 1rem; height: 1rem; transform: translateY(-50%); color: var(--docs-text-tertiary); } +.md-search .md-search__icon[for="__search"] ion-icon { width: 1rem; height: 1rem; } +.md-search .md-search__icon[for="__search"] ion-icon:first-child { display: block; } +.md-search .md-search__icon[for="__search"] ion-icon:last-child { display: none; } +.md-search .md-search__options { position: absolute; top: .7rem; right: .7rem; z-index: 3; } +.md-search .md-search__options .md-search__icon { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: var(--docs-radius); color: var(--docs-text-tertiary); } +.md-search .md-search__options .md-search__icon ion-icon { width: 1rem; height: 1rem; } +.md-search .md-search__options .md-search__icon:hover { background: var(--docs-bg-secondary); color: var(--docs-text); } +.md-search .md-search__output { position: relative; top: auto; right: auto; left: auto; order: 2; flex: 1 1 auto; width: 100%; max-height: none; overflow: hidden; border-top: 0; border-radius: 0; background: var(--docs-bg); box-shadow: none; } +.md-search .md-search__scrollwrap { width: 100%; height: auto; max-height: none !important; margin: 0; padding: 0 .35rem .35rem; overflow-y: auto; scrollbar-color: auto !important; scrollbar-gutter: auto; scrollbar-width: auto !important; } +.md-search .md-search__scrollwrap::-webkit-scrollbar, .md-search .md-search__scrollwrap::-webkit-scrollbar-thumb, .md-search .md-search__scrollwrap::-webkit-scrollbar-track { width: auto; background: initial !important; } +.docs-search-hint { display: flex; order: 3; gap: .9rem; align-items: center; min-height: 2.5rem; margin: 0; padding: .5rem 1rem; border-top: 1px solid var(--docs-border); color: var(--docs-text-tertiary); font-size: .7rem; } +.docs-search-hint span { display: inline-flex; gap: .25rem; align-items: center; white-space: nowrap; } +.docs-search-hint__close { margin-left: auto; } +.docs-search-hint kbd { min-width: 1rem; padding: .04rem .22rem; border: 0; border-radius: var(--docs-radius); background: var(--docs-bg-subtle); color: var(--docs-text-secondary); font: inherit; font-size: .63rem; font-weight: 600; line-height: 1.2; text-align: center; } +.md-search .md-search-result { border-color: var(--docs-border); background: var(--docs-bg); } +.md-search .md-search-result__meta { min-height: 0; padding: .35rem .75rem .45rem; background: var(--docs-bg); color: var(--docs-text-tertiary); font-size: .7rem; line-height: 1.35; } +.md-search .md-search-result__item { margin: 0 .15rem .2rem; overflow: hidden; border: 0; border-radius: var(--docs-radius); } +.md-search .md-search-result__link { display: block; color: inherit; border-radius: inherit; } +.md-search .md-search-result__article { min-height: 0; padding: .62rem .75rem; } +.md-search .md-search-result__article h1, .md-search .md-search-result__article h2 { margin: 0; color: var(--docs-text); font-size: .86rem; font-weight: 600; line-height: 1.4; } +.md-search .md-search-result__article > p { display: none; } +.md-search .md-search-result__article > h1 + p, .md-search .md-search-result__article > h2 + p { display: -webkit-box; margin: .3rem 0 0; overflow: hidden; color: var(--docs-text-tertiary); font-size: .72rem; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; } +.md-search .md-search-result__article > ul, .md-search .md-search-result__article > ol { display: none; } +.md-search .md-search-result__icon { display: none; } +.md-search .md-search-result mark { background: transparent; color: var(--docs-link); font-weight: 600; text-decoration: none; } +.md-search .md-search-result__link:hover, .md-search .md-search-result__link[data-md-state="active"] { background: color-mix(in srgb, var(--docs-link) 7%, var(--docs-bg)); } +.md-search .md-search-result__more summary { padding: .35rem .75rem .5rem; border-radius: var(--docs-radius-sm); color: var(--docs-link); cursor: pointer; font-size: .68rem; } +.md-search .md-search-result__more summary:hover { background: color-mix(in srgb, var(--docs-link) 7%, var(--docs-bg)); } +.md-search .md-search__form:focus-within { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--docs-link) 55%, transparent); } +.md-search .md-search-result__link:focus-visible, .md-search .md-search__scrollwrap:focus-visible, .md-search .md-search__options button:focus-visible { outline: 2px solid var(--docs-link); outline-offset: -2px; } diff --git a/theme/stylesheets/home.css b/theme/stylesheets/home.css new file mode 100644 index 0000000000..3ae55bfd4b --- /dev/null +++ b/theme/stylesheets/home.css @@ -0,0 +1,29 @@ +.docs-home-lead { max-width: 36rem; color: var(--docs-text-secondary); font-size: 1.05rem; } +.content-columns-wrapper { display: grid; grid-template-columns: 1fr; gap: 1.75rem; margin: 2rem 0 3rem; } +.content-link-column { display: grid; align-content: start; gap: .75rem; } +.content-link-column > h2 { margin: 0 0 .15rem; padding: 0; color: var(--docs-text); font-size: .78rem; font-weight: 700; letter-spacing: .04em; line-height: 1.4; text-transform: uppercase; } +.md-typeset .content-link, .md-typeset .topic-card { position: relative; display: block; min-height: 3.75rem; padding: 1rem 2.65rem 1rem 1rem; border: 1px solid var(--docs-border); border-radius: var(--docs-radius); background: var(--docs-bg); color: var(--docs-text-secondary); text-decoration: none; transition: border-color .15s ease, background .15s ease; } +.md-typeset .content-link::after, .md-typeset .topic-card::after { position: absolute; top: .95rem; right: 1rem; color: var(--docs-text-tertiary); content: "→"; font-size: .9rem; transition: color .15s ease, transform .15s ease; } +.content-link:hover, .topic-card:hover, .content-link:focus-visible, .topic-card:focus-visible { border-color: var(--docs-border-strong); background: var(--docs-bg-secondary); text-decoration: none; } +.content-link:hover::after, .topic-card:hover::after, .content-link:focus-visible::after, .topic-card:focus-visible::after { color: var(--docs-link); transform: translateX(.12rem); } +.md-typeset .content-link--primary { border-color: color-mix(in srgb, var(--docs-link) 32%, var(--docs-border)); background: color-mix(in srgb, var(--docs-link) 5%, var(--docs-bg)); } +.content-link h3, .topic-card h3 { margin: 0 0 .35rem; color: var(--docs-text); font-size: .92rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.4; } +.content-link p, .topic-card p { margin: 0; color: var(--docs-text-secondary); font-size: .82rem; font-weight: 400; line-height: 1.55; } +.topic-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; } +.md-typeset .topic-card { padding-top: 1rem; } +.tc-icon { display: grid; width: 2.25rem; height: 2.25rem; place-items: center; margin-bottom: .9rem; border-radius: var(--docs-radius); background: var(--docs-bg-brand); } +.tc-icon img { width: 1.25rem; height: 1.25rem; margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; } +.md-main__inner:has(.content-columns-wrapper) .md-sidebar--secondary { display: none; } +.md-main__inner:has(.content-columns-wrapper) .docs-page-nav { display: flex; justify-content: flex-end; margin-top: 2rem; padding-top: 1rem; } +.md-main__inner:has(.content-columns-wrapper) .docs-page-nav a { min-height: 0; padding: .5rem 0; border: 0; background: transparent; } +.md-main__inner:has(.content-columns-wrapper) .docs-page-nav__next { grid-column: auto; } + +.md-content article.md-typeset:has(#codacy-release-notes) .release-series { margin: 2rem 0 .45rem; padding: 0; color: var(--docs-text); font-size: .8rem; font-weight: 700; letter-spacing: .035em; line-height: 1.4; text-transform: uppercase; } +.md-content article.md-typeset:has(#codacy-release-notes) .release-series + ul { margin: 0 0 1.75rem; padding: 0; border-top: 1px solid var(--docs-border); list-style: none; } +.md-content article.md-typeset:has(#codacy-release-notes) .release-series + ul > li { position: relative; margin: 0; padding: .58rem .65rem .58rem 1.35rem; border-bottom: 1px solid var(--docs-border); color: var(--docs-text-tertiary); font-size: .875rem; line-height: 1.5; transition: background-color .12s ease; } +.md-content article.md-typeset:has(#codacy-release-notes) .release-series + ul > li::before { position: absolute; top: 1.05rem; left: .55rem; width: .28rem; height: .28rem; border-radius: 50%; background: var(--docs-border-strong); content: ""; } +.md-content article.md-typeset:has(#codacy-release-notes) .release-series + ul > li:hover { background: var(--docs-bg-secondary); } +.md-content article.md-typeset:has(#codacy-release-notes) .release-series + ul a { color: var(--docs-text-secondary); font-weight: 500; text-decoration: none; } +.md-content article.md-typeset:has(#codacy-release-notes) .release-series + ul a:hover { color: var(--docs-link); } +.md-typeset #tool-versions + ul, .md-typeset #tool-versions + p + ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; margin-top: 1rem; font-size: .875rem; line-height: 1.5; } +.md-typeset #tool-versions + ul > li, .md-typeset #tool-versions + p + ul > li { margin: .18rem 0; break-inside: avoid; } diff --git a/theme/stylesheets/layout.css b/theme/stylesheets/layout.css new file mode 100644 index 0000000000..e27e31989f --- /dev/null +++ b/theme/stylesheets/layout.css @@ -0,0 +1,6 @@ +.md-header__inner, .md-main__inner, .docs-footer__inner { + box-sizing: border-box; + max-width: 90rem; + margin-inline: auto; + padding-inline: var(--docs-frame-gutter, 1rem); +} diff --git a/theme/stylesheets/navigation.css b/theme/stylesheets/navigation.css new file mode 100644 index 0000000000..c89198ec73 --- /dev/null +++ b/theme/stylesheets/navigation.css @@ -0,0 +1,64 @@ +.md-sidebar { min-width: 0; border-color: transparent; } +.md-sidebar__inner { padding-top: 1.9rem; } +.md-sidebar--primary .md-sidebar__scrollwrap, .md-sidebar--primary .md-sidebar__inner, .md-sidebar--primary .md-nav { min-width: 0; max-width: 100%; } +.md-nav { width: 100%; min-width: 0; font-size: .875rem; line-height: 1.45; } +.md-nav--primary .md-nav__item { font-size: .875rem; line-height: 1.45; } +.md-nav--primary .md-nav__link { margin: .06rem 0; padding: .34rem .5rem; border: 0; border-radius: var(--docs-radius-sm); color: var(--docs-text-secondary); font-weight: 400; transition: background-color .12s ease, color .12s ease; } +.md-nav__link:hover { color: var(--docs-text); background: color-mix(in srgb, var(--docs-text) 4%, transparent); } +.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link { padding: .5rem; color: var(--docs-text); background: transparent; font-size: .75rem; font-weight: 700; letter-spacing: .025em; text-transform: uppercase; } + +.md-sidebar--primary .md-nav--primary > .md-nav__list { padding-inline: 1rem; } +.md-sidebar--primary .md-nav--primary .md-nav__link { margin-inline: 0; padding: .5rem; border-radius: var(--docs-radius-sm); } +.docs-nav-section-icon { flex: 0 0 .95rem; width: .95rem; height: .95rem; margin-right: .45rem; color: var(--docs-text-secondary); } +.docs-nav-section-icon--standalone { color: var(--docs-text-secondary); transition: color .12s ease; } +.md-nav__link--active .docs-nav-section-icon--standalone { color: var(--docs-link); } + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item { margin-block: .25rem; } +.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link { margin-top: 0; } +.md-sidebar--primary .md-nav__link:is(:hover, :focus-visible) { color: var(--docs-text); background: var(--docs-bg-secondary); } +.md-sidebar--primary .md-nav__item .md-nav__link--active { background: var(--docs-bg-brand); } +.md-sidebar--primary .md-nav__item .md-nav__link--active:is(:hover, :focus-visible) { color: var(--docs-link); background: var(--docs-bg-brand); } + +.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link--active { color: var(--docs-link); background: var(--docs-bg-brand); font-weight: 600; } +.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link:is(:hover, :focus-visible) { color: var(--docs-text); background: var(--docs-bg-secondary); } +.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link--active:is(:hover, :focus-visible) { color: var(--docs-link); background: var(--docs-bg-brand); } +.md-nav__item .md-nav__link--active { padding: .34rem .5rem; border: 0; border-radius: var(--docs-radius); background: transparent; box-shadow: none; color: var(--docs-link); font-weight: 600; } +.md-nav__item .md-nav__link--active:hover { background: color-mix(in srgb, var(--docs-link) 7%, transparent); } +.md-nav__icon { display: inline-grid; place-items: center; } + +.md-nav--primary .md-nav__link .md-nav__icon { min-width: 0; min-height: 0; width: .8rem; height: .8rem; font-size: .8rem; line-height: 1; } +.md-nav__icon::after { display: none; } +.md-nav__icon .docs-ionicon { width: .8rem; height: .8rem; color: var(--docs-text-tertiary); opacity: .72; transition: transform .16s ease, color .12s ease, opacity .12s ease; } +.md-nav__link:hover .md-nav__icon .docs-ionicon { color: var(--docs-text-secondary); opacity: 1; } +.md-nav__item--nested > .md-nav__toggle:checked ~ .md-nav__link .docs-ionicon--nav { transform: rotate(90deg); } +.md-source__icon .docs-ionicon { display: block; width: 1.2rem; height: 1.2rem; } + +.md-nav--primary .md-nav__toggle ~ .md-nav { margin: 0; padding: 0; border: 0; } +.md-nav--primary .md-nav__toggle ~ .md-nav > .md-nav__list { padding-left: 0; } + +.md-nav--primary .md-nav .md-nav__toggle ~ .md-nav > .md-nav__list { padding-left: .8rem; } +.md-sidebar__scrollwrap { overscroll-behavior: contain; scrollbar-color: auto !important; scrollbar-gutter: auto; scrollbar-width: auto !important; } +.md-sidebar__scrollwrap::-webkit-scrollbar, .md-sidebar__scrollwrap::-webkit-scrollbar-thumb, .md-sidebar__scrollwrap::-webkit-scrollbar-track { width: auto; height: auto; background: initial !important; } +.md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover { background: initial !important; } + +.md-sidebar--secondary .md-sidebar__inner { padding-top: 2.1rem; } +.md-sidebar--secondary .md-nav__title { padding: 0 0 .65rem; margin: 0; background: transparent; box-shadow: none; color: var(--docs-text); font-size: .875rem; font-weight: 600; letter-spacing: -.01em; } +.md-sidebar--secondary .md-nav__list { padding-left: .75rem; border-left: 1px solid var(--docs-border); } +.md-sidebar--secondary .md-nav__link { padding: .26rem 0; color: var(--docs-text-tertiary); font-size: .8125rem; } +.md-sidebar--secondary .md-nav__link:hover { background: transparent; color: var(--docs-text-secondary); } +.md-sidebar--secondary .md-nav__item .md-nav__link--active, .md-sidebar--secondary .md-nav__item .md-nav__link.docs-toc-active { position: relative; padding: .24rem 0; background: transparent; box-shadow: none; color: var(--docs-link); font-weight: 600; } +.md-sidebar--secondary .md-nav__item .md-nav__link--active::before, .md-sidebar--secondary .md-nav__item .md-nav__link.docs-toc-active::before { position: absolute; top: .26rem; bottom: .26rem; left: -0.81rem; width: 2px; border-radius: 2px; background: var(--docs-link); content: ""; } + +.docs-toc-scrollspy .md-sidebar--secondary .md-nav__item .md-nav__link--active:not(.docs-toc-active) { position: static; padding: .26rem 0; background: transparent; box-shadow: none; color: var(--docs-text-tertiary); font-weight: 400; } +.docs-toc-scrollspy .md-sidebar--secondary .md-nav__item .md-nav__link--active:not(.docs-toc-active)::before { content: none; } + +.md-path { margin: 0 0 .35rem; padding: 0; font-size: .8125rem; } +.md-path__list { display: flex; flex-wrap: wrap; gap: .1rem; align-items: center; } +.md-path__item { display: flex; flex: 0 0 auto; align-items: center; white-space: nowrap; } +.md-path__item, .md-path__link { color: var(--docs-text-tertiary); } +.md-path__link { text-decoration: none; } +.md-path__link:hover { color: var(--docs-link); } +.md-path__item:not(:last-child)::after { display: none; } +.md-path__item + .md-path__item::before { display: none; } +.docs-ionicon--breadcrumb { flex: 0 0 .8rem; width: .8rem; height: .8rem; margin: 0 .2rem; color: var(--docs-text-tertiary); } +.md-path__item:first-child .docs-ionicon--breadcrumb { display: none; } diff --git a/theme/stylesheets/responsive.css b/theme/stylesheets/responsive.css new file mode 100644 index 0000000000..a986223d47 --- /dev/null +++ b/theme/stylesheets/responsive.css @@ -0,0 +1,127 @@ +@media screen and (min-width: 76.25em) { + + :root { --docs-frame-gutter: 2rem; } + + .md-main__inner { + --docs-primary-rail-width: 16rem; + --docs-toc-width: 12rem; + --docs-grid-gap: 2rem; + position: relative; + display: grid; + grid-template-columns: var(--docs-primary-rail-width) minmax(0, 1fr) var(--docs-toc-width); + column-gap: var(--docs-grid-gap); + } + + .md-main__inner::before { position: absolute; top: -1.5rem; bottom: 0; z-index: 1; width: 1px; background: var(--docs-border); content: ""; pointer-events: none; } + [dir="ltr"] .md-main__inner::before { left: calc(var(--docs-frame-gutter) + var(--docs-primary-rail-width) + var(--docs-grid-gap) / 2); } + [dir="rtl"] .md-main__inner::before { right: calc(var(--docs-frame-gutter) + var(--docs-primary-rail-width) + var(--docs-grid-gap) / 2); } + + .md-main__inner:has(.docs-error) { grid-template-columns: minmax(0, 38rem); justify-content: center; } + .md-main__inner:has(.docs-error)::before { content: none; } + .md-sidebar { width: auto; max-width: none; } + .md-sidebar--secondary { margin-left: 0; } + .md-content { min-width: 0; max-width: none; } + .md-header__button[data-drawer-trigger] { display: none; } + .md-nav--primary > .md-nav__title { display: none; } + + .md-path { margin-top: 1.25rem; margin-right: 1.2rem; margin-left: 1.2rem; } + .md-sidebar--primary { padding-top: .75rem; } + .md-sidebar--secondary { padding-top: .75rem; } + + [dir="ltr"] .md-sidebar--primary .md-sidebar__inner { padding-right: 0; } + [dir="rtl"] .md-sidebar--primary .md-sidebar__inner { padding-left: 0; } + + .md-sidebar--primary .md-sidebar__inner, + .md-sidebar--primary .md-nav--primary { width: 100%; max-width: none; box-sizing: border-box; } + [dir="ltr"] .md-sidebar--secondary .md-sidebar__inner { padding-right: 2rem; } + [dir="rtl"] .md-sidebar--secondary .md-sidebar__inner { padding-left: 2rem; } + + .md-sidebar--primary .md-sidebar__scrollwrap { margin-inline: 0; } + + .md-sidebar--primary .md-sidebar__scrollwrap { scrollbar-gutter: stable !important; } + + .md-sidebar--primary .md-nav--primary > .md-nav__list { padding-inline: 0; } + .md-sidebar--primary .md-nav--primary .md-nav__link { margin-inline: 0; } + [dir="ltr"] .md-sidebar--primary .md-nav--primary .md-nav__link { margin-right: 0; } + [dir="rtl"] .md-sidebar--primary .md-nav--primary .md-nav__link { margin-left: 0; } + + .md-sidebar__inner, .md-sidebar--secondary .md-sidebar__inner { padding-top: 0; } +} + +@media screen and (min-width: 80em) { + + .md-main__inner { --docs-primary-rail-width: 18rem; --docs-toc-width: 14rem; --docs-grid-gap: 3rem; } +} + +@media screen and (max-width: 76.2344em) { + .md-sidebar--secondary:not([hidden]) { display: none; } + + .md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link { margin-top: .25rem; } + + .md-nav--primary .md-nav__title .md-nav__icon::after { display: none; } + + .md-path { padding-inline: 1rem; } + + .md-sidebar--primary { --docs-nav-rail-width: min(20rem, calc(100vw - 3.5rem)); width: var(--docs-nav-rail-width); max-width: none; flex-basis: var(--docs-nav-rail-width); border: 0; box-shadow: none; background: var(--docs-bg); } + + .md-sidebar--primary .md-nav--primary, + .md-sidebar--primary .md-nav--primary .md-nav { width: var(--docs-nav-rail-width); min-width: var(--docs-nav-rail-width); max-width: var(--docs-nav-rail-width); box-sizing: border-box; } + .md-sidebar--primary .md-nav--primary .md-nav > .md-nav__list { box-sizing: border-box; padding-inline: 1rem; } + + .md-sidebar--primary .md-nav--primary .md-nav > .md-nav__list > .md-nav__item { margin-block: .25rem; } + + .md-sidebar--primary .md-nav__item--nested > .md-nav__toggle:checked ~ .md-nav { z-index: 2; } + + .md-sidebar--primary .md-nav--primary[data-md-level="0"] > .md-nav__source { display: none; } + .md-sidebar--primary .md-nav--primary[data-md-level="0"] > .md-nav__list { padding-top: .75rem; } + .md-sidebar--primary .md-nav__title { border-bottom: 0; box-shadow: none; } + .md-sidebar--primary .md-nav--primary .md-nav > .md-nav__list { box-shadow: none; } + .md-sidebar--primary .md-sidebar__inner { padding-top: 0; } + [dir="ltr"] .md-sidebar--primary { left: 0; transform: translateX(calc(-1 * var(--docs-nav-rail-width))); } + [dir="rtl"] .md-sidebar--primary { right: 0; transform: translateX(var(--docs-nav-rail-width)); } + [data-md-toggle="drawer"]:checked ~ .md-container .md-sidebar--primary { transform: translateX(0); box-shadow: none; } + [dir="rtl"] [data-md-toggle="drawer"]:checked ~ .md-container .md-sidebar--primary { transform: translateX(0); } + [dir="ltr"] .md-sidebar--primary .md-sidebar__inner { padding-right: .75rem; } + [dir="rtl"] .md-sidebar--primary .md-sidebar__inner { padding-left: .75rem; } +} +@media screen and (min-width: 60em) and (max-width: 76.2344em) { + .md-header__inner { grid-template-columns: auto auto minmax(15rem, 30rem) minmax(0, 1fr) auto auto auto; } + .md-header__button[data-drawer-trigger] { order: -1; } + .md-main__inner { justify-content: center; } +} +@media screen and (min-width: 40.01em) and (max-width: 76.2344em) { + .topic-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } + .topic-row .topic-card:last-child { grid-column: 1 / -1; } +} +@media screen and (max-width: 59.9844em) { + .md-header__inner { grid-template-columns: auto auto auto minmax(0, 1fr) auto; min-height: 3.75rem; gap: .45rem; } + .md-header__button.md-logo img { height: 1.5rem; } + .md-header__button[data-drawer-trigger] { order: -1; } + .docs-search-trigger { grid-column: auto; width: auto; min-height: auto; justify-self: start; padding: .35rem; border: 0; background: transparent; } + .docs-search-trigger span, .docs-search-trigger kbd { display: none; } + .docs-header__cta { display: none; } + .version-select-container { grid-column: auto; margin-left: auto; } + .md-header [data-md-component="palette"] { grid-column: auto; } + .version-select-container .select-css { width: auto; max-width: 41vw; height: 2.35rem; } + .md-typeset h1 { font-size: 1.75rem; } + .docs-feedback { grid-template-columns: 1fr; } + .docs-feedback__choices { grid-column: 1; grid-row: auto; margin-top: .5rem; } + .docs-feedback button { min-height: 2.75rem; } + .docs-footer a, .docs-feedback__links a { display: inline-flex; min-height: 2.75rem; align-items: center; } + .docs-page-nav { grid-template-columns: 1fr; } + .docs-page-nav__next { grid-column: 1; text-align: left; } + .docs-footer__inner { flex-direction: column; } + .docs-footer__meta { justify-items: start; text-align: left; } +} +@media screen and (max-width: 40em) { + .content-columns-wrapper, .topic-row { grid-template-columns: 1fr; gap: .75rem; } + .topic-row .topic-card:last-child { grid-column: auto; } + .md-typeset #tool-versions + ul, .md-typeset #tool-versions + p + ul { grid-template-columns: 1fr; } +} +@media screen and (max-width: 27rem) { + .md-header__button.md-logo { width: 2rem; padding: .25rem; } + .md-header__button.md-logo img { height: 1.5rem; } + .md-toggle[data-md-toggle="search"]:checked ~ .md-header .md-search { background: color-mix(in srgb, var(--docs-bg) 42%, transparent); } + .md-toggle[data-md-toggle="search"]:checked ~ .md-header .md-search__inner { width: calc(100vw - 1rem); height: auto; max-height: calc(100dvh - 4.5rem - env(safe-area-inset-bottom)); margin-top: 4rem; border-radius: var(--docs-radius); } + .md-search .md-search__output, .md-search .md-search__scrollwrap { max-height: calc(100dvh - 7.5rem - env(safe-area-inset-bottom)) !important; } +} diff --git a/theme/stylesheets/tokens.css b/theme/stylesheets/tokens.css new file mode 100644 index 0000000000..ba7e2db9f5 --- /dev/null +++ b/theme/stylesheets/tokens.css @@ -0,0 +1,114 @@ +:root, +[data-md-color-scheme="codacy-light"] { + --docs-bg: #FFFFFF; + --docs-bg-secondary: #F9FAFB; + --docs-bg-subtle: #EFF1F5; + --docs-bg-brand: #E5EFFF; + --docs-text: #171D26; + --docs-text-secondary: #475776; + --docs-text-tertiary: #5F7399; + --docs-link: #005DF0; + --docs-link-hover: #0048BD; + --docs-border: #DFE4EC; + --docs-border-strong: #8AB7FF; + --docs-success: #339950; + --docs-success-bg: #ECF9EF; + --docs-warning: #BD7600; + --docs-warning-bg: #FFF6E5; + --docs-danger: #C8282A; + --docs-danger-bg: #FFF6F5; + --docs-code-bg: #F6F8FB; + --docs-code-text: #24324A; + --md-code-hl-color: #EAF1FF; + --md-code-hl-color--light: #EAF1FF99; + --md-code-hl-comment-color: #6D7B91; + --md-code-hl-constant-color: #0550AE; + --md-code-hl-function-color: #8250DF; + --md-code-hl-generic-color: #24324A; + --md-code-hl-keyword-color: #CF222E; + --md-code-hl-name-color: #24324A; + --md-code-hl-number-color: #0550AE; + --md-code-hl-operator-color: #475776; + --md-code-hl-punctuation-color: #475776; + --md-code-hl-special-color: #116329; + --md-code-hl-string-color: #0A6B3C; + --md-code-hl-variable-color: #953800; + --docs-shadow-1: 0 1px 2px #47577626; + --docs-shadow-2: 0 12px 28px #47577633; + /* Documentation surfaces share a deliberately restrained 4px corner. */ + --docs-radius: .25rem; + --docs-radius-sm: var(--docs-radius); + --docs-radius-md: var(--docs-radius); + --docs-radius-lg: var(--docs-radius); + --docs-space-1: .25rem; + --docs-space-2: .5rem; + --docs-space-3: .75rem; + --docs-space-4: 1rem; + --docs-space-5: 1.5rem; + --docs-space-6: 2rem; + --docs-space-7: 3rem; + --md-default-bg-color: var(--docs-bg); + --md-default-fg-color: var(--docs-text); + --md-default-fg-color--light: var(--docs-text-secondary); + --md-default-fg-color--lighter: var(--docs-border); + --md-default-fg-color--lightest: var(--docs-bg-subtle); + --md-primary-fg-color: var(--docs-bg); + --md-primary-bg-color: var(--docs-text); + --md-accent-fg-color: var(--docs-link); + --md-typeset-a-color: var(--docs-link); + --md-code-bg-color: var(--docs-bg-subtle); + --md-code-fg-color: var(--docs-text); + --md-footer-bg-color: var(--docs-bg); + --md-footer-bg-color--dark: var(--docs-bg); +} + +[data-md-color-scheme="codacy-dark"] { + --docs-bg: #0B0E13; + --docs-bg-secondary: #11151D; + --docs-bg-subtle: #1D2430; + --docs-bg-brand: #091E4E; + --docs-text: #F9FAFB; + --docs-text-secondary: #D6DBE6; + --docs-text-tertiary: #96A4C0; + --docs-link: #5784FF; + --docs-link-hover: #8AB7FF; + --docs-border: #344056; + --docs-border-strong: #5784FF; + --docs-success: #66CC83; + --docs-success-bg: #12351C; + --docs-warning: #FFC157; + --docs-warning-bg: #472D00; + --docs-danger: #FB615A; + --docs-danger-bg: #3D0003; + --docs-code-bg: #11151D; + --docs-code-text: #F9FAFB; + --md-code-hl-color: #2D333B; + --md-code-hl-color--light: #2D333B80; + --md-code-hl-comment-color: #8B949E; + --md-code-hl-constant-color: #79C0FF; + --md-code-hl-function-color: #D2A8FF; + --md-code-hl-generic-color: #F0F6FC; + --md-code-hl-keyword-color: #FF7B72; + --md-code-hl-name-color: #E6EDF3; + --md-code-hl-number-color: #79C0FF; + --md-code-hl-operator-color: #C9D1D9; + --md-code-hl-punctuation-color: #C9D1D9; + --md-code-hl-special-color: #7EE787; + --md-code-hl-string-color: #A5D6FF; + --md-code-hl-variable-color: #FFA657; + --docs-shadow-1: 0 1px 2px #00000066; + --docs-shadow-2: 0 12px 28px #00000080; + --md-default-bg-color: var(--docs-bg); + --md-default-fg-color: var(--docs-text); + --md-default-fg-color--light: var(--docs-text-secondary); + --md-default-fg-color--lighter: var(--docs-border); + --md-default-fg-color--lightest: var(--docs-bg-subtle); + --md-primary-fg-color: var(--docs-bg-secondary); + --md-primary-bg-color: var(--docs-text); + --md-accent-fg-color: var(--docs-link); + --md-typeset-a-color: var(--docs-link); + --md-code-bg-color: var(--docs-bg-subtle); + --md-code-fg-color: var(--docs-text); + --md-footer-bg-color: var(--docs-bg); + --md-footer-bg-color--dark: var(--docs-bg); +}
    Language File extensionsStatic analysisSuggested fixesStatic analysisSuggested fixes Secret detection Dependency vulnerability scanningMalicious packages detection 11DuplicationComplexityMalicious packages detection 11DuplicationComplexity License scanning