\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
<?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
@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
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
--- /dev/null
+.contact-intro {
+ background-repeat: no-repeat;
+ background-position: bottom right;
+ background-size: 100%;
+}
\ No newline at end of file