if (isset($data['backgroundimage']) && !isset($data['bg_image'])) {\r
$data['bg_image'] = $data['backgroundimage'];\r
}\r
+ if (isset($data['backgroundcolor']) && !isset($data['bg_color'])) {\r
+ $data['bg_color'] = $data['backgroundcolor'];\r
+ }\r
if (isset($data['bg_image'])) {\r
$bgimage = CubeIT_Util_Cms::extractFile($data['bg_image']);\r
$extra_attributes = array();\r
$image_ratio = $image_height / $image_width;\r
$attributes['data-bg-ratio'] = $image_ratio;\r
\r
- $style = "background-image: url($image_path);";\r
+ if (\r
+ Bootstrap::getInstance()->getAuthUser()->getEmail() == 'vincent@cubedesigners.com'\r
+ ) {\r
+ $mobile = $this->imageProcess()->imageProcessGetURL($image_path, '', $image_width * 0.55, $image_height, array(), 'C', 'R', 'M');\r
\r
- if (isset($data['backgroundcolor'])) {\r
- $style .= 'background-color:' . $data['backgroundcolor'];\r
+ $bg = $this->htmlElement($this->picture(array(array('src' => $image_path, "width" => 1680), array("src" => $mobile, "width" => 1680, 'media' => '(max-width: 900px)'))), 'div', array('class' => 'picture'));\r
+ $content = $bg . $content;\r
+ } else {\r
+ $style .= "background-image: url($image_path);";\r
}\r
}\r
}\r