fbpx

Astroid 2.4 Landed with Joomla 4 Compatibility Download Now

Welcome, Guest
Username: Password: Remember me

TOPIC: Awesome font locally host (work on localhost & live) ?

Awesome font locally host (work on localhost & live) ? 4 months 3 weeks ago #22721

  • Chacapamac
  • Chacapamac's Avatar
  • Offline
  • Elite Member
  • Posts: 161
  • Thank you received: 1
  • Karma: 0
I’m trying to install Awesome locally. (Astroid Zero Template)
• I create my folder in Astroid template > fonts > awesome
• I copy the 2 “css” & “webfonts” folders from Awesome download
• I turn the Astroid plugin to “Load Awesome Locally”




On the test site —> www.graf-test.ca/astroid/index.php/fr/

• You see 3 different call for Awesome still coming from your system > media > astroid > assets
• You also see a call live to fontawesome
• and from my 2 WRONG calls, from the template manager “Custom Code” before </head>




I like to clean up all that and find a good way to implement clean local calls that will work on a local mamp installation or on the live site.
Also, if you have already Awesome in the Joomla Media folder, I should not have to add them to the template folder?


I was thinking when I turn OFF the plugin to local that I will see no call at all from your system?
I’m probably wrong....
The administrator has disabled public write access.

Awesome font locally host (work on localhost & live) ? 4 months 3 weeks ago #22745

  • Chacapamac
  • Chacapamac's Avatar
  • Offline
  • Elite Member
  • Posts: 161
  • Thank you received: 1
  • Karma: 0
Ok, I start to understand.Tell my if I’m wrong...
The plugin do all the job, no need to add any call to local Awesome files.

1— When the plugin is set on CDN, it call the live version of Awesome

• Question here : Why 2 calls to different versions of Awesome?

2— When the plugin is set on Local , it call the media/astroid/assets/fontawesome version of Awesome

• Question here : Why still a live call ?
• Question here : Do you know from where that 403 (forbidden) call come?
Last Edit: 4 months 3 weeks ago by Chacapamac.
The administrator has disabled public write access.

Awesome font locally host (work on localhost & live) ? 4 months 3 weeks ago #22758

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 4145
  • Thank you received: 607
  • Karma: 108
Yes,

The plugin does everything. I'll have to check this a little thoroughly and get back to you. Give me a bit on this one.

Thanks,
CHetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.

Awesome font locally host (work on localhost & live) ? 4 months 3 weeks ago #22779

  • Chacapamac
  • Chacapamac's Avatar
  • Offline
  • Elite Member
  • Posts: 161
  • Thank you received: 1
  • Karma: 0
The plugin does everything.
Great addition to Astroid.


• Yes, if you can look why the 2 calls when CDN is on?

•Also, with “Local” on I was thinking that only the link to the “all.css” was necessary ?
Note: all.css got the call to the folder webfonts.... Should not be necessary?

In the bottom of “all.css”
@font-face {
  font-family: 'Font Awesome 5 Brands';
  font-style: normal;
  font-weight: normal;
  font-display: auto;
  src: url("../webfonts/fa-brands-400.eot");
  src: url("../webfonts/fa-brands-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.woff") format("woff"), url("../webfonts/fa-brands-400.ttf") format("truetype"), url(//cdn.joomdev.com//"../webfonts/fa-brands-400.svg) format("svg"); }

.fab {
  font-family: 'Font Awesome 5 Brands'; }
@font-face {
  font-family: 'Font Awesome 5 Free';
  font-style: normal;
  font-weight: 400;
  font-display: auto;
  src: url("../webfonts/fa-regular-400.eot");
  src: url("../webfonts/fa-regular-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.woff") format("woff"), url("../webfonts/fa-regular-400.ttf") format("truetype"), url(//cdn.joomdev.com//"../webfonts/fa-regular-400.svg) format("svg"); }

.far {
  font-family: 'Font Awesome 5 Free';
  font-weight: 400; }
@font-face {
  font-family: 'Font Awesome 5 Free';
  font-style: normal;
  font-weight: 900;
  font-display: auto;
  src: url("../webfonts/fa-solid-900.eot");
  src: url("../webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.woff") format("woff"), url("../webfonts/fa-solid-900.ttf") format("truetype"), url(//cdn.joomdev.com//"../webfonts/fa-solid-900.svg) format("svg"); }

- The live call should not be there at all...?

• The 403 is also a mystery?
Last Edit: 4 months 3 weeks ago by Chacapamac.
The administrator has disabled public write access.

Awesome font locally host (work on localhost & live) ? 4 months 2 weeks ago #22804

  • Chacapamac
  • Chacapamac's Avatar
  • Offline
  • Elite Member
  • Posts: 161
  • Thank you received: 1
  • Karma: 0
For the “LOCAL” & “CDN” settings
I find the source (my fault :) ) of the call for v5.0.7 — NOT A PROBLEM ANYMORE!



The rest is to investigate.... :P
Attachments:
Last Edit: 4 months 2 weeks ago by Chacapamac.
The administrator has disabled public write access.

Awesome font locally host (work on localhost & live) ? 4 months 2 weeks ago #22825

  • Chacapamac
  • Chacapamac's Avatar
  • Offline
  • Elite Member
  • Posts: 161
  • Thank you received: 1
  • Karma: 0
Ok, lets start over this is the last result on the use of “local” & “CDN” link to awesome fonts.

THIS IS THE CDN WAY.


• I like that, it seem correct. Only one call to the live CSS Awesome file, that itself call the webfonts folder


THIS IS THE LOCAL WAY.


• Here 2 questions:
1— Why a call to the webfonts folder when the CSS Awesome file have internal call to the folder? (Should look like the LIVE call, only to the CSS ?)
2— Why this 403 call to the webfonts folder ?

My test site is now on LOCAL mode. — www.graf-test.ca/astroid/index.php/fr/

————————————————————————————
I PROUDLY “JOIN THE CLUB” JOOMDEV
————————————————————————————
• How do I remove the “Astroid from Joomdev”?
Last Edit: 4 months 2 weeks ago by Chacapamac.
The administrator has disabled public write access.

Awesome font locally host (work on localhost & live) ? 3 months 4 days ago #23413

  • Chacapamac
  • Chacapamac's Avatar
  • Offline
  • Elite Member
  • Posts: 161
  • Thank you received: 1
  • Karma: 0
I repeat and reformulate only 1 question on “ THIS IS THE LOCAL WAY.” image of my last post
I just like to understand! :silly:

1— Why 2 calls to the “Webfonts” folder
— Exact same location, one is 301 “permanently move, the other 403 forbidden ?

301


403
The administrator has disabled public write access.

Awesome font locally host (work on localhost & live) ? 3 months 4 days ago #23414

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 4145
  • Thank you received: 607
  • Karma: 108
Hi,

Let me check this and get back to you!

thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.

Awesome font locally host (work on localhost & live) ? 2 months 2 weeks ago #23610

  • alakentu
  • alakentu's Avatar
  • Offline
  • New Member
  • Helping help me!
  • Posts: 12
  • Thank you received: 1
  • Karma: 1
Hi friends.

Inside the template.php file in the astroid library on line 1007 the '/ webfonts' directory is called and in my opinion it is totally unnecessary.

I agree with friend Chacapamac. Calling only the directory without any CSS file gives error 301. I think that call should be removed from the code because the CSS font file has already been inserted in the previous line correctly.

Now, if the call has any intention of benefit to the framework code, I would like the developers to explain it to us.

I edit the mentioned file and disable the call and everything works perfectly. Waiting for an answer to know what to do later.

Best regards.
Please do not spam that you see I see and does not help anyone!
The administrator has disabled public write access.

Awesome font locally host (work on localhost & live) ? 2 months 1 week ago #23628

  • Chacapamac
  • Chacapamac's Avatar
  • Offline
  • Elite Member
  • Posts: 161
  • Thank you received: 1
  • Karma: 0
Thanks “alakantu”! :cheer:
— I also remove the call to the “webfont” directory that bring the 403 (Forbidden) error and in fact 2 errors if you reload the page on my test site
NO MORE ERRORS and fonts display correctly.
—> www.graf-test.ca/astroid/index.php/fr/

File: Joomla root/librairies/astroid/framework/template.php — Line 1007
if ($astroid_load_fontawesome == "local") {
         $document->addStyleSheet($assets . '/css/font-awesome.css');
         //OUT GRAF $document->addStyleSheet($assets . '/webfonts');
      } elseif ($astroid_load_fontawesome == "cdn") {
         $document->addStyleSheet("https://use.fontawesome.com/releases/v" . AstroidFrameworkConstants::$fontawesome_version . "/css/all.css");
      }

Error 1:
GEThttp://www.graf-test.ca/astroid/media/astroid/assets/fontawesome/webfonts/
[HTTP/1.1 403 Forbidden 75ms]

Error 2: (after reload)
The resource from “www.graf-test.ca/astroid/media/astroid/a...ontawesome/webfonts/” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). fr

I think the call to the “webfont” folder is unecessary and generate these errors.

Because you already have the internal “webfonts” calls in “font-awesome.css”, I think you dont need to call the “webfont” directory..
Joomla root/media/astroid/fontawesome/font-awesome.css
@font-face {
  font-family: 'Font Awesome 5 Brands';
  font-style: normal;
  font-weight: normal;
  font-display: auto;
  src: url("../webfonts/fa-brands-400.eot");
  src: url("../webfonts/fa-brands-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.woff") format("woff"), url("../webfonts/fa-brands-400.ttf") format("truetype"), url(//cdn.joomdev.com//"../webfonts/fa-brands-400.svg) format("svg"); }

.fab {
  font-family: 'Font Awesome 5 Brands'; }
@font-face {
  font-family: 'Font Awesome 5 Free';
  font-style: normal;
  font-weight: 400;
  font-display: auto;
  src: url("../webfonts/fa-regular-400.eot");
  src: url("../webfonts/fa-regular-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.woff") format("woff"), url("../webfonts/fa-regular-400.ttf") format("truetype"), url(//cdn.joomdev.com//"../webfonts/fa-regular-400.svg) format("svg"); }

.far {
  font-family: 'Font Awesome 5 Free';
  font-weight: 400; }
@font-face {
  font-family: 'Font Awesome 5 Free';
  font-style: normal;
  font-weight: 900;
  font-display: auto;
  src: url("../webfonts/fa-solid-900.eot");
  src: url("../webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.woff") format("woff"), url("../webfonts/fa-solid-900.ttf") format("truetype"), url(//cdn.joomdev.com//"../webfonts/fa-solid-900.svg) format("svg"); }

What do you think?
Last Edit: 2 months 1 week ago by Chacapamac.
The administrator has disabled public write access.
Moderators: chandandeep
Time to create page: 0.424 seconds