Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
682fbb6
docs(style[toc,body]): refine right-panel TOC and body typography
tony Mar 14, 2026
c8a6380
docs(style[toc,content]): flexible TOC width with inner-panel padding
tony Mar 14, 2026
57728a1
docs(style[toc]): increase TOC font size from 81.25% to 87.5%
tony Mar 14, 2026
14efa69
docs(style[headings]): refine heading hierarchy — scale, spacing, eye…
tony Mar 14, 2026
56236fc
docs(fonts): self-host IBM Plex via Fontsource CDN
tony Mar 14, 2026
33a720b
docs(fonts[css]): fix variable specificity — use body instead of :root
tony Mar 14, 2026
3f74fb5
docs(fonts[preload]): add <link rel="preload"> for critical font weights
tony Mar 14, 2026
7ff9ca9
docs(fonts[css]): add kerning, ligatures, and code rendering overrides
tony Mar 14, 2026
039d2ab
docs(images[cls]): prevent layout shift and add non-blocking loading
tony Mar 14, 2026
00f55b9
docs(nav[spa]): add SPA-like navigation to avoid full page reloads
tony Mar 14, 2026
190230a
docs(fonts[fallback]): add fallback font metrics to eliminate FOUT re…
tony Mar 14, 2026
318b575
docs(images[badges]): add placeholder sizing for external badge images
tony Mar 14, 2026
d87e937
docs(sidebar[projects]): prevent active link flash with visibility gate
tony Mar 14, 2026
10470f6
docs(nav[spa]): wrap DOM swap in View Transitions API for smooth cros…
tony Mar 14, 2026
bbeceae
docs(css[structure]): move view transitions section after image rules
tony Mar 14, 2026
4f44133
docs(fonts[loading]): switch to font-display block with inline CSS
tony Mar 14, 2026
d3a5910
docs(fonts[lint]): add docstrings to sphinx_fonts extension
tony Mar 14, 2026
53345b2
test(docs[sphinx_fonts]): add tests for sphinx_fonts extension
tony Mar 14, 2026
42ae9ad
test(docs[sphinx_fonts]): fix ruff lint errors in test_sphinx_fonts
tony Mar 14, 2026
28a9659
test(docs[sphinx_fonts]): apply ruff format to test_sphinx_fonts
tony Mar 14, 2026
10d3369
test(docs[sphinx_fonts]): remove type: ignore comments for mypy compat
tony Mar 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs(sidebar[projects]): prevent active link flash with visibility gate
why: All links render visibly then JS replaces the hostname-matching
link with a bold span, causing a visible reflow.
what:
- Remove misleading class="current" from all project links
- Hide #sidebar-projects until JS resolves active state (.ready)
- Use textContent instead of innerHTML for safer DOM manipulation
  • Loading branch information
tony committed Mar 14, 2026
commit d87e93761479921446c3469e0285328f198e0199
4 changes: 4 additions & 0 deletions docs/_static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
margin-right: calc(var(--sidebar-item-spacing-horizontal) / 2.5);
}

#sidebar-projects:not(.ready) {
visibility: hidden;
}

.sidebar-tree .active {
font-weight: bold;
}
Expand Down
21 changes: 11 additions & 10 deletions docs/_templates/sidebar/projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,63 +7,64 @@

<p class="indented-block">
<span class="project-name">vcs-python</span>
<a class="internal" href="https://vcspull.git-pull.com" class="current">vcspull</a>
<a class="internal" href="https://vcspull.git-pull.com">vcspull</a>
(<a class="internal" href="https://libvcs.git-pull.com">libvcs</a>),
<a class="internal" href="https://g.git-pull.com">g</a>
</p>
<p class="indented-block">
<span class="project-name">tmux-python</span>
<a class="internal" href="https://tmuxp.git-pull.com" class="current">tmuxp</a>
<a class="internal" href="https://tmuxp.git-pull.com">tmuxp</a>
(<a class="internal" href="https://libtmux.git-pull.com">libtmux</a>)
</p>

<p class="indented-block">
<span class="project-name">cihai</span>
<span class="indent">
<a class="internal" href="https://unihan-etl.git-pull.com" class="current">unihan-etl</a>
<a class="internal" href="https://unihan-etl.git-pull.com">unihan-etl</a>
(<a class="internal" href="https://unihan-db.git-pull.com">db</a>)
</span>
<span class="indent">
<a class="internal" href="https://cihai.git-pull.com" class="current">cihai</a>
<a class="internal" href="https://cihai.git-pull.com">cihai</a>
(<a class="internal" href="https://cihai-cli.git-pull.com">cli</a>)
</span>
</p>

<p class="indented-block">
<span class="project-name">django</span>
<span class="indent">
<a class="internal" href="https://django-slugify-processor.git-pull.com" class="current">django-slugify-processor</a>
<a class="internal" href="https://django-slugify-processor.git-pull.com">django-slugify-processor</a>
</span>
<span class="indent">
<a class="internal" href="https://django-docutils.git-pull.com" class="current">django-docutils</a>
<a class="internal" href="https://django-docutils.git-pull.com">django-docutils</a>
</span>
</p>

<p class="indented-block">
<span class="project-name">docs + tests</span>
<span class="indent">
<a class="internal" href="https://gp-libs.git-pull.com" class="current">gp-libs</a>
<a class="internal" href="https://gp-libs.git-pull.com">gp-libs</a>
</span>
</p>

<p class="indented-block">
<span class="project-name">web</span>
<span class="indent">
<a class="internal" href="https://social-embed.org" class="current">social-embed</a>
<a class="internal" href="https://social-embed.org">social-embed</a>
</span>
</p>
</div>
<script type="text/javascript">
(() => {
const sidebar = document.getElementById("sidebar-projects")
const sidebar = document.getElementById("sidebar-projects");
sidebar.querySelectorAll(`a[href*="${window.location.hostname}"]`)
.forEach((link) => {
if (!link.classList.contains("active")) {
const d = document.createElement('span');
d.innerHTML = link.innerHTML;
d.textContent = link.textContent;
d.classList.add("active");
link.parentNode.replaceChild(d, link);
}
});
sidebar.classList.add('ready');
})()
</script>