mirror of
https://github.com/unraid/webgui.git
synced 2026-03-10 04:49:14 -05:00
Allow plugins to use fontawesome etc for icon
This commit is contained in:
@@ -65,14 +65,15 @@ foreach (glob($plugins,GLOB_NOSORT) as $plugin_link) {
|
||||
//link/icon
|
||||
$launch = plugin('launch',$plugin_file);
|
||||
if ( $icon = plugin("icon",$plugin_file) ) {
|
||||
if ( $launch )
|
||||
$link = "<a href='/$launch'><i class='fa fa-$icon list'></i></a>";
|
||||
$iconDisplay = substr($icon,0,5) == "icon-" ? "<i class='$icon list'></i>" : "<i class='fa fa-$icon list'></i>";
|
||||
if ( $launch )
|
||||
$link = "<a href='/$launch' class='list'>$iconDisplay</a>";
|
||||
else
|
||||
$link = "<i class='fa fa-$icon list'></i>";
|
||||
$link = $iconDisplay;
|
||||
} else {
|
||||
$icon = icon($name);
|
||||
if ( $launch )
|
||||
$link = "<a href='/$launch'><img src='/$icon' class='list'></a>";
|
||||
$link = "<a href='/$launch' class='list'><img src='/$icon' class='list'></a>";
|
||||
else
|
||||
$link = "<img src='/$icon' class='list'>";
|
||||
}
|
||||
|
||||
@@ -261,6 +261,7 @@ i.orb{font-size:1.1rem;margin:0 8px 0 3px}
|
||||
img.icon{margin:-3px 4px 0 0}
|
||||
img.list{width:auto;max-width:48px;height:48px}
|
||||
i.list{font-size:4rem;}
|
||||
a.list{text-decoration:none;}
|
||||
div.content{position:absolute;top:0;left:0;width:100%;padding-bottom:30px;z-index:-1;clear:both}
|
||||
div.content.shift{margin-top:1px}
|
||||
label+.content{margin-top:64px}
|
||||
|
||||
@@ -246,6 +246,7 @@ i.orb{font-size:1.1rem;margin:0 8px 0 3px}
|
||||
img.icon{margin:-3px 4px 0 0}
|
||||
img.list{width:auto;max-width:48px;height:48px}
|
||||
i.list{font-size:4rem;}
|
||||
a.list{text-decoration:none;}
|
||||
div.content{position:absolute;top:0;left:0;width:100%;padding-bottom:30px;z-index:-1;clear:both}
|
||||
div.content.shift{margin-top:1px}
|
||||
label+.content{margin-top:86px}
|
||||
|
||||
@@ -261,6 +261,7 @@ i.orb{font-size:1.1rem;margin:0 8px 0 3px}
|
||||
img.icon{margin:-3px 4px 0 0}
|
||||
img.list{width:auto;max-width:48px;height:48px}
|
||||
i.list{font-size:4rem;}
|
||||
a.list{text-decoration:none;}
|
||||
div.content{position:absolute;top:0;left:0;width:100%;padding-bottom:30px;z-index:-1;clear:both}
|
||||
div.content.shift{margin-top:1px}
|
||||
label+.content{margin-top:64px}
|
||||
|
||||
@@ -246,6 +246,7 @@ i.orb{font-size:1.1rem;margin:0 8px 0 3px}
|
||||
img.icon{margin:-3px 4px 0 0}
|
||||
img.list{width:auto;max-width:48px;height:48px}
|
||||
i.list{font-size:4rem;}
|
||||
a.list{text-decoration:none;}
|
||||
div.content{position:absolute;top:0;left:0;width:100%;padding-bottom:30px;z-index:-1;clear:both}
|
||||
div.content.shift{margin-top:1px}
|
||||
label+.content{margin-top:86px}
|
||||
|
||||
Reference in New Issue
Block a user