Dashboard: Add ability to use IPL Icons (#4429)

This commit is contained in:
Florian Strohmaier 2021-07-07 17:29:05 +02:00 committed by GitHub
parent 5ca7a1acb5
commit 7be774b71d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,8 @@
<?php
use ipl\Web\Widget\Icon;
?>
<div class="controls">
<?= $tabs ?>
</div>
@ -5,7 +10,13 @@
<?php foreach ($navigation as $item): /** @var \Icinga\Web\Navigation\NavigationItem $item */?>
<a class="dashboard-link" href="<?= $this->url($item->getUrl(), $item->getUrlParameters()) ?>"<?= $this->propertiesToString($item->getAttributes()) ?>>
<div class="link-icon">
<?= $this->icon($item->getIcon() ?: 'forward', null, array('aria-hidden' => true)) ?>
<?php
if (substr($item->getUrl()->getPath(), 0, 9) === 'icingadb/') {
echo new Icon($item->getIcon(), [ 'aria-hidden' => 1]);
} else {
echo $this->icon($item->getIcon() ?: 'forward', null, array('aria-hidden' => true));
}
?>
</div>
<div class="link-meta">
<div class="link-label"><?= $this->escape($item->getLabel()) ?></div>

View File

@ -125,10 +125,16 @@
display: table-cell;
padding-right: .5em;
vertical-align: middle;
text-align: center;
> i {
font-size: 3em;
opacity: 0.7;
line-height: 1.5;
&:before {
min-width: 1.25em;
}
}
> img {