diff --git a/docs/source/_static/comet-ux.js b/docs/source/_static/comet-ux.js new file mode 100644 index 0000000000..37debf8a04 --- /dev/null +++ b/docs/source/_static/comet-ux.js @@ -0,0 +1,253 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* + * Comet docs UX enhancements layered on top of pydata_sphinx_theme: + * - "Home" tab injected at the start of the top navbar (toctree can't + * self-reference, so the landing page link lives here) + * - Click-to-toggle expand/collapse arrows on sidebar nav groups + * - In-sidebar search filter with character highlighting (replaces the + * default Sphinx redirect-to-/search.html flow) + * - Verbose "Comet X.Y.Z User Guide" breadcrumb labels trimmed to "X.Y.Z" + * - Right-side TOC auto-hidden on pages with too few headings to navigate + * + * All behaviour is additive — pydata's existing keyboard navigation, theme + * switcher, search index, and toctree generation continue to work unchanged. + */ + +(function () { + 'use strict'; + + // ── Sidebar collapse/expand toggle buttons ───────────────────────── + // Pydata's toctree renders a flat