]> _ Git - fluidbook-v3.git/commitdiff
WIP #486 @2
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 24 Jun 2016 16:40:23 +0000 (16:40 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 24 Jun 2016 16:40:23 +0000 (16:40 +0000)
framework/application/forms/CMS/Contact.php
framework/application/views/scripts/templates/contact.phtml
less/001-variables.less
less/002-common.less
less/310-contact.less [new file with mode: 0644]

index 90bf9ce72152011ceef7a01ad8dd580b7e798219..25e28d0092c6de0ab2f962a0f565feef56a3364b 100644 (file)
@@ -2,4 +2,22 @@
 \r
 class Fluidbook_Form_CMS_Contact extends Fluidbook_Form_CMS {\r
 \r
+    public function init() {\r
+        parent::init();\r
+\r
+        $intro_title = new Zend_Form_Element_Textarea('intro_title');\r
+        $intro_title->setLabel('Intro Titre');\r
+        $intro_title->setAttrib('rows', 3);\r
+        $this->addElement($intro_title);\r
+\r
+        $intro_content = new CubeIT_Form_Element_Markitup('intro_content');\r
+        $intro_content->setLabel('Intro Content');\r
+        $this->addElement($intro_content);\r
+\r
+        $intro_bg = new CubeIT_Form_Element_File_Image('intro_bg_image');\r
+        $intro_bg->setLabel('Background Image');\r
+        $intro_bg->setMaxItems(1);\r
+        $this->addElement($intro_bg);\r
+    }\r
+\r
 }
\ No newline at end of file
index 596ff1db96340ef81f6bfe20b5e02bcf35840d19..6150ce34b876bb50747cb90b227a266af6d8fd87 100644 (file)
@@ -1,7 +1,20 @@
 <?php\r
-/**\r
- * Created by IntelliJ IDEA.\r
- * User: Vincent\r
- * Date: 22/06/2016\r
- * Time: 19:26\r
- */
\ No newline at end of file
+\r
+$this->headScript()->addScriptAndStyle('310-contact');\r
+\r
+$intro_image_path = CubeIT_View_Helper_ImageCms::getPath($this->intro_bg_image);\r
+\r
+// Work out the min-height based on the ratio of the image\r
+CubeIT_Image::getDimensions($intro_image_path, $intro_image_width, $intro_image_height);\r
+$intro_min_height = (($intro_image_height / $intro_image_width) * 100) .'vw'; // viewport-width units\r
+\r
+$res .= '<div class="contact-intro" \r
+              style="background-image: url('. $intro_image_path .');\r
+              min-height: '. $intro_min_height .'">';\r
+$res .= '<div class="content-wrapper">';\r
+$res .= '<h1 class="title">'. nl2br($this->intro_title) .'</h1>';\r
+$res .= $this->markupDotclear($this->intro_content);\r
+$res .= '</div>'; // .content-wrapper\r
+$res .= '</div>'; // .contact-intro\r
+\r
+echo $res;
\ No newline at end of file
index 3a4bb9689b0f1a3193eaabdb7ad3970d10b9d864..9ac9a12950f56df3cb8996195d840d6928fe4a06 100644 (file)
@@ -15,4 +15,5 @@
 @color-header-grey: #2a3743;
 
 //-- Content and breakpoints
-@mobile-breakpoint: 1024px;
\ No newline at end of file
+@mobile-breakpoint: 1024px;
+@content-max-width: 1512px;
\ No newline at end of file
index 6dc9ed0ba72e5f0e36a3eba8408421af691aed55..6e3087be406a78efa44f39477a86d94d6a8227f9 100644 (file)
@@ -13,6 +13,20 @@ main{
        padding-top: 180px;\r
 }\r
 \r
+// Main heading style\r
+h1.title {\r
+       color: #343c44;\r
+       font-family: @playfair;\r
+       font-size: 60px;\r
+       font-weight: 400;\r
+}\r
+\r
+.content-wrapper {\r
+       width: 100%;\r
+       padding: 0 5%;\r
+       //max-width: @content-max-width;\r
+}\r
+\r
 .cubeit-content{\r
        width: 90%;\r
        margin:0 auto;\r
diff --git a/less/310-contact.less b/less/310-contact.less
new file mode 100644 (file)
index 0000000..fb7f04c
--- /dev/null
@@ -0,0 +1,5 @@
+.contact-intro {
+  background-repeat: no-repeat;
+  background-position: bottom right;
+  background-size: 100%;
+}
\ No newline at end of file