Commit graph

46 commits

Author SHA1 Message Date
Franciszek Stachura
9e18f26aeb Restructure Elixir to avoid Python path hacks
* Move static files from http to a new directory
2024-08-27 11:33:18 +02:00
Franciszek Stachura
e8da1bf578 Reduce sidebar flashing on navigation
by moving some dynamic HTML generation to templates.
Also fixes no-js CSS a bit by hiding useless elements.
2024-08-20 14:32:52 +02:00
Franciszek Stachura
7d629429bf Generate different meta tag descriptions for different views
Added an ability to customize contents of meta description tag in
templates that inherit from layout. This replaces the default
description previously used in all views.
This change could help with SEO and missing descriptions in search
results (#167). It's based on advice from
https://developers.google.com/search/docs/appearance/snippet

> Create unique descriptions for each page on your site
> Programmatically generate descriptions

This is not guaranteed to fix the issue, search engines are opaque.

All custom descriptions start with "Elixir Cross Referencer - ".

Currently customized descriptions:
* source - path to the file, project name and version
* ident - name of the searched identifier, project name and version

Everything else uses the previous, default description.
2024-08-20 10:35:17 +02:00
Franciszek Stachura
0de9a05d1f Increase min-width for tablet mode
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.
2024-08-19 17:30:29 +02:00
Franciszek Stachura
22296b6cf8 Fix incorrectly issued 301 redirects on latest for project roots
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).
2024-08-06 12:47:40 +02:00
Franciszek Stachura
decc2680b2 Move title generation to templates 2024-07-30 15:16:11 +02:00
Franciszek Stachura
ee4ccdeb80 Provide base source and ident URLs for project and tag as variables 2024-07-30 14:10:51 +02:00
Franciszek Stachura
d107fa27aa Remove current_url template variable
Now that the base tag is gone it's not useful anymore

* Make line number links use relative paths
2024-07-30 14:10:51 +02:00
Franciszek Stachura
8cf71f5e62 Remove base tag and baseurl template variable 2024-07-30 14:10:51 +02:00
Franciszek Stachura
21802b3203 Make dynamic references popup use absolute paths 2024-07-30 14:10:51 +02:00
Franciszek Stachura
edce92a64c Make url in templates and web.py absolute
This is a step to removing the base tag. Once everything uses absolute
URLs, base tag will be removed and some URLs will be replaced
by relative URLs.
2024-07-30 14:10:51 +02:00
Franciszek Stachura
5c6e604b9b Generate links for versions sidebar outside of template context
* Replace url variable with current_url that contains the current
  absolute url. This gets us a little closer to getting rid of the base
  tag
2024-07-30 14:10:51 +02:00
Franciszek Stachura
dbc7191060 Change template variable names to be more descriptive 2024-07-30 14:10:51 +02:00
Franciszek Stachura
f08aeb7b76 Split layout into sidebar and topbar 2024-07-30 12:49:29 +02:00
Franciszek Stachura
36ae9046f4 Move ident template to a new file 2024-07-30 12:49:29 +02:00
Franciszek Stachura
aa5057264d Move ident page HTML generation to layout template 2024-07-30 12:49:29 +02:00
Franciszek Stachura
237b4bb549 Move breadcrumb links generation to layout template 2024-07-30 12:49:29 +02:00
Franciszek Stachura
126ddae515 Move generate_versions to layout template 2024-07-30 12:49:25 +02:00
Franciszek Stachura
cb093ba2a5 Show a loading indicator if API fetch takes more than 200 milliseconds 2023-12-18 11:41:24 +01:00
Franciszek Stachura
7c595fe883 Change style.css version to force stylesheet cache reload
Fix documentation links rendering
2023-12-18 11:24:37 +01:00
Franciszek Stachura
5871fa6dca Add dynamic references
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
2023-12-15 09:00:18 +01:00
Michael Opdenacker
5d39bb2ffa Bump version to 2.2
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2023-05-15 15:40:49 +02:00
AlphaHot
09f37db41f
web : Add autofocus when entering a search 2020-08-19 14:57:59 +05:00
Michael Opdenacker
e8a82f675f Bump version to 2.1
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2020-06-22 06:49:37 +02:00
Michael Opdenacker
53c160b349 Expand "description" header for better search engine results
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2020-06-12 16:15:46 +02:00
Maxime Chretien
086250fb03 web : Add autocompletion for ident search bar
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>
2020-06-11 14:38:44 +02:00
Maxime Chretien
4dec3ee4e9 web : Add DT compatible strings support
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-06-08 15:37:59 +02:00
Maxime Chretien
5e287d9a7e templates/layout.html: Add tooltip on search select element
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-05-28 11:46:05 +02:00
Maxime Chretien
0385f29296 web.py/query.py: Add option to search identifiers in all families
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-05-28 11:37:17 +02:00
Michael Opdenacker
26dea97750 v2.0 release
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2020-05-27 09:07:35 +02:00
Maxime Chretien
962d6fb539 web interface: Add support for Kconfig and Devicetree idents
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>
2020-05-22 10:29:24 +02:00
Chris White
f112ab0826 Regularize whitespace; add editorconfig
- 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.
2020-03-21 08:58:43 -04:00
Michael Opdenacker
229491e7d8 Bump version number to 1.0
- 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>
2019-10-08 11:38:46 +02:00
Michael Opdenacker
0eea6aa35f Add a message banner and hyperlink to the header
- This allows to make some announcements

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2019-03-21 07:36:31 +01:00
Michael Opdenacker
fd81603a4e Update URLs
- In particular the GitHub URL for the project

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2018-07-18 08:23:27 +02:00
Michael Opdenacker
e732c6a295 Version 0.3: support projects through rudimentary "plugins"
- Allows to add a project by just adding custom
  definitions to projects/<project>.sh

- Except for cases that haven't been anticipated yet,
  modifying common code should no longer be needed

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
2018-04-03 15:29:08 +02:00
zo
a0790a5bee Use mobile-first approach and sticky positioning 2017-09-25 12:40:35 +00:00
zo
fab6fc0c9c Add cache invalidation for style.css and script.js 2017-05-26 18:48:25 +02:00
Mikaël Bouillot
204e715d01 Elixir 0.2 2017-05-25 10:56:01 +02:00
zo
5a7d21133b Add outdated browser warning 2017-05-22 14:38:08 +02:00
zo
ccc2cc4b6a Use <select> for projects 2017-05-22 14:20:26 +02:00
zo
5f5a5d9bfc Add missing <ul> for projects 2017-05-15 08:49:54 +02:00
zo
bcbf25a6b1 Move project link in footer 2017-05-12 20:57:34 +02:00
zo
6253ac87e3 Add new static assets 2017-05-12 15:48:21 +02:00
zo
0fe583011b Add dynamic projects list 2017-05-12 15:24:51 +02:00
zo
46f7eb7089 Use jinja template engine 2017-05-12 15:19:17 +02:00