Nowadays smartphones are long but narrow. On many devices, the sidebar
is visible (and impossible to hide) in landscape mode.
Long term it would be better to implement sidebar hiding regardless of
device size, but that may require cookies - otherwise some people will
have to hide the sidebar manually on all links.
This commit adds a small piece of Javascript code to force browsers to forget
about incorrectly issued 301 redirects from "latest" versions.
This code only runs for root project paths (i.e. `/linux/v6.10.2/source`, but
not `/linux/v6.10.2/source/arch`) - other links with "latest" will remain
broken for people who visited them (at least until they clear their cache).
Initial implementation of a new mode in which clicking on an
identifier creates a HTML popup instead of redirecting to a new page.
Skip popup if ctrl/shift/meta is held. Fix generateDocComments
Add ident css class to more ident links (docs, dtb, config...)
Make popup positioning more predicatble
* Attempt to move the popup if a part of it is rendered outside of the viewport
* Make popup full-width on smartphone/small tablet devices
Hide popup on escape click
Add "use strict" and fix undeclared variable errors
To do that we use a slightly modified version of the script found here:
https://github.com/autocompletejs/autocomplete.js/tree/2.7
This code is under MIT licence so it's compatible with Elixir's licence
The server answers requests from the script via a new interface:
https://elixir.bootlin.com/acp?q=<query>&f=<family>&p=<project>
And this is handled by autocomplete.py
The script creates and uses a tmp file to store idents for each project
in order to reduce the time needed to answer a request.
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
Keep old urls compatibility by settings family to C when nothing is
given.
Add a select element to select in which file family we want to search an
ident.
Update filters to support families and to handle Kconfig idents properly.
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
- Change the few files that use leading tabs into leading spaces.
This way they match the other files in the repo.
- Add an EditorConfig file so that supported editors will automatically
use spaces instead of tabs.
- (Extra) Add some common editor backup-file extensions to .gitignore.
- A database rebuild is needed after some indexing changes
(aca12c5c) and a tokenizer bug fix (dbec4df)
- This version change also shows the progress and maturity of the
project, now supporting the source code of 16 projects.
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>