astroid-framework icon indicating copy to clipboard operation
astroid-framework copied to clipboard

fontawesome loaded twice

Open SerGun78 opened this issue 1 year ago • 9 comments

Hi all. Astroid 2.6.5 Joomla 4.3.1 Why is the icon font fontawesome loaded twice? изображение

SerGun78 avatar May 23 '23 20:05 SerGun78

@SerGun78 Yes, I think you are right, one from Joomla and one from Astroid?

My Astroid plugin settongs:

Screen Shot 2023-05-24 at 11 12 17 AM

Give this?

Screen Shot 2023-05-24 at 11 20 33 AM

@sonvnn I mark that as a bug!

Chacapamac avatar May 24 '23 15:05 Chacapamac

my settings: изображение I am using template one

SerGun78 avatar May 24 '23 15:05 SerGun78

Some links about Disabling Joomla loaded fontawesome.... Doesn't seem to be easy? — Need to study that...

Brian Teeman (co-founder of Joomla) is participating on both: https://github.com/joomla/joomla-cms/issues/38898

Look at Brian “solution” here: https://github.com/joomla/joomla-cms/discussions/32533#discussioncomment-410349

Joomla Assets Manager: https://docs.joomla.org/J4.x:Web_Assets

jason

Not sure how to go about it, my guess is that you have to write a “joomla.asset.json” file for the template you are using without the call for awesome????

Chacapamac avatar May 24 '23 17:05 Chacapamac

what does the cassiopeia template have to do with it if I work with astroid one? I understand that the matter is apparently in the systems information of joomla error messages, etc. Maybe then in the astroid plugin provide the ability to load fontawesome from the joomla core, and not just from CDN or Astroid files?!

SerGun78 avatar May 24 '23 17:05 SerGun78

I show where Cassiopea load directly Awesome, by the template, and, if I understand the posts links, the same file seem to be the place to override these dependencies.

Problem, again if I understand well, Awesome can be call by others joomla.asset.json file by modules or Joomla functions.

Not sure again, but I think we can override Astroid by using a joomla.asset.json in the template Need to try!

joomla.asset.json is find in almost all Joomla components, system, modules..... Screen Shot 2023-05-24 at 2 03 00 PM

Chacapamac avatar May 24 '23 18:05 Chacapamac

If you switch to casiopeia, then fontawesome is loaded again, but minified. изображение

SerGun78 avatar May 24 '23 18:05 SerGun78

Because you get the “dependencies

"assets": [
    {
      "name": "template.cassiopeia.ltr",
      "description": "The css file to be used when the site is left to right (LTR).",
      "type": "style",
      "uri": "template.min.css",
      "dependencies": [
        "fontawesome"
      ]
    },

and the “uri” related to that dependencies in root > templates > cassiopea > joomla.asset.json

{
      "name": "fontawesome",
      "type": "style",
      "uri": "system/joomla-fontawesome.min.css"
    }

No, so far I have no idea how, but the conversation of Brian seem to place that file as the possibility to override???? https://github.com/joomla/joomla-cms/discussions/32533#discussioncomment-410349

Need to test how... and, i guess, it can also be loaded by any Joomla component, modules using its own > joomla.asset.json file...... Lot of fun here!

Chacapamac avatar May 24 '23 18:05 Chacapamac

@SerGun78 @Chacapamac This library use for Joomla editor in frontend. If you disable or remove it. Some icon of editor will disappear then you can not use Editor in frontend. Let's consider about it.

Thanks & Best Regards, Sonny

sonvnn avatar May 25 '23 04:05 sonvnn

sonvnn, ok. then is it possible to completely disable the ability to edit the site through the frontend?

in the frontend, the same icon from different css is loaded module editing: изображение

material editing: изображение

SerGun78 avatar May 25 '23 09:05 SerGun78