diff --git a/docs/source/_static/css/cb_theme.css b/docs/source/_static/css/cb_theme.css index 9d5e7a5..38d8682 100644 --- a/docs/source/_static/css/cb_theme.css +++ b/docs/source/_static/css/cb_theme.css @@ -1,358 +1,994 @@ -@import '../classic.css'; +@import "../classic.css"; @font-face { font-family: "Open Sans"; - src: url(../font/OpenSans-Light.ttf); + src: local("Open Sans"), local("OpenSans"), + url("../font/OpenSans-Light.ttf") format("truetype"); + font-weight: 300; + font-style: normal; + font-display: swap; +} + +:root { + color-scheme: light; + --cb-bg: #eef3f8; + --cb-bg-top: #f7fafd; + --cb-page-glow: rgba(255, 130, 0, 0.08); + --cb-surface: #ffffff; + --cb-surface-muted: #f6f9fc; + --cb-border: #d8e2ee; + --cb-border-strong: #c0cfdf; + --cb-text: #203247; + --cb-text-muted: #5d6f82; + --cb-heading: #10263f; + --cb-brand: #ff8200; + --cb-brand-deep: #db6d00; + --cb-nav: #0f2340; + --cb-nav-2: #16365b; + --cb-link: #0e5ea8; + --cb-link-hover: #ff8200; + --cb-code-bg: #10263f; + --cb-code-inline: #edf3fb; + --cb-code-border: rgba(14, 94, 168, 0.1); + --cb-code-inline-text: #11497d; + --cb-code-block-border: rgba(16, 38, 63, 0.18); + --cb-note-bg: #f3f8fe; + --cb-note-border: #90b8de; + --cb-warning-bg: #fff4e8; + --cb-warning-border: #ffb669; + --cb-panel-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 252, 0.98)); + --cb-related-bg: rgba(255, 255, 255, 0.92); + --cb-related-border: rgba(192, 207, 223, 0.75); + --cb-related-shadow: 0 10px 28px rgba(16, 38, 63, 0.08); + --cb-sidebar-bg: + linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 20%), + linear-gradient(180deg, var(--cb-nav) 0%, var(--cb-nav-2) 100%); + --cb-sidebar-border: rgba(255, 255, 255, 0.08); + --cb-sidebar-shadow: 0 24px 44px rgba(15, 35, 64, 0.2); + --cb-card-border: rgba(216, 226, 238, 0.9); + --cb-card-shadow: 0 8px 18px rgba(16, 38, 63, 0.04); + --cb-card-shadow-hover: 0 12px 26px rgba(16, 38, 63, 0.08); + --cb-table-head-bg: linear-gradient(180deg, #f5f9fd, #ebf2f9); + --cb-blockquote-border: rgba(255, 130, 0, 0.5); + --cb-headerlink-hover-bg: var(--cb-nav); + --cb-shadow: 0 18px 48px rgba(16, 38, 63, 0.09); + --cb-anchor-offset: 4.75rem; + --cb-sidebar-top: 5.5rem; + --cb-sidebar-bottom-gap: 2rem; +} + +html[data-theme="dark"] { + color-scheme: dark; + --cb-bg: #0a1320; + --cb-bg-top: #0f1725; + --cb-page-glow: rgba(255, 130, 0, 0.14); + --cb-surface: #101c2c; + --cb-surface-muted: #152437; + --cb-border: #26384d; + --cb-border-strong: #334b64; + --cb-text: #d9e5f2; + --cb-text-muted: #97acc3; + --cb-heading: #f5f9ff; + --cb-brand: #ff8200; + --cb-brand-deep: #ffb15d; + --cb-nav: #07111d; + --cb-nav-2: #10233b; + --cb-link: #8bccff; + --cb-link-hover: #ffb15d; + --cb-code-bg: #07111d; + --cb-code-inline: #1a2a3d; + --cb-code-border: rgba(139, 204, 255, 0.18); + --cb-code-inline-text: #d8ebff; + --cb-code-block-border: rgba(139, 204, 255, 0.16); + --cb-note-bg: #12263a; + --cb-note-border: #3a678f; + --cb-warning-bg: #3a2715; + --cb-warning-border: #f0a34d; + --cb-panel-bg: linear-gradient(180deg, rgba(16, 28, 44, 0.98), rgba(12, 21, 34, 0.98)); + --cb-related-bg: rgba(10, 19, 32, 0.92); + --cb-related-border: rgba(51, 75, 100, 0.82); + --cb-related-shadow: 0 12px 28px rgba(0, 0, 0, 0.32); + --cb-sidebar-bg: + linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 20%), + linear-gradient(180deg, #07111d 0%, #10233b 100%); + --cb-sidebar-border: rgba(139, 204, 255, 0.1); + --cb-sidebar-shadow: 0 24px 48px rgba(0, 0, 0, 0.34); + --cb-card-border: rgba(51, 75, 100, 0.78); + --cb-card-shadow: 0 10px 20px rgba(0, 0, 0, 0.18); + --cb-card-shadow-hover: 0 14px 28px rgba(0, 0, 0, 0.26); + --cb-table-head-bg: linear-gradient(180deg, #17283c, #122133); + --cb-blockquote-border: rgba(255, 130, 0, 0.6); + --cb-headerlink-hover-bg: #10233b; + --cb-shadow: 0 22px 54px rgba(0, 0, 0, 0.28); +} + +html { + scroll-behavior: smooth; +} + +section[id], +span[id], +dt[id], +caption[id], +figure[id], +table[id] { + scroll-margin-top: var(--cb-anchor-offset); } body { - background-color: #111827 !important; - font-family: "Open Sans", sans-serif !important; + margin: 0; + background: + radial-gradient(circle at top right, var(--cb-page-glow), transparent 22rem), + linear-gradient(180deg, var(--cb-bg-top) 0%, var(--cb-bg) 18rem, var(--cb-bg) 100%); + color: var(--cb-text); + font-family: "Open Sans", "Avenir Next", "Segoe UI", sans-serif; + line-height: 1.7; +} + +a { + color: var(--cb-link); + text-decoration-thickness: 0.08em; + text-underline-offset: 0.15em; + transition: color 140ms ease, text-decoration-color 140ms ease; +} + +a:hover { + color: var(--cb-link-hover); +} + +div.document { + display: grid; + grid-template-columns: 18rem minmax(0, 1fr); + align-items: start; + column-gap: 0.9rem; + min-width: 0; + max-width: 1440px; + margin: 0 auto; + background: transparent; +} + +div.related { + position: sticky; + top: 0; + z-index: 30; + width: auto; + box-sizing: border-box; + height: auto; + line-height: 1.55rem; + margin: 0 1.5rem; + border: 1px solid var(--cb-related-border); + border-radius: 0 0 18px 18px; + background: var(--cb-related-bg); + backdrop-filter: blur(16px); + box-shadow: var(--cb-related-shadow); +} + +div.related:first-of-type { + margin-top: 0; +} + +div.related ul { + position: relative; + display: flex; + align-items: center; + flex-wrap: wrap; + margin: 0; + padding: 0.42rem 1.15rem; + background: transparent; +} + +div.related li { + display: inline-flex; + align-items: center; + color: var(--cb-text-muted); + font-size: 0.92rem; + font-weight: 600; + letter-spacing: 0.01em; +} + +div.related li.nav-item { + margin-right: 0.4rem; } -.document .bodywrapper { - background-color: #111827 !important; +div.related li.nav-item:not(.nav-item-this) a { + margin-right: 0.4rem; } -.document .bodywrapper .body { - background-color: #111827 !important; - width: 100% !important; - max-width: 92% !important; - font-family: "Open Sans", sans-serif !important; - color: #fff !important; - box-shadow: rgba(6, 24, 44, 0.4) 0px 0px 0px 2px, rgba(6, 24, 44, 0.65) 0px 4px 6px -1px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset !important; +div.related li.right { + float: none; + min-height: 1.55rem; + order: 2; } -.document .bodywrapper .body p { - font-size: 18px !important; - font-family: "Open Sans", sans-serif !important; - font-weight: 100 !important; - line-height: 1.5 !important; +div.related li.right { + font-size: 0; } -.document .bodywrapper .body p.caption, -.document .bodywrapper .body caption, -.document .bodywrapper .body span.caption-number, -.document .bodywrapper .body span.caption-text { - font-size: 18px !important; - line-height: 1.5 !important; +div.related li.right a { + font-size: 0.92rem; } -.document .bodywrapper .body figure figcaption, -.document .bodywrapper .body figure figcaption p, -.document .bodywrapper .body div.figure p.caption { - text-align: center !important; +div.related li.right:first-child { + order: 4; } -.document .bodywrapper .body figure figcaption, -.document .bodywrapper .body div.figure p.caption { - padding-top: 0.1em !important; +div.related li.right:nth-child(2) { + order: 3; + margin-left: auto; } -.document .bodywrapper .body figure figcaption p, -.document .bodywrapper .body div.figure p.caption { - margin-top: 0.1em !important; +div.related a { + color: var(--cb-heading); } -.document .bodywrapper .body p strong, -.document .bodywrapper .body p a span { - color: #ff8200 !important; - font-size: 20px !important; +div.related li.right a { + display: inline-flex; + align-items: center; + gap: 0.35rem; + padding: 0.38rem 0.8rem; + border: 1px solid rgba(255, 130, 0, 0.18); + border-radius: 18px; + background: linear-gradient(135deg, #ff9226, var(--cb-brand)); + color: #fff; + text-transform: none; + box-shadow: 0 10px 18px rgba(255, 130, 0, 0.18); } -.document .bodywrapper .body .toctree-wrapper.compound ul li.toctree-l1 a { - color: #ff8200 !important; - font-size: 24px !important; - font-family: "Open Sans", sans-serif !important; - font-weight: 100 !important; - line-height: 2 !important; +div.related li.right a:hover { + background: linear-gradient(135deg, #ff9f3f, var(--cb-brand-deep)); + color: #fff; + text-decoration: none; } -.document .bodywrapper .body .toctree-wrapper.compound ul li ul li.toctree-l2 a { - font-family: "Open Sans", sans-serif !important; - color: #fff !important; - font-size: 18px !important; +div.related .cb-theme-toggle-item { + position: absolute; + top: 50%; + left: 50%; + margin: 0; + transform: translate(-50%, -50%); + z-index: 1; + pointer-events: none; +} + +div.related .cb-theme-toggle { + position: relative; + width: 1.95rem; + height: 1.95rem; + padding: 0; + border: 0; + border-radius: 999px; + background: transparent; + color: var(--cb-heading); + cursor: pointer; + pointer-events: auto; +} + +div.related .cb-theme-toggle::before { + content: ""; + position: absolute; + inset: 0.12rem; + border: 2px solid currentColor; + border-radius: 50%; + background: linear-gradient(90deg, currentColor 0 50%, transparent 50% 100%); +} + +div.related .cb-theme-toggle::after { + content: ""; + position: absolute; + top: 0.24rem; + bottom: 0.24rem; + left: 50%; + width: 2px; + border-radius: 999px; + background: currentColor; + transform: translateX(-50%); +} + +div.related .cb-theme-toggle[aria-pressed="true"]::before { + background: linear-gradient(90deg, transparent 0 50%, currentColor 50% 100%); +} + +div.related .cb-theme-toggle:hover { + color: var(--cb-link-hover); +} + +div.related .cb-theme-toggle:focus-visible { + outline: 2px solid rgba(255, 130, 0, 0.9); + outline-offset: 2px; +} + +.cb-visually-hidden { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +div.documentwrapper { + float: none; + grid-column: 2; + width: 100%; + margin: 0; +} + +div.bodywrapper { + margin: 2rem 1.5rem 2.5rem 0; + background: transparent; +} + +div.bodywrapper div.body { + width: auto; + max-width: 980px; + padding: 3rem clamp(1.75rem, 3vw, 3.25rem); + border: 1px solid var(--cb-card-border); + border-radius: 28px; + background: var(--cb-panel-bg); + color: var(--cb-text); + box-shadow: var(--cb-shadow); +} + +div.bodywrapper .body h1, +div.bodywrapper .body h2, +div.bodywrapper .body h3, +div.bodywrapper .body h4, +div.bodywrapper .body h5, +div.bodywrapper .body h6 { + color: var(--cb-heading); + font-family: "Open Sans", "Avenir Next", sans-serif; + letter-spacing: -0.02em; +} + +div.bodywrapper .body h1 { + margin: 0 0 1.25rem; + padding: 0 0 1rem; + border-bottom: 1px solid var(--cb-border); + font-size: clamp(2.2rem, 4vw, 3.35rem); + font-weight: 700; + line-height: 1.1; + text-align: left; + background: transparent; +} + +div.bodywrapper .body h2 { + margin: 3rem 0 1rem; + padding: 0; + border-bottom: none; + font-size: clamp(1.6rem, 2.7vw, 2.2rem); + font-weight: 700; + line-height: 1.2; + background: transparent; +} + +div.bodywrapper .body h2::after { + content: ""; + display: block; + width: 4.25rem; + height: 0.3rem; + margin-top: 0.7rem; + border-radius: 999px; + background: linear-gradient(90deg, var(--cb-brand), rgba(255, 130, 0, 0.2)); +} + +div.bodywrapper .body h3 { + margin: 2rem 0 0.75rem; + padding: 0; + font-size: clamp(1.3rem, 2.2vw, 1.65rem); + font-weight: 700; + line-height: 1.25; + background: transparent; } -.document .sphinxsidebar { - background-color: #111827 !important; +div.bodywrapper .body h4 { + display: inline-block; + margin: 1.8rem 0 0.6rem; + padding: 0.25rem 0.75rem; + border: 1px solid rgba(255, 130, 0, 0.2); + border-radius: 999px; + font-size: 1rem; + font-weight: 700; + line-height: 1.35; + color: var(--cb-brand-deep); + background: rgba(255, 130, 0, 0.08); +} + +div.bodywrapper .body a.headerlink { + display: inline-block; + width: 0.95em; + height: 0.95em; + margin-left: 0.38rem; + padding: 0; + vertical-align: baseline; + overflow: hidden; + text-indent: -9999px; + white-space: nowrap; + background-image: url("../images/headerlink.svg"); + background-position: center; + background-repeat: no-repeat; + background-size: contain; + opacity: 0.78; } -.document .sphinxsidebar .sphinxsidebarwrapper .logo { - margin: 0 !important; +div.bodywrapper .body a.headerlink:hover { + background-color: var(--cb-headerlink-hover-bg); + opacity: 1; } -.document .sphinxsidebar .sphinxsidebarwrapper h4 { - color: #fff !important; - font-size: 16px !important; - font-family: "Open Sans", sans-serif !important; - font-weight: 700 !important; - margin: 16px 0 2px !important; - text-transform: capitalize !important; +div.bodywrapper .body p, +div.bodywrapper .body ul, +div.bodywrapper .body ol, +div.bodywrapper .body dl, +div.bodywrapper .body table { + font-size: 0.98rem; } -.document .sphinxsidebar .sphinxsidebarwrapper h4::after { - content: ":" !important; +div.bodywrapper .body p, +div.bodywrapper .body li, +div.bodywrapper .body dd { + color: var(--cb-text); } -.document .sphinxsidebar .sphinxsidebarwrapper .topless a { - display: inline !important; - font-size: 18px !important; - font-family: "Open Sans", sans-serif !important; - color: #fff !important; - line-height: 1.25 !important; - padding: 0 !important; - background-color: transparent !important; - text-decoration: none !important; - transition: color 0.15s ease !important; +div.bodywrapper .body li + li { + margin-top: 0.3rem; } -.document .sphinxsidebar .sphinxsidebarwrapper .topless a:hover { - color: #ff8200 !important; +div.bodywrapper .body strong { + color: var(--cb-heading); + font-weight: 700; } -.document .sphinxsidebar .sphinxsidebarwrapper p { - margin: 5px 10px 10px 0px !important; - font-family: "Open Sans", sans-serif !important; +div.bodywrapper .body em { + color: var(--cb-text-muted); } -.document .sphinxsidebar .sphinxsidebarwrapper #searchlabel { - font-size: 18px !important; - font-family: "Open Sans", sans-serif !important; - color: #fff !important; +div.bodywrapper .body hr { + border: 0; + border-top: 1px solid var(--cb-border); } -.document .sphinxsidebar a { - color: #fff !important; +div.bodywrapper .body p a, +div.bodywrapper .body li a, +div.bodywrapper .body dd a { + font-weight: 600; } -.document .bodywrapper h1 { - font-size: 50px !important; - font-family: "Open Sans", sans-serif !important; - font-weight: 800 !important; - background-color: transparent !important; - color: #fff !important; - text-align: center !important; - border-bottom: none !important; +div.bodywrapper .body code { + padding: 0.16rem 0.42rem; + border: 1px solid var(--cb-code-border); + border-radius: 0.42rem; + background: var(--cb-code-inline); + color: var(--cb-code-inline-text); + font-size: 0.92em; } -.document .bodywrapper h2 { - font-size: 36px !important; - font-family: "Open Sans", sans-serif !important; - font-weight: 600 !important; - margin: 1.5em 0 0.5em !important; - padding: 0 !important; - border-bottom: none !important; - background-color: #111827 !important; - color: #ff8200 !important; +div.bodywrapper .body pre, +div.bodywrapper .body div.highlight { + border: 1px solid var(--cb-code-block-border); + border-radius: 8px; + background: var(--cb-code-bg); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); } -.document .bodywrapper h3 { - font-size: 30px !important; - font-family: "Open Sans", sans-serif !important; - font-weight: 600 !important; - margin: 1.25em 0 0.45em !important; - padding: 0 !important; - background-color: #111827 !important; - color: #fff !important; - width: fit-content !important; +div.bodywrapper .body div.highlight { + margin: 1.4rem 0; } -.document .bodywrapper h4 { - font-size: 26px !important; - font-family: "Open Sans", sans-serif !important; - font-weight: 600 !important; - margin: 1em 0 0.4em !important; - padding: 0 !important; - background-color: #ff8200 !important; - border-bottom: none !important; - color: #fff !important; +div.bodywrapper .body div.highlight pre { + margin: 0; + padding: 1.1rem 1.25rem; + border: 0; + background: transparent; + color: #eff5fb; + overflow-x: auto; + box-shadow: none; } -.document .bodywrapper section>h2+section>h3 { - margin-top: 0.2em !important; +div.bodywrapper .body pre, +div.bodywrapper .body pre code { + color: #eff5fb; } -.document .bodywrapper section>h3+section>h4 { - margin-top: 0.2em !important; +div.bodywrapper .body .highlight .c1, +div.bodywrapper .body .highlight .c, +div.bodywrapper .body .highlight .cm { + color: #91a9c4; } -.document .bodywrapper .highlight { - background: #153659 !important; +div.bodywrapper .body .highlight .s, +div.bodywrapper .body .highlight .s2, +div.bodywrapper .body .highlight .sa { + color: #ffd59e; } -.document .bodywrapper section p a { - color: #ff8200 !important; +div.bodywrapper .body .highlight .k, +div.bodywrapper .body .highlight .ow, +div.bodywrapper .body .highlight .nt { + color: #8fc7ff; } -.document .bodywrapper section img { - background: #1c354f; +div.bodywrapper .body .highlight .nb, +div.bodywrapper .body .highlight .nf { + color: #ffb257; } -.document .bodywrapper .highlight .nt { - color: #8cb0ff !important; +div.bodywrapper .body .highlight .go { + color: #d6dfeb; } -.document .bodywrapper .highlight .c1, -.document .bodywrapper .highlight .s, -.document .bodywrapper .highlight .s2 { - color: #fff !important; +div.bodywrapper .body img { + max-width: 100%; + border-radius: 8px; + background: var(--cb-surface-muted); } -.document .bodywrapper .highlight .nb { - color: #ff8200 !important; +div.bodywrapper .body figure, +div.bodywrapper .body div.figure, +div.bodywrapper .body .figure { + margin: 2rem 0; + text-align: center; } -.related { - background-color: #162235 !important; - height: 80px; +div.bodywrapper .body figure > a.image-reference, +div.bodywrapper .body div.figure > a.image-reference, +div.bodywrapper .body .figure > a.image-reference { + display: inline-block; +} + +div.bodywrapper .body figure img, +div.bodywrapper .body div.figure img, +div.bodywrapper .body .figure img { + display: block; + margin-right: auto; + margin-left: auto; +} + +div.bodywrapper .body .caption, +div.bodywrapper .body p.caption, +div.bodywrapper .body span.caption-text { + color: var(--cb-text-muted); + font-size: 0.96rem; +} + +div.bodywrapper .body figure figcaption, +div.bodywrapper .body figure figcaption p, +div.bodywrapper .body div.figure p.caption, +div.bodywrapper .body .figure p.caption { + text-align: center; +} + +div.bodywrapper .body aside.footnote { display: flex; - flex-direction: column; - justify-content: center; - border-bottom: 1px solid #ccc; + align-items: baseline; + gap: 0.5em; +} + +div.bodywrapper .body aside.footnote > span.label { + flex: 0 0 auto; + float: none; + padding-right: 0; + line-height: 1.3; +} + +div.bodywrapper .body aside.footnote > p { + flex: 1 1 auto; + margin: 0; +} + +div.bodywrapper .body table.docutils, +div.bodywrapper .body table { + display: block; + width: fit-content; + max-width: 100%; + table-layout: auto; + overflow-x: auto; + white-space: nowrap; + -webkit-overflow-scrolling: touch; + border: 1px solid var(--cb-border); + border-collapse: separate; + border-spacing: 0; + border-radius: 8px; + background: var(--cb-surface); + font-size: 0.9rem; +} + +div.bodywrapper .body table.docutils caption, +div.bodywrapper .body table caption { + caption-side: bottom; + position: sticky; + left: 0; + display: block; + width: 100%; + box-sizing: border-box; + padding-top: 0.75rem; + white-space: normal; + text-align: center; } -.related ul { - background-color: #162235 !important; +div.bodywrapper .body table.docutils th, +div.bodywrapper .body table th, +div.bodywrapper .body dl.field-list > dt { + padding: 0.7rem 0.75rem; + border-bottom: 1px solid var(--cb-border); + background: var(--cb-table-head-bg); + background-clip: padding-box; + color: var(--cb-heading); + font-weight: 700; } -.related ul li { - font-size: 18px !important; - font-weight: 600 !important; - font-family: "Open Sans", sans-serif !important; +div.bodywrapper .body table.docutils tr:first-child th:first-child, +div.bodywrapper .body table.docutils tr:first-child td:first-child, +div.bodywrapper .body table tr:first-child th:first-child, +div.bodywrapper .body table tr:first-child td:first-child { + border-top-left-radius: 8px; } -.related ul li.right a { - display: inline-block; - text-transform: capitalize; - padding: 10px 15px; - background-color: #ff8200; - border-radius: 5px; - transition: background-color 0.15s ease, transform 0.15s ease; +div.bodywrapper .body table.docutils tr:first-child th:last-child, +div.bodywrapper .body table.docutils tr:first-child td:last-child, +div.bodywrapper .body table tr:first-child th:last-child, +div.bodywrapper .body table tr:first-child td:last-child { + border-top-right-radius: 8px; +} + +div.bodywrapper .body table.docutils td, +div.bodywrapper .body table td, +div.bodywrapper .body dl.field-list > dd { + padding: 0.65rem 0.75rem; + border-bottom: 1px solid var(--cb-border); + overflow-wrap: anywhere; + word-break: break-word; + hyphens: auto; +} + +div.bodywrapper .body table.docutils th, +div.bodywrapper .body table th { + overflow-wrap: normal; + word-break: normal; + hyphens: none; +} + +div.bodywrapper .body table.docutils td, +div.bodywrapper .body table td { + overflow-wrap: normal; + word-break: normal; + hyphens: none; +} + +div.bodywrapper .body table.docutils td a, +div.bodywrapper .body table td a { + overflow-wrap: anywhere; + word-break: break-word; +} + +div.bodywrapper .body table.docutils tr:last-child td, +div.bodywrapper .body table tr:last-child td { + border-bottom: 0; +} + +div.bodywrapper .body .note, +div.bodywrapper .body .warning, +div.bodywrapper .body .important, +div.bodywrapper .body .tip { + margin: 1.5rem 0; + padding: 1rem 1.15rem 1rem 1.2rem; + border: 1px solid var(--cb-note-border); + border-left-width: 0.4rem; + border-radius: 16px; + background: var(--cb-note-bg); +} + +div.bodywrapper .body .warning, +div.bodywrapper .body .important { + border-color: var(--cb-warning-border); + background: var(--cb-warning-bg); +} + +div.bodywrapper .body .admonition-title { + margin: 0 0 0.35rem; + color: var(--cb-heading); + font-size: 0.96rem; + font-weight: 700; +} + +div.bodywrapper .body blockquote { + margin: 1.5rem 0; + padding: 0.4rem 0 0.4rem 1.1rem; + border-left: 0.28rem solid var(--cb-blockquote-border); + color: var(--cb-text-muted); +} + +div.bodywrapper .body .toctree-wrapper.compound { + margin-top: 2rem; +} + +div.bodywrapper .body .toctree-wrapper.compound > p.caption { + margin-bottom: 0.9rem; + color: var(--cb-heading); + font-size: 0.92rem; + font-weight: 700; + letter-spacing: 0.06em; + text-transform: uppercase; +} + +div.bodywrapper .body .toctree-wrapper.compound ul { + margin: 0; + padding: 0; + list-style: none; +} + +div.bodywrapper .body .toctree-wrapper.compound li { + margin: 0; } -.related ul li.right a:hover { - background-color: #ff9a26; - transform: scale(1.05); +div.bodywrapper .body .toctree-wrapper.compound li.toctree-l1 { + margin-top: 0.8rem; +} + +div.bodywrapper .body .toctree-wrapper.compound li.toctree-l1 > a { + display: block; + padding: 1rem 1.1rem; + border: 1px solid var(--cb-card-border); + border-radius: 16px; + background: var(--cb-surface); + color: var(--cb-heading); + font-size: 1.08rem; + font-weight: 700; text-decoration: none; + box-shadow: var(--cb-card-shadow); + transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; +} + +div.bodywrapper .body .toctree-wrapper.compound li.toctree-l1 > a:hover { + transform: translateY(-1px); + border-color: rgba(255, 130, 0, 0.35); + box-shadow: var(--cb-card-shadow-hover); + color: var(--cb-brand-deep); +} + +div.bodywrapper .body .toctree-wrapper.compound li.toctree-l2 { + margin: 0.55rem 0 0 1rem; +} + +div.bodywrapper .body .toctree-wrapper.compound li.toctree-l2 > a { + color: var(--cb-text-muted); + font-size: 0.98rem; + font-weight: 600; +} + +div.sphinxsidebar { + grid-column: 1; + grid-row: 1; + position: sticky; + top: var(--cb-sidebar-top); + float: none; + width: auto; + margin: 2rem 0 2rem 1.5rem; + padding: 0; + border: 0; + background: transparent; + font-family: "Open Sans", "Avenir Next", sans-serif; +} + +div.sphinxsidebarwrapper { + position: static; + padding: 1.3rem 1.1rem 1.2rem; + border: 1px solid var(--cb-sidebar-border); + border-radius: 24px; + background: var(--cb-sidebar-bg); + box-shadow: var(--cb-sidebar-shadow); + max-height: calc(100vh - var(--cb-sidebar-top) - var(--cb-sidebar-bottom-gap)); + overflow-y: auto; + overscroll-behavior: contain; + -ms-overflow-style: none; + scrollbar-width: none; +} + +div.sphinxsidebarwrapper::-webkit-scrollbar { + width: 0; + height: 0; } -.footer { - background-color: #111827 !important; +div.sphinxsidebarwrapper .logo { + display: block; + max-width: 10.5rem; + margin: 0 auto 1.5rem; } -.document .bodywrapper .warning { - background-color: #1c354f !important; - padding: 20px 10px !important; +div.sphinxsidebarwrapper h3, +div.sphinxsidebarwrapper h4 { + margin: 1.25rem 0 0.55rem; + color: rgba(255, 255, 255, 0.88); + font-size: 0.78rem; + font-weight: 700; + letter-spacing: 0.08em; + text-transform: uppercase; } -.document .bodywrapper th, -dl.field-list>dt { - background-color: #1c354f !important; +div.sphinxsidebarwrapper p, +div.sphinxsidebarwrapper li, +div.sphinxsidebarwrapper #searchlabel { + color: rgba(232, 240, 249, 0.82); + font-size: 0.94rem; + line-height: 1.35; } -.document .bodywrapper table.docutils th p, -.document .bodywrapper table.docutils td p { - text-align: left !important; +div.sphinxsidebar a { + color: #fff; } -.document .bodywrapper .footnote:target { - background-color: transparent !important; +div.sphinxsidebar a:hover { + color: #ffd39e; } -.document .bodywrapper .footnote-reference, -.document .bodywrapper .footnote .label, -.document .bodywrapper .footnote .label a, -.document .bodywrapper .footnote .fn-bracket { - color: #ff8200 !important; +div.sphinxsidebarwrapper ul { + margin: 0; + padding-left: 0; + list-style: none; } -.document .bodywrapper .footnote, -.document .bodywrapper .footnote p { - line-height: 1.2 !important; +div.sphinxsidebarwrapper ul ul { + margin-top: 0.25rem; + padding-left: 0.45rem; } -.document .bodywrapper .footnote { - margin: 0.2em 0 !important; +div.sphinxsidebarwrapper li { + margin: 0.08rem 0; } -.document .bodywrapper .footnote p { - margin-top: 0 !important; - margin-bottom: 0 !important; +div.sphinxsidebarwrapper li a { + display: block; + padding: 0.28rem 0.55rem; + border-radius: 0.7rem; + text-decoration: none; + line-height: 1.3; + transition: background-color 140ms ease, color 140ms ease; +} + +div.sphinxsidebarwrapper li.current > a, +div.sphinxsidebarwrapper li a:hover { + background: rgba(255, 255, 255, 0.12); +} + +div.sphinxsidebarwrapper input[type="text"] { + box-sizing: border-box; + width: 100%; + padding: 0.78rem 0.92rem; + border: 1px solid rgba(255, 255, 255, 0.18); + border-radius: 999px; + background: rgba(255, 255, 255, 0.12); + color: #fff; +} + +div.sphinxsidebarwrapper input[type="text"]::placeholder { + color: rgba(255, 255, 255, 0.6); +} + +div.sphinxsidebarwrapper input[type="submit"] { + display: inline-flex; + align-items: center; + justify-content: center; + margin-top: 0.7rem; + padding: 0.7rem 1rem; + border: 0; + border-radius: 999px; + background: linear-gradient(135deg, #ff9226, var(--cb-brand)); + color: #fff; + font-weight: 700; + cursor: pointer; } -.document .bodywrapper .note { - background-color: #1c354f !important; +div.sphinxsidebarwrapper .searchformwrapper { + margin-top: 0.7rem; } -.document .bodywrapper .highlight .go { - color: #ddd !important +div.sphinxsidebarwrapper form.search { + display: grid; + grid-template-columns: minmax(0, 1fr) auto; + gap: 0.55rem; + align-items: center; } -.document .bodywrapper code { - background-color: #284a6d !important; +div.sphinxsidebarwrapper form.search input[type="submit"] { + margin-top: 0; + min-width: 3rem; + padding-inline: 0.9rem; } -@media only screen and (max-width: 600px) { - .document .bodywrapper { - margin: 0 0 0 150px !important; +div.footer { + width: auto; + box-sizing: border-box; + margin: 0 1.5rem 0; + padding: 1.1rem 1.25rem 2rem; + color: var(--cb-text-muted); + text-align: right; +} + +div.footer a { + color: var(--cb-link); +} + +@media only screen and (max-width: 1080px) { + div.document { + display: block; } - .document .bodywrapper .body { - max-width: 78% !important; + div.related { + margin: 0 1rem; + border-radius: 0 0 16px 16px; } - .document h1 { - margin: 0 !important; - padding: 0 !important; - font-size: 25px !important; + div.sphinxsidebar { + float: none; + width: auto; + margin: 1.25rem 1rem 0; } - .document .bodywrapper h2 { - font-size: 23px !important; + div.sphinxsidebarwrapper { + position: static; + max-height: none; + overflow-y: visible; } - .document .bodywrapper h3 { - font-size: 21px !important; + div.bodywrapper { + margin: 1rem; + } + + div.bodywrapper div.body { + max-width: none; + padding: 2.2rem 1.5rem; + border-radius: 22px; + } +} + +@media only screen and (max-width: 720px) { + body { + background: + radial-gradient(circle at top right, var(--cb-page-glow), transparent 14rem), + linear-gradient(180deg, var(--cb-bg-top) 0%, var(--cb-bg) 12rem, var(--cb-bg) 100%); } - .document .bodywrapper h4 { - font-size: 19px !important; + div.related ul { + padding: 0.8rem 1rem; } - .document .sphinxsidebar { - width: 150px !important; + div.related li { + font-size: 0.86rem; } - .document .bodywrapper .body p { - font-size: 14px !important; + div.related .cb-theme-toggle { + width: 1.75rem; + height: 1.75rem; } - .document .bodywrapper .body p strong, - .document .bodywrapper .body p a span { - font-size: 17px !important; + div.bodywrapper div.body { + padding: 1.8rem 1.15rem; + border-radius: 18px; } - .document .bodywrapper .body p.caption, - .document .bodywrapper .body caption, - .document .bodywrapper .body span.caption-number, - .document .bodywrapper .body span.caption-text { - font-size: 14px !important; + div.bodywrapper .body h1 { + font-size: 2rem; } - .document .bodywrapper .body .toctree-wrapper.compound ul li.toctree-l1 a { - font-size: 20px !important; + div.bodywrapper .body p, + div.bodywrapper .body ul, + div.bodywrapper .body ol, + div.bodywrapper .body dl, + div.bodywrapper .body table { + font-size: 0.98rem; } - .document .bodywrapper .body .toctree-wrapper.compound ul { - padding: 5px !important; + div.bodywrapper .body .toctree-wrapper.compound li.toctree-l1 > a { + padding: 0.9rem 1rem; } - .document .bodywrapper .body .toctree-wrapper.compound ul li ul li.toctree-l2 a { - font-size: 16px !important; + div.sphinxsidebarwrapper form.search { + grid-template-columns: 1fr; } - .document .bodywrapper .body .toctree-wrapper.compound ul li ul { - padding: 0 0 0 10px; + div.sphinxsidebarwrapper form.search input[type="submit"] { + width: 100%; } } diff --git a/docs/source/_static/images/headerlink.svg b/docs/source/_static/images/headerlink.svg new file mode 100644 index 0000000..0af312a --- /dev/null +++ b/docs/source/_static/images/headerlink.svg @@ -0,0 +1,4 @@ + + + + diff --git a/docs/source/_static/js/cb_theme.js b/docs/source/_static/js/cb_theme.js new file mode 100644 index 0000000..663bc0e --- /dev/null +++ b/docs/source/_static/js/cb_theme.js @@ -0,0 +1,98 @@ +(function () { + var STORAGE_KEY = "cb-docs-theme"; + var root = document.documentElement; + + function readStoredTheme() { + try { + var stored = window.localStorage.getItem(STORAGE_KEY); + if (stored === "light" || stored === "dark") { + return stored; + } + } catch (error) { + return "light"; + } + + return "light"; + } + + function currentTheme() { + return root.getAttribute("data-theme") === "dark" ? "dark" : "light"; + } + + function nextTheme(theme) { + return theme === "dark" ? "light" : "dark"; + } + + function applyTheme(theme, persist) { + root.setAttribute("data-theme", theme); + root.style.colorScheme = theme; + + if (persist) { + try { + window.localStorage.setItem(STORAGE_KEY, theme); + } catch (error) { + /* Ignore storage failures. */ + } + } + + syncToggleButton(); + } + + function syncToggleButton() { + var button = document.querySelector(".cb-theme-toggle"); + if (!button) { + return; + } + + var theme = currentTheme(); + var targetTheme = nextTheme(theme); + var label = targetTheme === "dark" ? "Switch to dark mode" : "Switch to light mode"; + var hiddenText = button.querySelector(".cb-visually-hidden"); + + if (hiddenText) { + hiddenText.textContent = label; + } + + button.setAttribute("aria-label", label); + button.setAttribute("title", label); + button.setAttribute("aria-pressed", theme === "dark" ? "true" : "false"); + button.setAttribute("data-theme-target", targetTheme); + } + + function handleToggleClick() { + applyTheme(nextTheme(currentTheme()), true); + } + + function mountToggle() { + var relatedNav = document.querySelector(".related ul"); + if (!relatedNav || relatedNav.querySelector(".cb-theme-toggle-item")) { + syncToggleButton(); + return; + } + + var item = document.createElement("li"); + item.className = "cb-theme-toggle-item"; + + var button = document.createElement("button"); + button.type = "button"; + button.className = "cb-theme-toggle"; + button.addEventListener("click", handleToggleClick); + + var hiddenText = document.createElement("span"); + hiddenText.className = "cb-visually-hidden"; + button.appendChild(hiddenText); + + item.appendChild(button); + relatedNav.appendChild(item); + + syncToggleButton(); + } + + applyTheme(readStoredTheme(), false); + + if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", mountToggle); + } else { + mountToggle(); + } +})(); diff --git a/docs/source/conf.py b/docs/source/conf.py index 284d43b..ccc8859 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -45,6 +45,9 @@ html_css_files = [ 'css/cb_theme.css', ] +html_js_files = [ + 'js/cb_theme.js', +] # Disable link "index" html_use_index = False