By Emilio Navas on Tuesday, 20 December 2016
Posted in Elegant
Likes 0
Views 1.2K
Votes 0
Hello,
I am starting to customize a little bit the Elegant template.
I am agree to use text instead logo in the top, but I want to know where and how to change a little bit the format. I don't know if I can use google fonts for this and put two colors in the text.
I know how to change the text in the backend the thing I don't know is how to apply special format.

Basically I want to put:
HONG KONG | FRAMED
HONG KONG in red color (#ff0000) and FRAMED in grey (#696969).


Is this possible?
Thanks.
Hello Emilio,

You would need to modify the theme file in /templates/elegant/index.php . The concept behind all our templates is to bring back simplicity to site owners without any hassle frameworks. I understand that frameworks may be good at customizing this kind of stuffs but honestly, is it worth sacrificing performance over only customizing it several times?

Ideally, you should use css to help you achieve this. For instance, edit the index.php file and locate the codes below,


<a class="navbar-brand" href="/">
<?php if ($this->params->get('show_heading_title', true)) { ?>
<?php echo JText::_($this->params->get('title', 'Elegant'));?>
<?php } ?>
</a>


Replace it with,


<a class="navbar-brand" href="/">
<span class="hk">HONG KONG</span> | <span class="framed">FRAMED</span>
</a>


Then simply create a file /templates/elegant/css/custom.css and add the block of codes below:


.navbar-brand .hk {
color: #ff0000;
}

.navbar-brand .framed {
color: #696969;
}



There you go, CSS + HTML 101
·
Tuesday, 20 December 2016 21:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Mark.
Lesson learned!
I will try to do right now ;-)

Maybe is ask for too much, but is possible in this way to choose the font I want to use?
·
Tuesday, 20 December 2016 21:58
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome Yep, all you need to do is to add an attribute using css.


.navbar-brand {
font-family: whatever-font;
}


However if you are going to use Google fonts, you need to first add the codes generated by Google and place it in the index.php file
·
Tuesday, 20 December 2016 22:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Got it!
Any place to say to the page that I am using custom.css?
I replace all the things but is not updated.

For sure stupid question and I am not able to get the html + css 101 diploma. ;-)
I put the user and password in the first post in case you want to check.

Thanks!
·
Tuesday, 20 December 2016 22:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Hm, is there some cache going on with your browser? Because I do see it here, http://take.ms/F0mNG
·
Tuesday, 20 December 2016 22:32
·
0 Likes
·
0 Votes
·
0 Comments
·
For sure. In theory I deleted in both browsers, but I am afraid that the problem is here in my side... Reset the router and the computer too, disable Cloudflare in the domain... I don't know what to do!
As I tel you in the other post, I don't want to bother you, but I will update here if I find the solution. Maybe is useful for other people that could have this problem...
·
Tuesday, 20 December 2016 23:07
·
0 Likes
·
0 Votes
·
0 Comments
·
Hm, that is really odd. Can you check if the plugin System - Page cache is enabled? If it is enabled, try disabling it.
·
Tuesday, 20 December 2016 23:11
·
0 Likes
·
0 Votes
·
0 Comments
·
Finally I have a possible answer to my problem.
I am using SiteGround hosting and they have something called SuperCacher. I am not sure why, but to see the changes in my side I need to flush the supercacher for this domain. Annoying, but works.


Thanks for your patience, Mark.
·
Wednesday, 21 December 2016 09:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for updating, glad that your issues are resolved now
·
Wednesday, 21 December 2016 09:58
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post