From: stephen@cubedesigners.com Date: Fri, 8 Jul 2016 14:46:59 +0000 (+0000) Subject: Use icon font instead of SVGs for feature icons. WIP #488 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=0874c50bc3a7f1f46735b9e8b290678da59f44b4;p=fluidbook-v3.git Use icon font instead of SVGs for feature icons. WIP #488 @1.5 --- diff --git a/framework/application/forms/CMS/Sub/Features/Feature.php b/framework/application/forms/CMS/Sub/Features/Feature.php index d088350..0fa076c 100644 --- a/framework/application/forms/CMS/Sub/Features/Feature.php +++ b/framework/application/forms/CMS/Sub/Features/Feature.php @@ -13,8 +13,8 @@ class Fluidbook_Form_CMS_Sub_Features_Feature extends CubeIT_Form_SubForm { $content->setLabel('Contenus'); $this->addElement($content); - $icon = new CubeIT_Form_Element_File_Image('icon'); - $icon->setLabel('Pictogramme'); + $icon = new Zend_Form_Element_Text('icon'); + $icon->setLabel('Pictogramme reference (CSS class)'); $this->addElement($icon); $bg_gradient = new Fluidbook_Form_CMS_Sub_Gradient(); diff --git a/framework/application/views/helpers/FeaturesSection.php b/framework/application/views/helpers/FeaturesSection.php index 6fdc52a..26b626e 100644 --- a/framework/application/views/helpers/FeaturesSection.php +++ b/framework/application/views/helpers/FeaturesSection.php @@ -24,8 +24,8 @@ class Fluidbook_View_Helper_FeaturesSection extends CubeIT_View_Helper_Abstract $res .= '
'; - if (is_array($block['icon'])) { - $res .= $this->imageCms($block['icon'], '', null, null, ['class' => 'feature-icon']); + if (!empty($block['icon'])) { + $res .= '
'; } $res .= '
'; diff --git a/less/410-features.less b/less/410-features.less index 4959a3e..86513bd 100644 --- a/less/410-features.less +++ b/less/410-features.less @@ -9,6 +9,7 @@ overflow: hidden; background-repeat: no-repeat; background-size: 100%; + color: @color-text; // Block layouts &.rectangle-right, &.rectangle-bottom { @@ -49,15 +50,27 @@ } .feature-icon { + font-size: 65px; + line-height: 49px; margin-bottom: 30px; margin-right: 30px; .small-rectangle-wide & { float: left; } + + // Hide icon for these views by default + .rectangle-right &, + .rectangle-bottom &, + .square-top &, + .square-bottom & { + display: none; + } } .feature-text { + overflow: hidden; + .rectangle-right & { width: 30%; }