mirror of
https://github.com/e107inc/e107.git
synced 2025-07-24 00:12:24 +02:00
Fixes #4605 - Custom home icon support and fallback icon for non-FontAwesome breadcrumbs.
This commit is contained in:
@@ -3749,13 +3749,21 @@ var_dump($select_options);*/
|
||||
if(!is_array($array)){ return; }
|
||||
|
||||
$opt = array();
|
||||
|
||||
$homeicon = ($this->_fontawesome) ? 'fa-home' : 'icon-home.glyph';
|
||||
$homeIcon = e107::getParser()->toGlyph($homeicon,false);
|
||||
|
||||
|
||||
if(!empty($array['home']['icon'])) // custom home icon.
|
||||
{
|
||||
$homeIcon = $array['home']['icon'];
|
||||
unset($array['home']['icon']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$fallbackIcon = '<svg class="svg-inline--fa fa-home fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!-- Font Awesome Free 5.15.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M280.37 148.26L96 300.11V464a16 16 0 0 0 16 16l112.06-.29a16 16 0 0 0 15.92-16V368a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v95.64a16 16 0 0 0 16 16.05L464 480a16 16 0 0 0 16-16V300L295.67 148.26a12.19 12.19 0 0 0-15.3 0zM571.6 251.47L488 182.56V44.05a12 12 0 0 0-12-12h-56a12 12 0 0 0-12 12v72.61L318.47 43a48 48 0 0 0-61 0L4.34 251.47a12 12 0 0 0-1.6 16.9l25.5 31A12 12 0 0 0 45.15 301l235.22-193.74a12.19 12.19 0 0 1 15.3 0L530.9 301a12 12 0 0 0 16.9-1.6l25.5-31a12 12 0 0 0-1.7-16.93z"></path></svg>';
|
||||
$homeIcon = ($this->_fontawesome) ? e107::getParser()->toGlyph('fa-home.glyph') : $fallbackIcon;
|
||||
}
|
||||
|
||||
|
||||
$opt[] = "<a href='".e_HTTP."' aria-label='Homepage'>".$homeIcon. '</a>'; // Add Site-Pref to disable?
|
||||
|
||||
|
||||
$text = "\n<ul class=\"breadcrumb\">\n";
|
||||
$text .= '<li class="breadcrumb-item">';
|
||||
|
||||
|
@@ -420,6 +420,9 @@ div.e-debug .btn { display: inline-block; margin-bottom: 0; font-
|
||||
.news-view-pagination > li { padding-left: 0; padding-right: 0; }
|
||||
.news-view-pagination > li > a { float:none; display:inline-block }
|
||||
|
||||
/* FontAwesome Shims */
|
||||
.svg-inline--fa.fa-w-16 { width:1em }
|
||||
|
||||
.mx-0 {
|
||||
margin-right:0!important;
|
||||
margin-left:0!important
|
||||
|
Reference in New Issue
Block a user