From f999c331b1b1c9025b7ebd804b42defd1b88dab7 Mon Sep 17 00:00:00 2001 From: "stephen@cubedesigners.com" Date: Fri, 24 Jun 2016 16:40:23 +0000 Subject: [PATCH] WIP #486 @2 --- framework/application/forms/CMS/Contact.php | 18 +++++++++++++ .../views/scripts/templates/contact.phtml | 25 ++++++++++++++----- less/001-variables.less | 3 ++- less/002-common.less | 14 +++++++++++ less/310-contact.less | 5 ++++ 5 files changed, 58 insertions(+), 7 deletions(-) create mode 100644 less/310-contact.less diff --git a/framework/application/forms/CMS/Contact.php b/framework/application/forms/CMS/Contact.php index 90bf9ce..25e28d0 100644 --- a/framework/application/forms/CMS/Contact.php +++ b/framework/application/forms/CMS/Contact.php @@ -2,4 +2,22 @@ class Fluidbook_Form_CMS_Contact extends Fluidbook_Form_CMS { + public function init() { + parent::init(); + + $intro_title = new Zend_Form_Element_Textarea('intro_title'); + $intro_title->setLabel('Intro Titre'); + $intro_title->setAttrib('rows', 3); + $this->addElement($intro_title); + + $intro_content = new CubeIT_Form_Element_Markitup('intro_content'); + $intro_content->setLabel('Intro Content'); + $this->addElement($intro_content); + + $intro_bg = new CubeIT_Form_Element_File_Image('intro_bg_image'); + $intro_bg->setLabel('Background Image'); + $intro_bg->setMaxItems(1); + $this->addElement($intro_bg); + } + } \ No newline at end of file diff --git a/framework/application/views/scripts/templates/contact.phtml b/framework/application/views/scripts/templates/contact.phtml index 596ff1d..6150ce3 100644 --- a/framework/application/views/scripts/templates/contact.phtml +++ b/framework/application/views/scripts/templates/contact.phtml @@ -1,7 +1,20 @@ headScript()->addScriptAndStyle('310-contact'); + +$intro_image_path = CubeIT_View_Helper_ImageCms::getPath($this->intro_bg_image); + +// Work out the min-height based on the ratio of the image +CubeIT_Image::getDimensions($intro_image_path, $intro_image_width, $intro_image_height); +$intro_min_height = (($intro_image_height / $intro_image_width) * 100) .'vw'; // viewport-width units + +$res .= '
'; +$res .= '
'; +$res .= '

'. nl2br($this->intro_title) .'

'; +$res .= $this->markupDotclear($this->intro_content); +$res .= '
'; // .content-wrapper +$res .= '
'; // .contact-intro + +echo $res; \ No newline at end of file diff --git a/less/001-variables.less b/less/001-variables.less index 3a4bb96..9ac9a12 100644 --- a/less/001-variables.less +++ b/less/001-variables.less @@ -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 diff --git a/less/002-common.less b/less/002-common.less index 6dc9ed0..6e3087b 100644 --- a/less/002-common.less +++ b/less/002-common.less @@ -13,6 +13,20 @@ main{ padding-top: 180px; } +// Main heading style +h1.title { + color: #343c44; + font-family: @playfair; + font-size: 60px; + font-weight: 400; +} + +.content-wrapper { + width: 100%; + padding: 0 5%; + //max-width: @content-max-width; +} + .cubeit-content{ width: 90%; margin:0 auto; diff --git a/less/310-contact.less b/less/310-contact.less new file mode 100644 index 0000000..fb7f04c --- /dev/null +++ b/less/310-contact.less @@ -0,0 +1,5 @@ +.contact-intro { + background-repeat: no-repeat; + background-position: bottom right; + background-size: 100%; +} \ No newline at end of file -- 2.39.5