Пример #1
0
 function attr()
 {
     $attr = array();
     // FIXXXME had clearfix class; group mixin working?
     $attr['class'] = 't4p-reading-box-container reading-box-container-' . $this->tagline_box_counter;
     if (self::$args['animation_type']) {
         $animations = T4PCore_Plugin::animations(array('type' => self::$args['animation_type'], 'direction' => self::$args['animation_direction'], 'speed' => self::$args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     return $attr;
 }
Пример #2
0
 function attr()
 {
     $attr = array();
     $attr['class'] = sprintf('t4p-alert alert %s alert-dismissable alert-%s', self::$args['type'], $this->alert_class);
     if (self::$args['box_shadow'] == 'yes') {
         $attr['class'] .= ' alert-shadow';
     }
     if ($this->alert_class == 'custom') {
         $attr['style'] = sprintf('background-color:%s;color:%s;border-color:%s;border-width:%s;', self::$args['background_color'], self::$args['accent_color'], self::$args['accent_color'], self::$args['border_size']);
     }
     if (self::$args['animation_type']) {
         $animations = T4PCore_Plugin::animations(array('type' => self::$args['animation_type'], 'direction' => self::$args['animation_direction'], 'speed' => self::$args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     return $attr;
 }
Пример #3
0
 function attr()
 {
     $attr['class'] = sprintf('fa fontawesome-icon %s size-%s %2$s circle-%s', T4PCore_Plugin::font_awesome_name_handler(self::$args['icon']), self::$args['size'], self::$args['circle']);
     $attr['style'] = '';
     if (self::$args['circle'] == 'yes') {
         if (self::$args['circlebordercolor']) {
             $attr['style'] .= sprintf('border-color:%s;', self::$args['circlebordercolor']);
         }
         if (self::$args['circlecolor']) {
             $attr['style'] .= sprintf('background-color:%s;', self::$args['circlecolor']);
         }
     }
     if (self::$args['iconcolor']) {
         $attr['style'] .= sprintf('color:%s;', self::$args['iconcolor']);
     }
     if (self::$args['flip']) {
         $attr['class'] .= ' fa-flip-' . self::$args['flip'];
     }
     if (self::$args['rotate']) {
         $attr['class'] .= ' fa-rotate-' . self::$args['rotate'];
     }
     if (self::$args['spin'] == 'yes') {
         $attr['class'] .= ' fa-spin';
     }
     if (self::$args['animation_type']) {
         $animations = T4PCore_Plugin::animations(array('type' => self::$args['animation_type'], 'direction' => self::$args['animation_direction'], 'speed' => self::$args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     return $attr;
 }
Пример #4
0
 function attr()
 {
     $attr = array();
     $attr['class'] = sprintf('t4p-recent-works layout-%s', self::$args['layout']);
     if (self::$args['layout'] == 'carousel') {
         $attr['class'] .= ' recent-works-carousel';
         if (self::$args['picture_size'] == 'auto') {
             $attr['class'] .= ' picture-size-auto';
         }
     } else {
         $attr['class'] .= sprintf(' portfolio portfolio-%s', $this->column);
         $attr['data-columns'] = $this->column;
     }
     if (self::$args['layout'] == 'grid') {
         $attr['class'] .= ' portfolio-grid';
     }
     if (self::$args['layout'] == 'grid-with-excerpts') {
         $attr['class'] .= sprintf(' portfolio-%s-text', $this->column);
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     if (self::$args['animation_type']) {
         $animations = T4PCore_Plugin::animations(array('type' => self::$args['animation_type'], 'direction' => self::$args['animation_direction'], 'speed' => self::$args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
     }
     return $attr;
 }
Пример #5
0
 function slideshow_attr()
 {
     $attr = array();
     $attr['class'] = 't4p-flexslider flexslider';
     if (self::$args['layout'] == 'thumbnails-on-side') {
         $attr['class'] .= ' floated-slideshow';
     }
     if (self::$args['animation_type']) {
         $animations = T4PCore_Plugin::animations(array('type' => self::$args['animation_type'], 'direction' => self::$args['animation_direction'], 'speed' => self::$args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
     }
     return $attr;
 }
Пример #6
0
 function icon_attr()
 {
     $attr['style'] = '';
     if (self::$child_args['image']) {
         $attr['class'] = 'image';
         if (self::$parent_args['layout'] == 'icon-boxed' && self::$child_args['image_width'] && self::$child_args['image_height']) {
             $attr['style'] = sprintf('margin-left:-%spx;', self::$child_args['image_width'] / 2);
             $attr['style'] .= sprintf('top:-%spx;', self::$child_args['image_height'] / 2 + 50);
         }
     } else {
         if (self::$child_args['icon']) {
             $attr['class'] = sprintf('fa fontawesome-icon medium %s', T4PCore_Plugin::font_awesome_name_handler(self::$child_args['icon']));
             // set parent values if child values are unset to get downwards compatibility
             if (!self::$child_args['circle']) {
                 self::$child_args['circle'] = self::$parent_args['circle'];
             }
             if (!self::$child_args['circlebordercolor']) {
                 self::$child_args['circlebordercolor'] = self::$parent_args['circlebordercolor'];
             }
             if (!self::$child_args['circlecolor']) {
                 self::$child_args['circlecolor'] = self::$parent_args['circlecolor'];
             }
             if (!self::$child_args['iconcolor']) {
                 self::$child_args['iconcolor'] = self::$parent_args['iconcolor'];
             }
             // ! self::$child_args['circle'] for backwards compatibility
             if (self::$child_args['circle'] == 'yes' || !self::$child_args['circle']) {
                 $attr['class'] .= ' circle-yes';
                 if (self::$child_args['circlebordercolor']) {
                     $attr['style'] .= sprintf('border-color:%s;', self::$child_args['circlebordercolor']);
                 }
                 if (self::$child_args['circlecolor']) {
                     $attr['style'] .= sprintf('background-color:%s;', self::$child_args['circlecolor']);
                 }
             }
             if (self::$child_args['iconcolor']) {
                 $attr['style'] .= sprintf('color:%s;', self::$child_args['iconcolor']);
             }
             if (self::$child_args['iconflip']) {
                 $attr['class'] .= ' fa-flip-' . self::$child_args['iconflip'];
             }
             if (self::$child_args['iconrotate']) {
                 $attr['class'] .= ' fa-rotate-' . self::$child_args['iconrotate'];
             }
             if (self::$child_args['iconspin'] == 'yes') {
                 $attr['class'] .= ' fa-spin';
             }
         }
     }
     if (self::$child_args['animation_type']) {
         $animations = T4PCore_Plugin::animations(array('type' => self::$child_args['animation_type'], 'direction' => self::$child_args['animation_direction'], 'speed' => self::$child_args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
     }
     return $attr;
 }
Пример #7
0
 function icon_attr()
 {
     $attr = array();
     if (self::$child_args['image']) {
         $attr['class'] = 'image';
     } else {
         if (self::$child_args['icon']) {
             $attr['class'] = sprintf('fa %s', T4PCore_Plugin::font_awesome_name_handler(self::$child_args['icon']));
         }
     }
     if (self::$child_args['icon_color']) {
         $attr['style'] = sprintf('color:%s;', self::$child_args['icon_color']);
     }
     if (self::$child_args['icon_flip']) {
         $attr['class'] .= ' fa-flip-' . self::$child_args['icon_flip'];
     }
     if (self::$child_args['icon_rotate']) {
         $attr['class'] .= ' fa-rotate-' . self::$child_args['icon_rotate'];
     }
     if (self::$child_args['icon_spin'] == 'yes') {
         $attr['class'] .= ' fa-spin';
     }
     if (self::$child_args['animation_type'] && self::$child_args['icon_spin'] != 'yes') {
         $animations = T4PCore_Plugin::animations(array('type' => self::$child_args['animation_type'], 'direction' => self::$child_args['animation_direction'], 'speed' => self::$child_args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
     }
     return $attr;
 }
Пример #8
0
 function attr()
 {
     $attr = array();
     $attr['style'] = '';
     $attr['class'] = sprintf('t4p-imageframe imageframe imageframe-%s imageframe-%s', self::$args['style'], $this->imageframe_counter);
     if (self::$args['style'] == 'bottomshadow') {
         $attr['class'] .= ' element-bottomshadow';
     }
     if (self::$args['align'] == 'left') {
         $attr['style'] .= 'margin-right:25px;float:left;';
     } elseif (self::$args['align'] == 'right') {
         $attr['style'] .= 'margin-left:25px;float:right;';
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     if (self::$args['animation_type']) {
         $animations = T4PCore_Plugin::animations(array('type' => self::$args['animation_type'], 'direction' => self::$args['animation_direction'], 'speed' => self::$args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
     }
     return $attr;
 }
Пример #9
0
 function attr()
 {
     $attr['class'] = sprintf('btn-default button %3$s button %4$s t4p-button button-%s button-%s button-%s button-%s button-%s buttonshadow-%s', self::$args['type'], self::$args['shape'], self::$args['size'], self::$args['color'], $this->button_counter, self::$args['shadow']);
     if (self::$args['animation_type']) {
         $animations = T4PCore_Plugin::animations(array('type' => self::$args['animation_type'], 'direction' => self::$args['animation_direction'], 'speed' => self::$args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
     }
     $attr['type'] = 'button';
     $attr['target'] = self::$args['target'];
     $attr['title'] = self::$args['title'];
     $attr['href'] = self::$args['link'];
     if (self::$args['modal']) {
         $attr['data-toggle'] = 'modal';
         $attr['data-target'] = '.' . self::$args['modal'];
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     return $attr;
 }