Viewing Header code not working
Header code not working
|
User: Guest 12 years ago
|
|
|
I'm trying to get my web fonts to work in the header code and it doesn't seem to be working. I've tried these two different code blocks in the header field on the page. The code stays, but when I load the page on a computer or device without the fonts installed the fonts don't show. The same code works in my iWeb-published web page where I used an HTML snippet for each font. [code:3nyba61y]<script language="JavaScript" type="text/javascript"> <!-- var headID = parent.document.getElementsByTagName("head")[0]; var cssNode = document.createElement('link'); cssNode.type = 'text/css'; cssNode.rel = 'stylesheet'; cssNode.href = 'http://fonts.googleapis.com/css?family=Baumans'; headID.appendChild(cssNode); // --> <!-- var headID = parent.document.getElementsByTagName("head")[0]; var cssNode = document.createElement('link'); cssNode.type = 'text/css'; cssNode.rel = 'stylesheet'; cssNode.href = 'http://fonts.googleapis.com/css?family=Expletus+Sans'; headID.appendChild(cssNode); // --> </script>[/code:3nyba61y] [code:3nyba61y]<script language="JavaScript" type="text/javascript"> <!-- var headID = parent.document.getElementsByTagName("head")[0]; var cssNode = document.createElement('link'); cssNode.type = 'text/css'; cssNode.rel = 'stylesheet'; cssNode.href = 'http://fonts.googleapis.com/css?family=Baumans'; headID.appendChild(cssNode); // --> </script> <script language="JavaScript" type="text/javascript"> <!-- var headID = parent.document.getElementsByTagName("head")[0]; var cssNode = document.createElement('link'); cssNode.type = 'text/css'; cssNode.rel = 'stylesheet'; cssNode.href = 'http://fonts.googleapis.com/css?family=Expletus+Sans'; headID.appendChild(cssNode); // --> </script>[/code:3nyba61y] Also, when I try to enter this code on the Site Publishing Settings page the code disappears after I close EasyWeb and reopen it. How can I get this to work with EasyWeb? |
|
| Edit | |
|
User: Roddy 12 years ago
|
|
|
That javascript is just a hack for iWeb and has no place in EasyWeb. As long as you have the Google font installed on your Mac, EasyWeb will automatically insert the correct code for you. The correct way to add a Google font is to insert this into the Head Code... <link href='http://fonts.googleapis.com/css?family=Name-Of-Font' rel='stylesheet' type='text/css'>In general, you should not blindly copy over code from iWeb HTML Snippets to EasyWeb without knowing what you are doing. EasyWeb uses proper code injection whereas iWeb does not. ------------------------------- Roddy Website: http://everwebwidgets.com Contact: http://everwebwidgets.com/ewWidgets-home/contact.html NOTE: I am an EverWeb user and NOT affiliated with EverWeb! Any opinions expressed in this forum are my own. |
|
|
User: Paul-RAGESW 12 years ago
|
|
|
Just to clarify with EasyWeb you don't have to think about this. Just install your Google Font on your computer and use it on your website as you would any font. EasyWeb takes care of the rest! ------------------------------- Paul EverWeb Developer |
|
|
User: Guest 12 years ago
|
|
|
I removed the code from all the pages and it's still not working. I looked at the html code and one font, Baumans, is showing in the code and it's working for the navigation bar (it was before too), but anywhere else that font appears it's not working and I'm just getting a default web safe font. Also, other fonts that I'm using besides Baumans are not showing in either the html code of the published page or the web site when I view it. Does this have anything to do with EasyWeb telling me that these fonts are not installed when they actually are and they appear properly within EasyWeb? |
|
| Edit | |
|
User: Paul-RAGESW 12 years ago
|
|
|
Can you post your website URL. Are the fonts installed for your user account? ------------------------------- Paul EverWeb Developer |
|
|
User: Guest 12 years ago
|
|
|
Yes, the fonts are installed for the user.
Last edit 12 years ago |
|
| Edit | |
|
User: Roddy 12 years ago
|
|
|
Quote: other fonts that I'm using besides Baumans are not showing Are these fonts available via Google? Remember that the fonts have to be hosted as well as installed on your Mac. It's a good idea to create a category for web safe fonts and another for Google hosted fonts in your fonts window so that you don't inadvertently use one that won't work. ------------------------------- Roddy Website: http://everwebwidgets.com Contact: http://everwebwidgets.com/ewWidgets-home/contact.html NOTE: I am an EverWeb user and NOT affiliated with EverWeb! Any opinions expressed in this forum are my own. |
|
|
User: Guest 12 years ago
|
|
| Yes they are google fonts. They are in the header code I posted above (which you said wasn't needed), and they work with my iWeb-published website (the code is in HTML snippets), but not with EasyWeb. | |
| Edit | |
|
User: Roddy 12 years ago
|
|
|
What is the URL of your site?
------------------------------- Roddy Website: http://everwebwidgets.com Contact: http://everwebwidgets.com/ewWidgets-home/contact.html NOTE: I am an EverWeb user and NOT affiliated with EverWeb! Any opinions expressed in this forum are my own. |
|
|
User: Guest 12 years ago
|
|
| I did. It's 4 posts above. Again, I am getting an error in EasyWeb that says the fonts are not installed, but they actually are and all the text using those fonts appears properly within EasyWeb. I don't know if that's part of the problem. | |
| Edit | |
|
User: Roddy 12 years ago
|
|
|
I don't se a clickable link to your published website anywhere!
------------------------------- Roddy Website: http://everwebwidgets.com Contact: http://everwebwidgets.com/ewWidgets-home/contact.html NOTE: I am an EverWeb user and NOT affiliated with EverWeb! Any opinions expressed in this forum are my own. |
|
|
User: Guest 12 years ago
|
|
|
[quote="Paul-RAGESW":2dzdchov]Just to clarify with EasyWeb you don't have to think about this. Just install your Google Font on your computer and use it on your website as you would any font. EasyWeb takes care of the rest![/quote:2dzdchov] This still is not working in Beta 24. Any device I go to that the fonts are not installed on cannot see the fonts. These are all Google fonts and they work fine with my iWeb-published website. The Google font injection in EasyWeb is not working. |
|
| Edit | |
|
User: Paul-RAGESW 12 years ago
|
|
|
Your fonts are working fine for me. You still have your Google font code in your head code field which you don't need. Why don't you post the exact URL with the browsers and operating systems you are trying them in. Screenshots would also be helpful. You can take a screenshot by holding down the COMMAND and SHIFT keys on your keyboard and then pressing the number 3. An image file will appear on your desktop, please send that to me. If your email client asks, select the option to send the full size, or original image file. ------------------------------- Paul EverWeb Developer |
|
|
User: Guest 12 years ago
|
|
|
The Google code is not in any of the headers. I just checked. I removed them previously when you said they weren't necessary and it didn't change anything. Okay, what I just found is that if the text using the Google fonts was copy and pasted they don't work. If it's new test using the font then it shows up. Also, I created a 2nd EasyWeb site and copy pasted from my 1st EasyWeb site to the 2nd, and the font not installed error comes up still, so that is not actually fixed in Beta 24. Hopefully this is something that could be fixed so we don't have to re-type all the text for our websites. EDIT: What I also just found is that if I change the font to something else and then back to the Google font I want, and then publish and upload it works. So it appears to be the fact that the copy-paste from another application is still breaking the Google font connection... as indicated by the fact that we're all still get font not installed errors. |
|
| Edit | |
|
User: Roddy 12 years ago
|
|
|
One problem is that you still have the iWeb javascript hack in the Head Code of every page of your EasyWeb site... [code:3g4wr2as]<script language="JavaScript" type="text/javascript"> <!-- var headID = parent.document.getElementsByTagName("head")[0]; var cssNode = document.createElement('link'); cssNode.type = 'text/css'; cssNode.rel = 'stylesheet'; cssNode.href = 'http://fonts.googleapis.com/css?family=Baumans'; headID.appendChild(cssNode); // --> </script> <script language="JavaScript" type="text/javascript"> <!-- var headID = parent.document.getElementsByTagName("head")[0]; var cssNode = document.createElement('link'); cssNode.type = 'text/css'; cssNode.rel = 'stylesheet'; cssNode.href = 'http://fonts.googleapis.com/css?family=Expletus+Sans'; headID.appendChild(cssNode); // --> </script>[/code:3g4wr2as] Using this in the first place has created confusion for you and obviously it needs to be deleted. Your Home page references two Google hosted fonts correctly... <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Baumans|Expletus+Sans">All the others that I looked at only reference one... <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Baumans">
------------------------------- Roddy Website: http://everwebwidgets.com Contact: http://everwebwidgets.com/ewWidgets-home/contact.html NOTE: I am an EverWeb user and NOT affiliated with EverWeb! Any opinions expressed in this forum are my own. |
|
| Post Reply |
| You must login or signup to post. |
