doc/style: show web font icon set

refs #6936
This commit is contained in:
Thomas Gelf 2014-11-13 15:54:31 +01:00
parent 28c239c6fd
commit 3343599a63
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,13 @@
<?php
use Icinga\Application\Icinga;
use Icinga\Web\Controller;
class Doc_StyleController extends Controller
{
public function fontAction()
{
$confFile = Icinga::app()->getApplicationDir('fonts/fontanello-ifont/config.json');
$this->view->font = json_decode(file_get_contents($confFile));
}
}

View File

@ -0,0 +1,14 @@
<div class="controls">
<h1>Icinga Web 2 Icons</h1>
</div>
<div class="content">
<?php foreach ($this->font->glyphs as $icon): ?>
<!-- TODO: move CSS away //-->
<div style="width: 33%; font-size: 1.5em; height: 2em; float: left;" class="<?=
$this->font->css_prefix_text . $icon->css
?>">
<?= $this->escape($icon->css) ?> <span style="font-size: 0.6em">(0x<?= dechex($icon->code) ?>)</span>
</div>
<?php endforeach ?>
</div>