[icinga-checkins] icinga.org: icingaweb2/master: doc/style: add style guide, rename webfont

git at icinga.org git at icinga.org
Wed Nov 19 08:20:08 CET 2014


Module: icingaweb2
Branch: master
Commit: add06675502f320e003b3a38e3210100b4c0e7f1
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=add06675502f320e003b3a38e3210100b4c0e7f1

Author: Thomas Gelf <thomas at gelf.net>
Date:   Mon Nov 17 16:53:14 2014 +0100

doc/style: add style guide, rename webfont

---

 .../application/controllers/StyleController.php    |   24 ++++++++++++++++----
 .../application/views/scripts/style/guide.phtml    |   13 +++++++++++
 2 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/modules/doc/application/controllers/StyleController.php b/modules/doc/application/controllers/StyleController.php
index 889187e..c28358d 100644
--- a/modules/doc/application/controllers/StyleController.php
+++ b/modules/doc/application/controllers/StyleController.php
@@ -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));
+        );
     }
 }
diff --git a/modules/doc/application/views/scripts/style/guide.phtml b/modules/doc/application/views/scripts/style/guide.phtml
new file mode 100644
index 0000000..0be3d75
--- /dev/null
+++ b/modules/doc/application/views/scripts/style/guide.phtml
@@ -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>



More information about the icinga-checkins mailing list