]> _ Git - fluidbook-v3.git/commitdiff
wip #600 @2
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 29 Aug 2016 11:53:05 +0000 (11:53 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 29 Aug 2016 11:53:05 +0000 (11:53 +0000)
framework/application/views/helpers/BackgroundBlock.php
less/002-common.less
less/102-intro.less

index e52c1c6b11c9e3ad7c6b9d90377f637e117c4906..cfa7ddaf642c1de7ae1f4480d3aa90c57ffbdf43 100644 (file)
@@ -11,6 +11,9 @@ class Fluidbook_View_Helper_BackgroundBlock extends CubeIT_View_Helper_Abstract
                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
@@ -22,10 +25,15 @@ class Fluidbook_View_Helper_BackgroundBlock extends CubeIT_View_Helper_Abstract
                                $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
index 759f525496117a4c04f6d5237f2adce046e00793..3692fb3a0a4db14cdfdd040f237dad94efe79d28 100644 (file)
@@ -87,6 +87,7 @@ a {
 }\r
 \r
 .content-wrapper {\r
+       position: relative;\r
        width: 100%;\r
        padding-top: 4%;\r
        padding-bottom: 5%;\r
@@ -94,6 +95,31 @@ a {
                min-height: 100%;\r
                background-size: 100%;\r
        }\r
+\r
+       .picture {\r
+               position: absolute;\r
+               bottom: 0;\r
+               left: 0;\r
+               width: 100%;\r
+               height: 1000px;\r
+               z-index: 0;\r
+               picture {\r
+                       img {\r
+                               width: 100%;\r
+                               height: auto;\r
+                               display: block;\r
+                               position: absolute;\r
+                               right: 0;\r
+                               bottom: 0;\r
+                       }\r
+               }\r
+       }\r
+\r
+\r
+       .grid {\r
+               position: relative;\r
+               z-index: 1;\r
+       }\r
 }\r
 \r
 .no-shrink {\r
index eb5b75372c41b4a55659b8ccebfb430abeb742e6..2ba80eeb7188ff2c2fbf841cee3a6b5f8b3e217c 100644 (file)
@@ -22,7 +22,6 @@
                @media @m768 {\r
                        padding-top: 80px;\r
                }\r
-\r
        }\r
 \r
        blockquote {\r