forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Add more information to the HTML sidebar
Add a new sidebar template that creates a more RTD-like "fisheye" view of the current place in the document hierarchy. It is far from ideal, but some readers may find it better for navigating through the documentation as a whole. Add some CSS trickery as well to make the table of contents less intrusive when viewing the pages on a small screen. Reviewed-by: Akira Yokosawa <[email protected]> Reviewed-by: David Gow <[email protected] Signed-off-by: Jonathan Corbet <[email protected]>
- Loading branch information
Jonathan Corbet
committed
Feb 8, 2023
1 parent
fbabc2e
commit c404f5d
Showing
3 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{# SPDX-License-Identifier: GPL-2.0 #} | ||
{# Create a local TOC the kernel way #} | ||
<p> | ||
<h3 class="kernel-toc-contents">Contents</h3> | ||
<input type="checkbox" class="kernel-toc-toggle" id = "kernel-toc-toggle" checked> | ||
<label class="kernel-toc-title" for="kernel-toc-toggle"></label> | ||
|
||
<div class="kerneltoc" id="kerneltoc"> | ||
{{ toctree(maxdepth=3) }} | ||
</div> | ||
{# hacky script to try to position the left column #} | ||
<script type="text/javascript"> <!-- | ||
var sbar = document.getElementsByClassName("sphinxsidebar")[0]; | ||
let currents = document.getElementsByClassName("current") | ||
sbar.scrollTop = currents[currents.length - 1].offsetTop; | ||
--> </script> |