Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fontawesome use #15

Open
tanc opened this issue Nov 24, 2020 · 1 comment
Open

Fontawesome use #15

tanc opened this issue Nov 24, 2020 · 1 comment

Comments

@tanc
Copy link

tanc commented Nov 24, 2020

On Lambeth we're using (some) localgov_paragraphs but not fontawesome. Due to the dependencies on fontawesome we can't uninstall it, but at least we can configure the module not to load the icons. It would be great to not have a dependency on the module at all, at least on our site.

From glancing through the code it looks like fontawesome is used only on localgov_labelled_icon paragraph. Maybe that could be split into it's own module and made optional?

Another option would be to load fontawesome in the paragraph, that way the large fontawesome js (with icons in) file won't get loaded unless that paragraph is in use.

Otherwise, by default, there is 400k of fontawesome being loaded on every page for no reason.

@andybroomfield
Copy link
Contributor

The way this was resolved in localgov_theme was to check if the fontawesome module was installed and use the icons from that, else just set it up as its own library and import the stylesheet itself.

Agree we should split the paragraphs up in localgov_paragraphs to give some more control on turning ones on and off that sites won't need, perhaps in groups.

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

No branches or pull requests

2 participants