mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-20 20:34:25 +02:00
doc/style: add style guide, rename webfont
This commit is contained in:
parent
2d94c7854d
commit
add0667550
@ -6,16 +6,32 @@ use Icinga\Web\Widget;
|
|||||||
|
|
||||||
class Doc_StyleController extends Controller
|
class Doc_StyleController extends Controller
|
||||||
{
|
{
|
||||||
|
public function guideAction()
|
||||||
|
{
|
||||||
|
$this->view->tabs = $this->tabs()->activate('guide');
|
||||||
|
}
|
||||||
|
|
||||||
public function fontAction()
|
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',
|
'fonts',
|
||||||
array(
|
array(
|
||||||
'title' => $this->translate('Icons'),
|
'title' => $this->translate('Icons'),
|
||||||
'url' => 'doc/style/font'
|
'url' => 'doc/style/font'
|
||||||
)
|
)
|
||||||
)->activate('fonts');
|
);
|
||||||
$confFile = Icinga::app()->getApplicationDir('fonts/fontanello-ifont/config.json');
|
|
||||||
$this->view->font = json_decode(file_get_contents($confFile));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
13
modules/doc/application/views/scripts/style/guide.phtml
Normal file
13
modules/doc/application/views/scripts/style/guide.phtml
Normal 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>
|
Loading…
x
Reference in New Issue
Block a user