doc/style: add style guide, rename webfont

This commit is contained in:
Thomas Gelf 2014-11-17 16:53:14 +01:00
parent 2d94c7854d
commit add0667550
2 changed files with 33 additions and 4 deletions

View File

@ -6,16 +6,32 @@ use Icinga\Web\Widget;
class Doc_StyleController extends Controller
{
public function guideAction()
{
$this->view->tabs = $this->tabs()->activate('guide');
}
public function fontAction()
{
$this->view->tabs = Widget::create('tabs')->add(
$this->view->tabs = $this->tabs()->activate('font');
$confFile = Icinga::app()->getApplicationDir('fonts/fontello-ifont/config.json');
$this->view->font = json_decode(file_get_contents($confFile));
}
protected function tabs()
{
return Widget::create('tabs')->add(
'guide',
array(
'title' => $this->translate('Style Guide'),
'url' => 'doc/style/guide'
)
)->add(
'fonts',
array(
'title' => $this->translate('Icons'),
'url' => 'doc/style/font'
)
)->activate('fonts');
$confFile = Icinga::app()->getApplicationDir('fonts/fontanello-ifont/config.json');
$this->view->font = json_decode(file_get_contents($confFile));
);
}
}

View File

@ -0,0 +1,13 @@
<div class="controls">
<?= $this->tabs ?>
<h1>Style Guide</h1>
</div>
<div class="content">
<h1>H1 - header</h1>
<h2>H2 - header</h2>
<h3>H3 - header</h3>
<h4>H4 - header</h4>
<h5>H5 - header</h5>
<h6>H6 - header</h6>
</div>