Difference between revisions of "Joomla Standard Icomoon Fonts"
From Joomla! Documentation
(Marked this version for translation) |
(Some markup changes.) |
||
Line 8: | Line 8: | ||
<translate><!--T:3--> | <translate><!--T:3--> | ||
− | Icon fonts can be called with a <tt><span class="icon-''name-of-icon''"></tt> tag and a {space} | + | Icon fonts can be called with a <tt><span class="icon-''name-of-icon''"></tt> tag and a {space}:</translate> |
<pre> | <pre> | ||
Line 15: | Line 15: | ||
<translate><!--T:4--> | <translate><!--T:4--> | ||
− | Will show the Joomla! icon:</translate> | + | Will show the Joomla! icon:</translate> <span class="icon-joomla"> </span> |
<translate> | <translate> | ||
== Font Size == <!--T:5--></translate> | == Font Size == <!--T:5--></translate> | ||
− | |||
<translate><!--T:6--> | <translate><!--T:6--> | ||
− | Because the icons are fonts, you can control the size of them with an added class or style= statement. Of course you will have to define the class in your | + | Because the icons are fonts, you can control the size of them with an added class or style= statement. Of course you will have to define the class in your CSS or LESS style sheet file.</translate> |
<pre> | <pre> | ||
Line 255: | Line 254: | ||
__NOTOC__ | __NOTOC__ | ||
<translate><!--T:11--> | <translate><!--T:11--> | ||
− | To include the Icomoon fonts in your template you will have to add the | + | To include the Icomoon fonts in your template you will have to add the CSS style sheet (<tt>/media/jui/css/icomoon.css</tt>) or include it in your <tt>.less</tt> file when you generate the <tt>.css</tt> style sheet(s).</translate> |
− | < | + | <syntaxhighlight lang="php"> |
$doc = JFactory::getDocument(); | $doc = JFactory::getDocument(); | ||
$doc->addStyleSheet($this->baseurl.'/media/jui/css/icomoon.css'); | $doc->addStyleSheet($this->baseurl.'/media/jui/css/icomoon.css'); | ||
− | </ | + | </syntaxhighlight> |
<noinclude> | <noinclude> |
Latest revision as of 22:36, 15 December 2022
Since Joomla 3.0.0, the Joomla! CMS comes with its own custom Icomoon Font Set. These icon fonts are available by default for use in the "Protostar" (Frontend), "Isis" (Administrator) and "Hathor" (Administrator) Templates.
How to Use[edit]
Icon fonts can be called with a <span class="icon-name-of-icon"> tag and a {space}:
<span class="icon-joomla"> </span>
Will show the Joomla! icon:
Font Size[edit]
Because the icons are fonts, you can control the size of them with an added class or style= statement. Of course you will have to define the class in your CSS or LESS style sheet file.
<span class="icon-joomla large-icon"> </span> <span class="icon-joomla" style="font-size:24px;"> </span>
Here is the resized Joomla! icon:
Available Icomoon Icons[edit]
This is the complete list, including the alternative names to call the icon. The alternatives are separated by a '/' below.
Including in Your Template[edit]
To include the Icomoon fonts in your template you will have to add the CSS style sheet (/media/jui/css/icomoon.css) or include it in your .less file when you generate the .css style sheet(s).
$doc = JFactory::getDocument();
$doc->addStyleSheet($this->baseurl.'/media/jui/css/icomoon.css');