]> _ Git - fluidbook-v3.git/commitdiff
Use icon font instead of SVGs for feature icons. WIP #488 @1.5
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 8 Jul 2016 14:46:59 +0000 (14:46 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 8 Jul 2016 14:46:59 +0000 (14:46 +0000)
framework/application/forms/CMS/Sub/Features/Feature.php
framework/application/views/helpers/FeaturesSection.php
less/410-features.less

index d0883509c94aacac641fce0fa35d095e8bee8422..0fa076cf65936082a1874b990093035c937275ff 100644 (file)
@@ -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();
index 6fdc52acd84147655940e4baa2520552078ec381..26b626eccb6ac1ce9ac16fac1175d443ee4c2fc4 100644 (file)
@@ -24,8 +24,8 @@ class Fluidbook_View_Helper_FeaturesSection extends CubeIT_View_Helper_Abstract
 
             $res .= '<div class="feature-inner">';
 
-            if (is_array($block['icon'])) {
-                $res .= $this->imageCms($block['icon'], '', null, null, ['class' => 'feature-icon']);
+            if (!empty($block['icon'])) {
+                $res .= '<div class="feature-icon fb-'. $block['icon'] .'"></div>';
             }
 
             $res .= '<div class="feature-text">';
index 4959a3e54c620ec4a845bc864945dfb5be45a72b..86513bd10f8ec4bc1aebd480777bb3f284f068be 100644 (file)
@@ -9,6 +9,7 @@
   overflow: hidden;
   background-repeat: no-repeat;
   background-size: 100%;
+  color: @color-text;
 
   // Block layouts
   &.rectangle-right, &.rectangle-bottom {
 }
 
 .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%;
   }