Astroid-Framework icon indicating copy to clipboard operation
Astroid-Framework copied to clipboard

Use local copies of assets

Open shoulders opened this issue 5 years ago • 5 comments

This is a showstopper for me :(

Using CDN version of assets assumes that you have access to the internet at all times. This is definately not the case.

The other issue caused by using these sorts of assets is that they can get blocked by such things as 'Privacy Badger' and uBlockOrigin. there probably is a privacy concern aswell.

Examples are:

  • <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" >
  • <link href="https://cdnjs.cloudflare.com/ajax/libs/simple-line-icons/2.4.1/css/simple-line-icons.min.css" rel="stylesheet" />
  • <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" />
  • Google Fonts

Thanks

shoulders avatar Jun 18 '19 10:06 shoulders

This is being fixed in the upcoming build, my apologies for the delayed reply.

chetanmadaan avatar Jul 04 '19 03:07 chetanmadaan

@chandanndeep can we get this done buddy?

chetanmadaan avatar Jul 04 '19 03:07 chetanmadaan

This is done in the following commit https://github.com/joomdev/Astroid-Framework/commit/f9746b97f8043d3530874033b5b07c2dc66cf816

chetanmadaan avatar Jul 11 '19 15:07 chetanmadaan

You will see this option in the Astroid Plugin.

image

itxchandan avatar Aug 23 '19 04:08 itxchandan

Hi

I think these are your assets aswell

  • <link href="https://cdnjs.cloudflare.com/ajax/libs/simple-line-icons/2.4.1/css/simple-line-icons.min.css" rel="stylesheet" />
  • <link href="//cdn.jsdelivr.net/npm/[email protected]/dist/components/rating.min.css" rel="stylesheet" />

Notes

  • ~~The only other Assets I can find at the moment are the google fonts. These might be a bit tricky to make local but you could in theory do a local cache so when they are original configured in the template, the framework downloads them and stores them locally so the framework/site can deliver them. There is also the fact that there is a fall back fonts so this is not a show stopper. I could open another issue if this feature is of interest.~~
  • Do you think if there was setting in the astroid plugin to have local or CDN versions of Fonts then the Google Fonts options in templates should be disabled/enabled accordingly. This is just an idea while i was thinking out loud.
  • It is possible to add Google fonts already to be locally served. Yes it is, see this video (this is for reference for other non-JoomDev when they find this post) https://www.youtube.com/watch?v=eepTaqNUsOE
  • Depending on how you handle the local serving of google fonts, maybe a note in the Astroid plugin that Google Fonts must be manually uploaded (ie as in video)
  • An idea is, if use Google fonts locally is enabled in the Astroid plugin then astroid will download the Google font ino the appropriate directory and then use this local copy of the asset.

shoulders avatar Aug 23 '19 11:08 shoulders