Skip to content

Conversation

@kuanchihwang
Copy link
Contributor

@kuanchihwang kuanchihwang commented Dec 31, 2024

This PR updates the web page dependencies (i.e., scripts and stylesheets) of FORD. Specifically:

  • Update Font Awesome to version 6.7.2
  • Update MathJax to 2.7.9
  • Update svg-pan-zoom to 3.6.2

Note that Font Awesome was updated with its 4-to-6 compatibility mode enabled. As future work, all web pages that contain icon references to Font Awesome version 4 will need to be updated to version 6 before the compatibility mode can be dropped.

Additionally, Bootstrap tooltips are also fixed. It was previously broken in commit 22cb0b5 due to jQuery being removed. Some unused configuration files are removed to reduce clutter.

All 305 unit tests pass, including the ones that are "slow".

Closes #635.

FORD contains icon references to Font Awesome version 4.
Without updating many HTML templates in FORD, compatibility mode
must be enabled by including two additional stylesheets:

* v4-font-face.min.css
* v4-shims.min.css
The MathJax javascript does not have to be at the end of
pages for them to render faster. Just use the `async`
attribute.

Also remove duplicated configuration options that are already
included in the `TeX-AMS-MML_HTMLorMML` preset.
Bootstrap tooltips are opt-in. They must be initialized manually.
In order to do so, the Bootstrap javascript must be loaded before
running the initialization function.

Also, because jQuery has been removed from FORD, use the standard
compliant `document.querySelectorAll` instead.
In the past, `config.json` was used to generate a customized version
of Bootstrap for FORD. However, FORD has since switched to use the
official version of Bootstrap. Therefore, the old configuration file
is no longer needed and should be removed.
FORD used to depend on `MANIFEST.in` to include its data files.
However, the same purpose is now served more reliably by
`pyproject.toml`.
Copy link
Member

@ZedThree ZedThree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, thanks @kuanchihwang!

I also really appreciate the commit messages with the explanations of some of the changes.

Is there a list somewhere of the font-awesome v4 stuff that we'll need to fix?

@ZedThree ZedThree merged commit da12019 into Fortran-FOSS-Programmers:master Jan 6, 2025
6 checks passed
@kuanchihwang kuanchihwang deleted the develop/update-web-page-dependencies branch January 6, 2025 17:47
@kuanchihwang
Copy link
Contributor Author

kuanchihwang commented Jan 6, 2025

There is an upgrade guide in the Font Awesome documentation: https://docs.fontawesome.com/web/setup/upgrade/upgrade-from-v4

It seems that we have to change the prefix of icons, and rename the icons that have gone through name changes between version 4 and 6.

Font Awesome Docs

@ZedThree
Copy link
Member

ZedThree commented Jan 7, 2025

Lovely, thanks @kuanchihwang!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update to fontawesome v6

2 participants