J!Extensions Store™
Forum
Welcome, Guest
Please Login to access forum.
Google font for sitemap? (1 viewing) 
Go to bottom
TOPIC: Google font for sitemap?
#6947
Benno Baksteen
Fresh Boarder
Posts: 5
User Offline
Google font for sitemap? Karma: 0  
On my website I use the the Google font Quattrocento Sans and I would like to display the sitemap in that same font. I tried changing the jquery.view.css file by modifying line 5, which now reads:
#jmap_sitemap {color:#0e263e;font-family:'Quattrocento Sans', sans-serif;}
I do get the right color, and also a sans-serif font, which is a big step in the right direction however it is not the Google font but the fall-back font Ariel, I think.
Next I included a line in xml-sitemap.xsl file in the components/com_jmap/xslt folder, in the head, just before the script tag:
<head>
<title>XML Sitemap</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href='https://fonts.googleapis.com/css?family=Quattrocento+Sans:400,400italic,700' rel='stylesheet' type='text/css'>
<script type="text/javascript">

However that does not seem to do anything. I am not an expert, just fooling around, so I do not know what else to try. Any suggestions as to what might work are appreciated!
 
Logged Logged  
  The administrator has disabled public write access.
#6948
John Dagelmore
Admin
Posts: 3716
User Online Now
Re:Google font for sitemap? Karma: 79  
Probably you have a to much generic CSS selector or the Google font is not loaded in the sitemap page.
Ensure that it's loaded correctly, then try to apply some more specific CSS selectors to the sitemap elements such as

#jmap_sitemap ul.treeview a{color:#0e263e;font-family:'Quattrocento Sans', sans-serif;}
 
Logged Logged  
  The administrator has disabled public write access.
#6950
Benno Baksteen
Fresh Boarder
Posts: 5
User Offline
Re:Google font for sitemap? Karma: 0  
Thank you for your quick reply!. I tried that just now, but the result stays the same. The general selector I used initially, #jmap_sitemap, gives the same result. The color change and the sans-serif part both happen.
I load the sitemap in a modal, that has the Google font loaded: the modal-generated title is in the Google font. If you wish to see for yourself, the link to the site is: https://advisory-council-degas.com/Main/
and the sitemap pops up after clicking the picture of the climbing man.

Kind regards, Benno
 
Logged Logged  
  The administrator has disabled public write access.
#6951
John Dagelmore
Admin
Posts: 3716
User Online Now
Re:Google font for sitemap? Karma: 79  
Hi again,

as i said you initially, the problem is that in that modal page the Google font is not loaded at all.
You need to have: <link href='https://fonts.googleapis.com/css?family=Quattrocento+Sans:400,400italic,700' rel='stylesheet' type='text/css'>

If you inspect view-source:https://advisory-council-degas.com/Main/?option=com_jmap&view=sitemap&tmpl=component&jmap_module=92
you notice that the Google font is not loaded at all.

Find a way to load the Google font for the 'tmpl=component' working mode in your Joomla template. A Joomla template uses the component.php file in such case.

Best regards
John
 
Logged Logged  
  The administrator has disabled public write access.
#6952
Benno Baksteen
Fresh Boarder
Posts: 5
User Offline
Re:Google font for sitemap? Karma: 0  
Thank you much John, I did not know how to inspect that modal page. Seeing the title in the correct font I assumed the font was loaded, but as you established it isn't. Thank you also for the guidance on how to rectify this. I will go work with that!

best regards, Benno
 
Logged Logged  
  The administrator has disabled public write access.
#6953
Benno Baksteen
Fresh Boarder
Posts: 5
User Offline
Re:Google font for sitemap? Karma: 0  
Done! I did not even have a component.php in the template, so I copied one from one of the standard templates and added the google font reference. Problem solved. Thank you very much for your help!
 
Logged Logged  
  The administrator has disabled public write access.
Go to top