]> _ Git - cubedesigners-v7.git/commitdiff
(no commit message)
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 16 Jan 2015 14:35:36 +0000 (14:35 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 16 Jan 2015 14:35:36 +0000 (14:35 +0000)
26 files changed:
.htaccess
framework/application/Bootstrap.php
framework/application/controllers/RssController.php [new file with mode: 0644]
framework/application/forms/CMS/Sub/Casestudies/Studies.php
framework/application/forms/CMS/Sub/RSS.php [new file with mode: 0644]
framework/application/forms/Settings.php
framework/application/layouts/scripts/layout.phtml
framework/application/models/Casestudy.php
framework/application/views/helpers/CasestudiesDetail.php
framework/application/views/helpers/ContactInfos.php
framework/application/views/scripts/common/content.phtml
framework/application/views/scripts/common/header.phtml
framework/application/views/scripts/studies/index.phtml
framework/application/views/scripts/templates/casestudies.phtml
framework/application/views/scripts/templates/contact.phtml
framework/application/views/scripts/templates/expertise.phtml
js/common.js
js/contact.js
js/taglist.js
less/agence.less
less/casestudies.less
less/casestudies_detail.less
less/common.less
less/contact.less
less/header.less
less/realisations.less

index 7ee4bae2cd4387ac134d359b1ca3dadb0cf41024..88807f0ea8e0c868b4e673d57c14b57d82bf9b45 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -57,7 +57,8 @@
        AddType application/vnd.ms-fontobject .eot
        AddType application/octet-stream .otf
        AddType application/octet-stream .ttf
-       AddType application/x-font-woff .woff
+       AddType application/font-woff .woff
+       AddType application/font-woff2 .woff2
        AddType text/cache-manifest .appcache
        AddType text/x-component .htc
 
@@ -71,7 +72,7 @@
 # Output compression
 <IfModule mod_deflate.c>
        SetOutputFilter DEFLATE
-       SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|swf|zip|exe|mp3|f4v|mp4|flv|gz|pdf|swc|ogv|ogm|ogg|webm|svgz|eot|otf|ttf|woff)$ no-gzip dont-vary
+       SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|swf|zip|exe|mp3|f4v|mp4|flv|gz|pdf|swc|ogv|ogm|ogg|webm|svgz|eot|otf|ttf|woff|woff2)$ no-gzip dont-vary
 
        <IfModule mod_headers.c>
                Header append Vary User-Agent
index 12e848d6b96733cce81de13d59109942d45b1182..854d1e116d63fcd4f53373deee5166dd534578c9 100644 (file)
@@ -11,6 +11,7 @@ class Bootstrap extends CubeIT_Bootstrap {
 
        protected function _initRouter($initCms = true) {
                $router = parent::_initRouter($initCms);
+        $router->addStandardRoute('rss');
                return $router;
        }
 
diff --git a/framework/application/controllers/RssController.php b/framework/application/controllers/RssController.php
new file mode 100644 (file)
index 0000000..ab24de1
--- /dev/null
@@ -0,0 +1,189 @@
+<?php\r
+\r
+\r
+\r
+class RssController extends CubeIT_Controller_LayoutlessController{\r
+\r
+    protected $_queryLimit = 10; // Number of entries to return by default. Set to NULL for no limit.\r
+\r
+\r
+    public function indexAction()  {\r
+\r
+    }\r
+\r
+    public function newsAction() {\r
+\r
+        // Set up the feed with values from the CMS\r
+        $rss = CubeIT_Util_Cms::unserialize($this->getOpt('rss'));\r
+        $feed = $this->_initFeed($rss['rss_news_title'], $rss['rss_news_description']);\r
+\r
+        $news=CubeIT_Util_Cms::unserialize($this->getOpt('actus'));\r
+\r
+//        echo '<pre>'; print_r($news); exit;\r
+\r
+        foreach($news['actualites'] as $n) {\r
+\r
+            $link = null;\r
+\r
+            // Handle links - can be either an external URL or an internal page link. Internal has priority.\r
+            if(!empty($n['link']['url']) || !empty($n['link']['page'])) {\r
+                $link = !empty($n['link']['page']) ? CubeIT_View_Helper_Link::internal($n['link']['page']) : $n['link']['url'];\r
+\r
+                // Make sure that link is properly formed (mainly for the external URL)\r
+                if(!Zend_Uri::check($link)) {\r
+                    $link = 'http://'.$link;\r
+                }\r
+            }\r
+\r
+            $e = $feed->createEntry();\r
+\r
+            $e->setTitle($n['texte']);\r
+            $e->setDateCreated(strtotime($n['date']));\r
+            $e->setId($n['date']);\r
+            if($link) { $e->setLink($link); }\r
+\r
+            $feed->addEntry($e);\r
+\r
+        }\r
+\r
+        echo $feed->export('rss');\r
+    }\r
+\r
+    public function projectsAction() {\r
+\r
+        $realisations = Cubedesigners_Model_Realisation::factory()->where('online = ?', 1)\r
+                                                                  ->order('date DESC')\r
+                                                                  ->limit($this->_queryLimit)\r
+                                                                  ->find();\r
+\r
+        // Set up the feed with values from the CMS\r
+        $rss = CubeIT_Util_Cms::unserialize($this->getOpt('rss'));\r
+        $feed = $this->_initFeed($rss['rss_projects_title'], $rss['rss_projects_description']);\r
+\r
+        foreach($realisations as $r){\r
+\r
+            //fb($r);\r
+\r
+            // Prepare feed data\r
+            $title = CubeIT_Util_Cms::unserialize($r->getTitre());\r
+            $description = CubeIT_Util_Cms::unserialize($r->getDescription());\r
+            $date = $r->getDate();\r
+            $enclosure = $this->_enclosureDetails(CubeIT_Util_Cms::unserialize($r->getVisuel()));\r
+\r
+            // Get the link using the navigation class. "3" is the ID of the realisations / portfolio page\r
+            $link = CubeIT_View_Helper_Link::internal('3/' . $r->getId());\r
+\r
+            $e = $feed->createEntry();\r
+\r
+            $e->setTitle($title);\r
+            //$e->setId($url);\r
+            $e->setLink($link);\r
+            $e->setDateCreated($date);\r
+            if(!empty($description)) { $e->setDescription($description); }\r
+            if($enclosure) { $e->setEnclosure($enclosure); }\r
+\r
+            $feed->addEntry($e);\r
+\r
+            // Note: unserialize() automatically returns data for the current locale if it can. A different locale can be specified too.\r
+            //fb(CubeIT_Util_Cms::unserialize($r->getTitre())); // using magic functions for accessing data from model ->getnameCamelCased();\r
+\r
+        }\r
+\r
+        echo $feed->export('rss');\r
+\r
+    }\r
+\r
+    public function casestudiesAction() {\r
+\r
+        $studies = Cubedesigners_Model_Casestudy::factory()->where('online = ?', 1)\r
+                                                           ->order('annee DESC')\r
+                                                           ->limit($this->_queryLimit)\r
+                                                           ->find();\r
+\r
+        //fb($studies);\r
+\r
+        // Set up the feed with values from the CMS\r
+        $rss = CubeIT_Util_Cms::unserialize($this->getOpt('rss'));\r
+        $feed = $this->_initFeed($rss['rss_casestudies_title'], $rss['rss_casestudies_description']);\r
+\r
+        foreach($studies as $s) {\r
+\r
+            // Prepare feed data\r
+            $title = CubeIT_Util_Cms::unserialize($s->getTitre());\r
+            $description = CubeIT_Util_Cms::unserialize($s->getDescription());\r
+            $enclosure = $this->_enclosureDetails(CubeIT_Util_Cms::unserialize($s->getVisuel()));\r
+            $date = $s->getAnnee();\r
+\r
+            // Get the link using the navigation class. "4" is the ID of the case studies page\r
+            $link = CubeIT_View_Helper_Link::internal('4/' . $s->getId());\r
+\r
+            $e = $feed->createEntry();\r
+\r
+            $e->setTitle($title);\r
+            if(!empty($description)) { $e->setDescription($description); }\r
+            //$e->setId($url);\r
+            $e->setLink($link);\r
+            if($enclosure) { $e->setEnclosure($enclosure); }\r
+            $e->setDateCreated($date);\r
+\r
+            $feed->addEntry($e);\r
+\r
+        }\r
+\r
+        echo $feed->export('rss');\r
+\r
+    }\r
+\r
+\r
+    /**\r
+     * Set up common feed options\r
+     * @param string $title\r
+     * @return Zend_Feed_Writer_Feed\r
+     * @throws Zend_Feed_Exception\r
+     */\r
+    protected function _initFeed($title = 'Cubedesigners News', $description = 'The latest updates from Cubedesigners') {\r
+\r
+        $feed = new Zend_Feed_Writer_Feed;\r
+\r
+        $feed->setTitle($title);\r
+        $feed->setLink('http://'.$this->getOpt('webhost').'/');\r
+        $feed->setGenerator(array('name' => 'cubeRSS'));\r
+        $feed->setDescription($description);\r
+\r
+        return $feed;\r
+\r
+    }\r
+\r
+    /**\r
+     * Get details for attached imagery on feed items\r
+     * @param array $images\r
+     * @return array\r
+     */\r
+    protected function _enclosureDetails($images) {\r
+\r
+        if(is_array($images)) {\r
+\r
+            $baseURL = 'http://' . $this->getOpt('webhost');\r
+\r
+            $imageURI = CubeIT_View_Helper_ImageCms::getPath($images[0]); // Just get the first image, even if there are more\r
+            $imagePath = $_SERVER['DOCUMENT_ROOT'] . $imageURI;\r
+\r
+            // Find the MIME type of the file\r
+            $finfo = finfo_open(FILEINFO_MIME_TYPE);\r
+            $type = finfo_file($finfo, $imagePath);\r
+\r
+            $filesize = filesize($imagePath);\r
+\r
+            $image['uri'] = $baseURL . $imageURI;\r
+            $image['type'] = $type;\r
+            $image['length'] = $filesize;\r
+\r
+            return $image;\r
+\r
+        }\r
+\r
+        return false;\r
+\r
+    }\r
+\r
+}
\ No newline at end of file
index 044a5f02191fa6d5a68e2f0870ab8ad69dd7fb3d..a23c4f06ab49c776b17e5521ec0356d0ba64e27d 100644 (file)
@@ -18,7 +18,8 @@ class Cubedesigners_Form_CMS_Sub_Casestudies_Studies extends CubeIT_Form_List {
                $propulse->setLabel('Propulsée');
                $this->addElement($propulse);
 
-               $annee = new Zend_Form_Element_Text('annee');
+               $annee = new CubeIT_Form_Element_Date('annee');
+        $annee->setPrecision(Zend_Date::DAY);
                $annee->setLabel('Année');
                $this->addElement($annee);
 
diff --git a/framework/application/forms/CMS/Sub/RSS.php b/framework/application/forms/CMS/Sub/RSS.php
new file mode 100644 (file)
index 0000000..e5f8767
--- /dev/null
@@ -0,0 +1,35 @@
+<?php\r
+\r
+\r
+class Cubedesigners_Form_CMS_Sub_RSS extends CubeIT_Form_SubForm {\r
+\r
+    public function init() {\r
+        parent::init();\r
+\r
+        $feeds = array('news' => 'News Feed',\r
+                       'projects' => 'Projects Feed',\r
+                       'casestudies' => 'Case Studies Feed');\r
+\r
+        foreach($feeds as $feedID => $feedTitle) {\r
+\r
+            /* TITLE */\r
+            $title = new Zend_Form_Element_Text("rss_{$feedID}_title");\r
+            $title->setLabel("$feedTitle Title");\r
+            $this->addElementLocalized($title);\r
+\r
+            /* DESCRIPTION */\r
+            $description = new Zend_Form_Element_Textarea("rss_{$feedID}_description");\r
+            $description->setAttrib('rows', 3);\r
+            $description->setLabel("$feedTitle Description");\r
+            $this->addElementLocalized($description);\r
+\r
+            /* FEED URL */\r
+            $url = new Zend_Form_Element_Text("rss_{$feedID}_url");\r
+            $url->setLabel("$feedTitle URL (used for header RSS links)");\r
+            $this->addElementLocalized($url);\r
+\r
+        }\r
+\r
+    }\r
+\r
+}
\ No newline at end of file
index 585dbfda274f9ba294fd66154572f919ca8fc37c..60bc68bacb52e26d9e18ae3b06c3d765a0a5f12f 100644 (file)
@@ -50,6 +50,11 @@ class Cubedesigners_Form_Settings extends CubeIT_Form_Settings {
                $followus->setLabel('Bloc Suivez-nous');
                $this->addSubFormLocalized($followus, 'followus');
 
+               /* RSS SETTINGS */
+               $rss = new Cubedesigners_Form_CMS_Sub_RSS();
+               $rss->setLabel('RSS Settings');
+               $this->addSubFormLocalized($rss, 'rss');
+
                /* COPYRIGHT */
                $copyright = new Zend_Form_Element_Text('copyright');
                $copyright->setLabel('Copyright du bas de page');
index 5e3b97cf67bf3c6024758c2793eaccbdd01d5467..d9e058ec35f35e5cc05808f9550aad94444c3b3b 100644 (file)
@@ -1,6 +1,13 @@
 <?php
 
 $fonts = array('google' => array('families' => array('Roboto+Condensed:400,300,700:latin')));
+// Locally hosted version of the fonts - this was so fonts would work for Windows Phones and IE but there were too many issues
+// The robotocondensed.css refers to a custom webfont kit from Font Squirrel. It doesn't display as well as the Google Fonts version
+// To make this display properly, we need type hinting and lots of testing and tweaking. End result: not worth it currently...
+// Reference: http://pixelsvsbytes.com/blog/2013/02/nice-web-fonts-for-every-browser/
+// Note: this custom web font is also missing a character currently: "ö" for Jens' surname.
+//$fonts = array('custom' => array('families' => array('Roboto Condensed'), 'urls' => array('/css/fonts/robotocondensed.css')));
+
 $this->headScript()->addWebFont($fonts);
 $this->headScript()->addFastclick();
 
@@ -11,7 +18,8 @@ $this->headScript()->addIEConditionnals();
 $this->headScript()->appendFile('/js/common.js');
 $this->headLink()->appendStylesheet('/less/common.less', 'all');
 
-$this->headMeta()->setViewport('device-width', null, '1.0');
+$this->headMeta()->setViewport('device-width');
+
 
 profile(__FILE__, __LINE__, 'Before rendering body');
 $res = $this->htmlPage($this->render('common/body.phtml'));
index 1ecdded377d7e7834a647fb8872bf4910888c4cd..8e58b9b235e5e87f7e58e1d88fb38b4dd40bad5a 100644 (file)
@@ -17,8 +17,8 @@ class Cubedesigners_Model_Casestudy extends CubeIT_Model_Data_Table {
        protected $tags_secondaires;
        protected $online;
        protected $propulse;
-       protected $annee;
-       protected $_types = array('titre' => 'json', 'description' => 'json', 'url' => 'json', 'visuel' => 'json', 'visuel_detail' => 'json', 'legende' => 'json');
+       protected $annee; // Note: converted to a full date
+       protected $_types = array('titre' => 'json', 'description' => 'json', 'url' => 'json', 'visuel' => 'json', 'visuel_detail' => 'json', 'legende' => 'json', 'annee' => 'date');
 
        public static function getSchema($schema) {
                $casestudies = parent::getSchema($schema);
index dcd517d3258ba1366dc5f74a9dac7186bbab58d5..d478ddd7d5fe93d153c40828a933b6ed1d3869d7 100644 (file)
@@ -4,7 +4,7 @@ class Cubedesigners_View_Helper_CasestudiesDetail extends CubeIT_View_Helper_Abs
 
        public function CasestudiesDetail($studie) {
 
-               $visuel_detail = $this->view->imageProcess($studie->visuel_detail, $studie->titre, 980, 400);
+               $visuel_detail = $this->view->imageProcess($studie->visuel_detail, $studie->titre, 980, 400, array('class' => 'responsive'));
 
                $res = '<div class="case">';
                $res.='<div class="content">';
@@ -12,8 +12,8 @@ class Cubedesigners_View_Helper_CasestudiesDetail extends CubeIT_View_Helper_Abs
                $res.='<h2>' . $studie->description . '</h2>';
                $res.='</div>';
 
-               $res .= '<div id="casestudies-detail-visuel">';
-               $res .= '<div class="visuel-holder">';
+               $res .= '<div class="casestudies-detail-visuel">';
+               $res .= '<div class="visuel-holder content">';
                $res .= '<div class="visuel">' . $visuel_detail . '</div>';
 
                $res .= '<div class="legende">' . $studie->legende . '</div>';
@@ -30,7 +30,7 @@ class Cubedesigners_View_Helper_CasestudiesDetail extends CubeIT_View_Helper_Abs
                        $style = 'background-color:' . $studie->couleur;
                }
 
-               $res .= '<div id="casestudies-detail-content" style="' . $style . ';">';
+               $res .= '<div class="casestudies-detail-content" style="' . $style . ';">';
 
                $blocs = $studie->blocs;
 
@@ -39,7 +39,10 @@ class Cubedesigners_View_Helper_CasestudiesDetail extends CubeIT_View_Helper_Abs
                        // fb($bloc);
                        $margin = '';
                        if ($bloc->margin != '') {
-                               $margin = 'margin-top:' . $bloc->margin . 'px;';
+                // Calculate margin as a percentage for responsive design
+                // Note: margin is based on max-width of images (1200px) because this is how CSS handles % margins, even for margin-top
+                $variableTopMargin = $bloc->margin / 1200 * 100;
+                $margin = 'margin-top:' . $variableTopMargin . '%;';
                        }
 
                        $zindex = '';
@@ -49,7 +52,7 @@ class Cubedesigners_View_Helper_CasestudiesDetail extends CubeIT_View_Helper_Abs
 
                        if ($bloc->selectedtype == "text") {
 
-                               $res .= '<div class="detail-text" style="' . $margin . '' . $zindex . '" >';
+                               $res .= '<div class="detail-text content" style="' . $margin . '' . $zindex . '" >';
                                $res .= '<div class="titre">' . $bloc->titre . '</div>';
                                $res .= $this->markupDotclear($bloc->texte);
                                $res .= '</div>';
@@ -61,8 +64,15 @@ class Cubedesigners_View_Helper_CasestudiesDetail extends CubeIT_View_Helper_Abs
                                $height = -1;
                                CubeIT_Image::getDimensions($visuel, $width, $height);
                                $padding = isset($bloc->visuelpadding) ? $bloc->visuelpadding : 50;
-                               $res .= '<div class="detail-visuel" style="background-image:url(\'' . $visuel . '\');height:' . $height . 'px;' . $margin . '' . $zindex . ';padding-bottom:' . $padding . 'px;"></div>';
-                       }
+
+                // Convert padding into a relative measure (%) for responsive images
+                $padding = $padding / 1200 * 100;
+
+                               //$res .= '<div class="detail-visuel" style="background-image:url(\'' . $visuel . '\');height:' . $height . 'px;' . $margin . '' . $zindex . ';padding-bottom:' . $padding . 'px;"></div>';
+                $res .= '<div class="detail-visuel">';
+                $res .= $this->view->image($visuel, $studie->titre, $width, $height, array('class' => 'responsive', 'style' => "padding-bottom: {$padding}%; $margin"));
+                $res .= '</div>';
+            }
 
 
                        $addVideoBackground = false;
index bda016e6c745a81c7581d1b9e3755cfb0a9cb862..3e9b09bb280f28242d26152665dc322552f224c7 100644 (file)
@@ -4,13 +4,16 @@ class Cubedesigners_View_Helper_ContactInfos extends Zend_View_Helper_Abstract {
 \r
     public function contactInfos($texte, $bureaux) {\r
 \r
-        $res = '<div class="contact-texte">' . $this->view->markupDotclear($texte) . '</div>';\r
+        $res = '<div class="content"><div class="contact-texte">' . $this->view->markupDotclear($texte) . '</div></div>';\r
+\r
+        //$res.= '<div class="twocols"><div class="cols">';\r
 \r
         //$bureaux = $contact['bureaux'];\r
 \r
         foreach ($bureaux as $id => $bureau) {\r
 \r
-            $res.='<div class="col"  itemscope itemtype="http://schema.org/LocalBusiness">';\r
+            $res.='<div class="half-full"  itemscope itemtype="http://schema.org/LocalBusiness">';\r
+            $res.='<div class="inner">';\r
 \r
             $res.='<p class="titre" itemprop="name">' . $bureau['coordonnees']['nom'] . '<p>';\r
 \r
@@ -18,6 +21,9 @@ class Cubedesigners_View_Helper_ContactInfos extends Zend_View_Helper_Abstract {
             $res.='<p>' . __('Cubedesigners') . '</p>';\r
             $res.='<p itemprop="streetAddress">' . $bureau['coordonnees']['adresse'] . '</p>';\r
             $res.='<p><span itemprop="postalCode">' . $bureau['coordonnees']['code_postal'] . '</span> <span itemprop="addressLocality">' . $bureau['coordonnees']['ville'] . '</span> <span itemprop="addressCountry">' . Zend_Locale::getTranslation($bureau['coordonnees']['pays'], 'territory') . '</span></p>';\r
+\r
+            // Alternative link that is displayed when there isn't enough space for the maps\r
+            $res.=$this->view->linkGeo(__("Plan d'accès"), $bureau['coordonnees']['adresse'] . ',' . $bureau['coordonnees']['ville'] . ',' . Zend_Locale::getTranslation($bureau['coordonnees']['pays'], 'territory'), array('class' => 'but mobile'));\r
             $res.='</div>';\r
 \r
             $res.='<div class="numeros">';\r
@@ -25,13 +31,20 @@ class Cubedesigners_View_Helper_ContactInfos extends Zend_View_Helper_Abstract {
             $res.='<p itemprop="faxNumber">' . __('Fax') . ' ' . $bureau['coordonnees']['fax'] . '</p>';\r
             $res.='</div>';\r
 \r
+            $res.='</div>'; // .inner\r
+\r
+            // Map holder\r
+            $res.='<div id="map' . $id . '" data-id="' . $id . '" class="googleMap"></div>';\r
+\r
             /* $res.='<div class="geoloc">';\r
               $res.=$this->view->linkGeo(__("Plan d'accès"), $bureau['adresse']['adresse'] . ',' . $bureau['adresse']['ville'] . ',' . Zend_Locale::getTranslation($bureau['adresse']['pays'], 'territory'));\r
               $res.='</div>'; */\r
 \r
-            $res.='</div>';\r
+            $res.='</div>'; // .half-full\r
         }\r
 \r
+        //$res.= '</div></div>';\r
+\r
         return $res;\r
     }\r
 \r
index 1ff9686741529cc7879c9c8a6ef13d82350e54de..4388df7b1fb090409cf72e2c6358025a4ef39a39 100644 (file)
@@ -1,5 +1,12 @@
 <?php
 
+// Add RSS alternate links
+$rss = CubeIT_Util_Cms::unserialize(Bootstrap::getInstance()->getOpt('rss'));
+$feeds = array('news', 'projects', 'casestudies');
+foreach($feeds as $feed) {
+    $this->headLink()->appendAlternate($rss['rss_'.$feed.'_url'], 'application/rss+xml', $rss['rss_'.$feed.'_title']);
+}
+
 $content = $this->layout()->content . "\n";
 
 echo '<div id="wrapper">';
@@ -14,3 +21,4 @@ echo '</main>';
 
 echo $this->render('common/footer.phtml');
 echo '</div>';
+//echo '<div id="viewport"></div>';
index eb348f180bcff882ed65f33bab9adda182f0e183..3f2698a4119691dad5296535b9d207508da159f8 100644 (file)
@@ -19,7 +19,8 @@ if (!is_null($homepage)) {
                }
                /* NAVIGATION */
                $mainMenu = $this->navigation()->findOneById($this->localeDefault() . '/' . CubeIT_Navigation::MAIN);
-               echo '<a href="#menu" class="menu-link">&#9776;</a>';
+//             echo '<a href="#menu" class="menu-link">&#9776;</a>';
+               echo '<div class="nav-icon"><div></div></div>';
         echo '<nav id="menu" role="navigation">';
         echo $this->navigation()->menu()->renderMenu($mainMenu, array('maxDepth' => 0)) . "\n";
         echo '</nav>';
index 1eff9a4fb59975c8e51813ca3467e0db9ff40828..911d40d86e907b24665ba4a0a74597e4a09e68f0 100644 (file)
@@ -7,8 +7,8 @@ $this->headScript()->addScriptAndStyle('casestudies_detail');
 echo $this->CasestudiesDetail($this->studie);
 ?>
 
-<div class="title content margin"><?php echo $this->markupDotclear($this->casestudies_titre); ?></div>
+<div class="title content"><?php echo $this->markupDotclear($this->casestudies_titre); ?></div>
 
-<div id="casestudies-list" class="related">
+<div class="casestudies-list related content">
        <?php echo $this->CasestudiesList($this->datas, $this->studie); ?>
 </div>
\ No newline at end of file
index 35611e5b1b8a4e7148fcd00b9a32709370b2d16c..375f9bf324be5952d625d378d00d529d86d0b3bc 100644 (file)
@@ -11,7 +11,7 @@ $this->headScript()->addScriptAndStyle('casestudies');
                ?>
        </div>
 
-       <div id="casestudies-list">
+       <div id="casestudies-list" class="casestudies-list grid">
                <?php
                $datas = Bootstrap::getInstance()->getCMSDatasOfPage($this->id);
                echo $this->CasestudiesList($datas);
index 863d746d3126870c64e96336fef03405951c5dbe..8e55d97ca2505560da735081acdc3b02d4112776 100644 (file)
@@ -3,29 +3,19 @@ $this->headScript()->addGoogleMaps(array('key' => $this->options['googleapi']));
 $this->headScript()->addScriptAndStyle('contact');
 
 $bureaux = $this->option('contact')['bureaux'];
-$i = 1;
+$i = 0;
 foreach ($bureaux as $bureau) {
-       $this->headScriptVariables()->setVariable('map' . $i, $bureaux[$i - 1]['map']);
-       $this->headScriptVariables()->setVariable('coordonnees' . $i, $bureaux[$i - 1]['coordonnees']);
-       $this->headScriptVariables()->setVariable('markers' . $i, $bureaux[$i - 1]['markers']);
+       $this->headScriptVariables()->setVariable('map' . $i, $bureaux[$i]['map']);
+       $this->headScriptVariables()->setVariable('coordonnees' . $i, $bureaux[$i]['coordonnees']);
+       $this->headScriptVariables()->setVariable('markers' . $i, $bureaux[$i]['markers']);
        $i++;
 }
 ?>
 
-<div id="contact-title"><?php echo $this->markupDotclear($this->titre); ?></div>
+<div class="contact-title content"><?php echo $this->markupDotclear($this->titre); ?></div>
 
-<div id="contact-informations">
-       <?php echo $this->contactInfos($this->option('contact')['bloc'], $bureaux); ?>
-</div>
-
-<div id="contact-maps">
-       <?php
-       $j = 1;
-       foreach ($bureaux as $bureau) {
-               echo '<div id="map' . $j . '"></div>';
-               $j++;
-       }
-       ?>
+<div class="contact-informations">
+    <?php echo $this->contactInfos($this->option('contact')['bloc'], $bureaux); ?>
 </div>
 
 <?php
index 5ed48f14b834f08879e03f0447d1ae73701ca91c..7f19282db8f56051853978a280fc82c5bc23e3bd 100644 (file)
@@ -2,5 +2,5 @@
 
 $this->headScript()->addScriptAndStyle('expertises');
 echo $this->twocols();
-echo $this->htmlElement(nl2br($this->citation), 'blockquote', array('class' => 'citation'));
+echo $this->htmlElement($this->citation, 'blockquote', array('class' => 'citation content'));
 echo $this->liste($this->expertises, true, array('id' => 'expertises'), 1);
index 7ab2b2078f66ce02b5d0322b409826e93bd74a37..37fb3f03b121e2f826c655a189507e76ca160c60 100644 (file)
@@ -5,10 +5,11 @@ function load_commons() {
        resize();
 
     $(window).on('orientationchange', orientationchange);
+    $(screen).on('orientationchange', orientationchange);
     orientationchange();
 
     var $menu = $('#menu'),
-        $menulink = $('.menu-link');
+        $menulink = $('.nav-icon');
 
     $menulink.click(function() {
         $menulink.toggleClass('active');
@@ -17,6 +18,11 @@ function load_commons() {
         return false;
     });
 
+    // Fallback to display content in case web fonts haven't triggered the display yet
+    setTimeout(function() {
+        $('html').addClass('wf-active');
+    }, 4000);
+
 }
 
 function resize() {
@@ -34,10 +40,14 @@ function resize() {
 
 function orientationchange() {
 
+    //if( $("[name='viewport']").length==0){
+    //    $("head").append('<meta name="viewport" content="" />');
+    //}
+
     if(Modernizr.mq('screen and (max-device-width: 530px)')) {
-        //alert('mobile');
-        $("[name='viewport']").attr("content", "width=530, initial-scale=1.0");
+        $("[name='viewport']").attr("content", "width=530");
     } else {
         $("[name='viewport']").attr("content", "width=device-width, initial-scale=1.0");
     }
+
 }
\ No newline at end of file
index a3998c072f8b34476df17633a1f4e000102b8602..6983dc9ed902b84a454ec29050065af35ec51756 100644 (file)
@@ -39,70 +39,52 @@ var mapStyles =
 
 function initMaps() {
 
-       var mapSettings = Application.map1;
-       var centre = mapSettings.centre;
-       var coder = new google.maps.Geocoder();
-       coder.geocode({
-               address: centre.adresse + ' - ' + centre.ville,
-               region: centre.pays
-       }, function(res) {
-               var result = res[0];
-               var center = result.geometry.location;
-
-               var mapOptions = {
-                       zoom: parseInt(mapSettings.zoom),
-                       center: center,
-                       mapTypeControlOptions: {
-                               mapTypeIds: [google.maps.MapTypeId.ROADMAP]
-                       },
-                       styles: mapStyles,
-                       mapTypeId: google.maps.MapTypeId.ROADMAP
-               };
-
-               var map = new google.maps.Map(document.getElementById('map1'),
-                               mapOptions);
-
-               Application.markers1.unshift(Application.coordonnees1);
-
-               for (var i = 0; i < Application.markers1.length; i++) {
-                       m = Application.markers1[i];
-
-                       addMarker(m, map);
-               }
-       });
-
-
-       var mapSettings2 = Application.map2;
-       var centre2 = mapSettings2.centre;
-       var coder2 = new google.maps.Geocoder();
-       coder2.geocode({
-               address: centre2.adresse + ' - ' + centre2.ville,
-               region: centre2.pays
-       }, function(res) {
-               var result = res[0];
-               var center = result.geometry.location;
-
-               var mapOptions = {
-                       zoom: parseInt(mapSettings2.zoom),
-                       center: center,
-                       mapTypeControlOptions: {
-                               mapTypeIds: [google.maps.MapTypeId.ROADMAP]
-                       },
-                       styles: mapStyles,
-                       mapTypeId: google.maps.MapTypeId.ROADMAP
-               };
-
-               var map = new google.maps.Map(document.getElementById('map2'),
-                               mapOptions);
-
-               Application.markers2.unshift(Application.coordonnees2);
-
-               for (var i = 0; i < Application.markers2.length; i++) {
-                       m = Application.markers2[i];
-
-                       addMarker(m, map);
-               }
-       });
+    // Set up all maps identified by the class "googleMap"
+    $('.googleMap').each(function(){
+
+        var mapID = $(this).data('id'); // Get the ID of the map (matches the Application settings)
+        //fb(mapID);
+        var mapName = 'map' + mapID; // Map name, eg. map1
+        var markerName = 'marker' + mapID; // Marker name, eg. marker1
+        var coordonneesName = 'coordonnees' + mapID; // Coordonnees name, eg. coordonnees1
+
+        var mapSettings = Application[mapName];
+        var centre = mapSettings.centre;
+        var coder = new google.maps.Geocoder();
+        coder.geocode({
+            address: centre.adresse + ' - ' + centre.ville,
+            region: centre.pays
+        }, function(res) {
+            var result = res[0];
+            var center = result.geometry.location;
+
+            var mapOptions = {
+                scrollwheel: false,
+                zoom: parseInt(mapSettings.zoom),
+                center: center,
+                mapTypeControlOptions: {
+                    mapTypeIds: [google.maps.MapTypeId.ROADMAP]
+                },
+                styles: mapStyles,
+                mapTypeId: google.maps.MapTypeId.ROADMAP
+            };
+
+            var map = new google.maps.Map(document.getElementById(mapName), mapOptions);
+
+            // Removed the below loop - it isn't needed if only one marker is placed per office / map
+            //var markers = Application[markerName];
+            //if(markers === undefined) { markers = new Array; }
+            //markers.unshift(Application[coordonneesName]);
+            //
+            //for (var i = 0; i < markers.length; i++) {
+            //    m = markers[i];
+            //    addMarker(m, map);
+            //}
+
+            addMarker(Application[coordonneesName], map); // Only ever one marker per map so replacing the loop above
+
+        });
+    });
 }
 
 google.maps.event.addDomListener(window, 'load', initMaps);
index 6b9bb986e93155364053e9f282f3feeb039a397b..04b8aa91d744992de844fd5833457ce2898aa2bd 100644 (file)
@@ -29,8 +29,8 @@
                init: function (initFilter) {
                        var $this = this;
 
-                       // Run filter based on any previous settings
-                       $this.filter(initFilter);
+            // Clear filter first...
+            $this.filter('none'); // Dummy value so nothing is selected
 
                        // Set up Isotope
                        this.container.isotope({
                                //              }
                        });
 
+            // Show the container now Isotope is active
+            this.container.css('display', 'block');
+
+            // Now run filter based on any previous settings
+            $this.filter(initFilter);
+
             // Reveal all items after init for onload animation
             // https://github.com/metafizzy/isotope/issues/733#issuecomment-52868221
             //var iso = this.container.data('isotope');
index 0a4138f97cabc9e73d2cd360dc10bb8cdd917ca7..bffc8abf04607dac628f12a861ea54b17b079b7d 100644 (file)
         min-width: 480px;
         padding-right: 25px;
         margin: 25px 0;
+
+        @media screen and (max-width: 1048px) {
+          width: 100%;
+        }
     }
 
 //    .bloc-holder .sousbloc .texte {
index 47e11c1f89447fc0a6f0201d853050df3879423b..85b76eb399b9c4990dc807906b8e91243ec67ba3 100644 (file)
@@ -1,14 +1,24 @@
-.title.margin{
-       margin-bottom: 40px;
-}
+//.title.margin{
+//     margin-bottom: 40px;
+//}
+
 
-#casestudies-list {
+.casestudies-list {
     //min-width: 980px;
-    max-width: 980px;
-    margin: 0 auto;
-    padding: 0 0 50px 0;
+    //max-width: 980px;
+    //margin: 0 auto;
+    padding-bottom: 50px;
     overflow: hidden;
 
+    // Settings specific to the isotope grid
+    &.grid {
+      display: none; // Hidden until Isotope is ready
+
+      img {
+        margin-top: 0;
+      }
+    }
+
     a {
         display:inline-block;
                margin:0;
                        //height:auto;
                        display: block;
                        background-color: #ccc;
-                       margin:0 0 10px 0;
+                       margin-top: 13.333333%; // 40/300 - 40px margin at full size
+            margin-bottom: 10px;
+            max-width: 100%;
+            height: auto;
                }
                h2,h3{
                        white-space: nowrap;
 
        // Styling for related case studies at the bottom of the case study detail page
        &.related a {
-               margin-right: 40px;
+               margin-right: 3.5%; // 2 gutters
+        width: 31%; // 3 cols
 
                &:last-of-type{
                        margin-right: 0;
                }
+
+        h2 {
+            @media screen and (max-width: 1048px){
+              font-size: 28px;
+            }
+
+            @media screen and (max-width: 890px){
+              font-size: 24px;
+            }
+
+            @media screen and (max-width: 780px){
+              font-size: 20px;
+            }
+        }
        }
 
     .blocmargin {
         margin-right:40px;
     }
-    .spacer {
-        clear: left;
-        height:20px;
-    }
+//    .spacer {
+//        clear: left;
+//        height:20px;
+//    }
 
 }
-#casestudies-detail-content {
+.casestudies-detail-content {
     background-color: #3885E0;
 }
\ No newline at end of file
index 450032064cb3eb8e2509539ef936421bc065c853..acbc849cbbcc500eb447840f5e591455fedabbef 100644 (file)
@@ -8,8 +8,9 @@
        }
 
        /* Case studies detail visuel */
-       #casestudies-detail-visuel {
+       .casestudies-detail-visuel {
                padding-bottom:50px;
+        overflow: hidden;
 
                a {
                        background-color: #3885e0;
                }
 
                .visuel-holder {
-                       min-width: 980px;
-                       max-width: 980px;
-                       width:100%;
-                       margin: 0 auto;
-                       overflow:hidden;
+//                     min-width: 980px;
+//                     max-width: 980px;
+//                     width:100%;
+//                     margin: 0 auto;
+//                     overflow:hidden;
                }
 
                .visuel-holder .visuel {
-                       width:980px;
-                       height:400px;
+//                     width:980px;
+//                     height:400px;
                        padding-bottom: 20px;
                }
 
 
 
 
-       #casestudies-detail-content {
+       .casestudies-detail-content {
                text-align: center;
                background-color: #0194d5;
                padding: 50px 0 0px 0;
 
-
                .detail-text {
                        color: #fff;
-                       width:640px;
+                       max-width:708px; // 640 + 34*2
                        margin:auto;
                        position: relative;
                        z-index: 10;
                }
 
                .detail-visuel {
-                       padding: 0px 0 50px 0;
-                       z-index: 1;
+//                     padding: 0px 0 50px 0;
+//                     z-index: 1;
+            padding-left: 34px;
+            padding-right: 34px;
+            max-width: 1268px; // Max image width + horizontal padding (this must be set so % margins scale properly on images
+            margin: 0 auto;
+          
+            img {
+              min-width: 462px; // 530 - 34*2
+              display: block; // Stops strange gap under image when right at the bottom
+            }
                }
 
                .detail-video-background {
index 5111ced80709c33e1e8f5a106862ed1b66f8641b..bddc56cc79835cd294d5f4ceaad4ec3df704bf88 100644 (file)
@@ -9,12 +9,19 @@ html {
   box-sizing: inherit;
 }
 
+img.responsive {
+  max-width: 100%;
+  height: auto;
+}
 
 .content,.cubeit-content{
-       max-width: 1048px; // = 980+(34*2) - Allow room for the 34px padding on each side
-       margin:0 auto;
-    padding: 0 34px;
-       position:relative;
+  max-width: 1048px; // = 980+(34*2) - Allow room for the 34px padding on each side
+  min-width: 530px; // Be careful of this setting and affecting the viewport initial-scale
+  margin:0 auto;
+  padding-right: 34px;
+  padding-left: 34px;
+  position:relative;
+
 
 //    @media screen and (max-width: 980 + (34*2)px) {
 //      padding: 0;
@@ -67,6 +74,7 @@ a:active {
 a.but {
        display: inline-block;
        color:#fff;
+    background-color: #2874ce;
        clear:both;
        border-radius: 2px;
        padding: 10px 15px 12px;
@@ -88,7 +96,7 @@ a.but {
 
        .main-holder {
                width:100%;
-               padding: 0px 20px 50px 20px;
+               padding: 0 20px 50px 20px;
        }
        ul{
                list-style:none;
@@ -102,7 +110,7 @@ a.but {
 
 .title {
        margin: 0 auto;
-       padding: 40px 0 0 0;
+       padding-top: 40px;
        h1 {
                text-align: left;
                font-size: 56px;
@@ -122,7 +130,7 @@ a.but {
 
 .dotclear{
        h3,h4{
-               font-weight: 500;
+               font-weight: 400;
        }
        p{
                line-height: 1.56em;
index e8b66a59518c361e21b07788eb3c8e44b1dc3f8c..c1765478909122262826504e5efc7d00cdc78c09 100644 (file)
 /* Contact Title */
-#contact-title {
-    min-width: 980px;
-    max-width: 980px;
-    margin: 0 auto;
-    padding: 50px 0 50px 0;
+.contact-title {
+//    min-width: 980px;
+//    max-width: 980px;
+//    margin: 0 auto;
+  padding-top: 50px;
+  padding-bottom: 50px;
+
+  h1 {
+      text-align: left;
+      font-weight: 300;
+      font-size: 56px;
+    }
 }
 
-#contact-title h1 {
-    text-align: left;
-    font-weight: 300;
-    font-size: 56px;
+.half-full {
+
+  float: left;
+  width: 50%;
+  padding-right: 20px; // half of middle margin
+
+  &:last-child {
+    padding-right: 0;
+    padding-left: 20px; // half of middle margin
+
+    .inner {
+      padding-left: 0;
+      padding-right: 34px;
+      float: none;
+      margin-right: 0;
+    }
+  }
+
+  .inner {
+    max-width: 504px; // (1048 / 2) - 20px to account for middle padding on each column
+    padding-left: 34px;
+    float: right;
+    width: 100%;
+  }
+
+  @media screen and (max-width: 790px){
+
+    float: none;
+    width: 100%;
+    padding-right: 0;
+
+    &:last-child {
+      padding-left: 0;
+      padding-top: 50px;
+
+      .inner {
+        padding-left: 34px;
+      }
+    }
+
+    .inner {
+      max-width: 1048px;
+      min-width: 530px;
+      float: none;
+    }
+
+  }
+
+
 }
 
+
+
 /* Contact informations */
-#contact-informations .contact-texte {
+.contact-informations {
+
+  padding-bottom: 50px;
+  overflow: hidden;
+
+  .contact-texte {
     background-image: url('../images/picto_footer_mail.svg');
-    background-repeat:  no-repeat;
-    background-position:0px 10px;
+    background-repeat: no-repeat;
+    background-position: 0px 10px;
     font-weight: 300;
-    padding-left:60px;
+    padding-left: 60px;
     padding-bottom: 50px;
-}
+  }
 
-#contact-informations .col .titre {
+  .titre {
     padding-bottom: 20px;
     font-size: 32px;
-}
+  }
 
-#contact-informations .col .adresse {
+  .adresse {
     background-image: url('../images/picto_geoloc.svg');
-    background-repeat:  no-repeat;
-    background-position:0px 0px;
-    padding-left:60px;
+    background-repeat: no-repeat;
+    background-position: 0px 0px;
+    padding-left: 60px;
     padding-bottom: 50px;
-}
+  }
 
-#contact-informations .col .numeros {
+  .numeros {
     background-image: url('../images/picto_tel.svg');
-    background-repeat:  no-repeat;
-    background-position:0px 0px;
-    padding-left:60px;
+    background-repeat: no-repeat;
+    background-position: 0px 0px;
+    padding-left: 60px;
     padding-bottom: 50px;
+  }
 }
 
-/* Contact maps */
-#contact-maps {
-    overflow:hidden;
-    padding: 0 0 50px 0;
-}
+/* Google Maps */
 
-#map1 {
-    width: 47.5%;
-    float:left;
-    height: 390px;
-}
-#map2 {
-    width: 50.5%;
-    float:right;
-    height: 390px;
-}
+.googleMap {
+  height: 390px;
+  clear: both;
 
-/* Contact description */
-#contact-informations,
-#contact-description {
-    min-width: 980px;
-    max-width: 980px;
-    margin: 0 auto;
-    overflow: hidden;
-    padding: 0 0 50px 0;
+  // To make the map semi-responsive:
+  //padding-bottom: 37.3%; // Sets height relative to width
+  //min-height: 300px; // Stops it getting too short
 }
 
-.col {
-    float:left;
-    margin-right: 20px;
-    width: 47%;
+// By default, hide the mobile map link button
+.but.mobile {
+  display: none;
 }
 
-.col .dotclear {
-    width:95%;
+@media screen and (max-height: 530px), screen and (max-width: 530px) {
+
+  .half-full:last-child {
+    padding-top: 0;
+
+    .numeros {
+      padding-bottom: 5px;
+    }
+  }
+
+  .but.mobile {
+    display: inline-block;
+  }
+
+  // Hide the maps for mobile
+  .googleMap {
+    display: none;
+  }
+
 }
\ No newline at end of file
index b61c6340381bd65a604466665f78c14ed26dadbc..252ff4c227736a67b3b08046d17557218b0e16dd 100644 (file)
 }
 
 ////////////////////////
-// @TODO tidy this up...
+// @TODO tidy this up... and remove old .menu-link classes
 
-a.menu-link {
-  display: none;
 
-  &:hover {
-    color: #84ae1e;
-  }
+.nav-icon {
+  display: none;
 }
+
+
+///////
+
+//a.menu-link {
+//  display: none;
+//
+//  &:hover {
+//    color: #84ae1e;
+//  }
+//}
+
 .js nav[role=navigation] {
   max-height: none;
 }
 
 @media screen and (max-width: 890px) {
 
+  // Nav-icon from: http://w3bits.com/animated-menu-icon-css/
+  .nav-icon {
+    //margin: 1em;
+    width: 34px;
+    position: absolute;
+    top: 3px;
+    right: 0;
+    padding: 2em 34px; // 34px is to push it away from the right margin and keep aligned with right edge
+    box-sizing: content-box;
+    display: inline-block;
+
+    &:hover {
+      cursor: pointer;
+    }
+  }
+
+  .nav-icon:after,
+  .nav-icon:before,
+  .nav-icon div {
+    background-color: #3885e0;
+    border-radius: 3px;
+    content: '';
+    display: block;
+    height: 4px;
+    margin: 6px 0;
+    transition: all .3s ease-in-out;
+  }
+
+  .nav-icon.active:after,
+  .nav-icon.active:before,
+  .nav-icon.active div {
+    background-color: #fff;
+  }
+  .nav-icon.active {
+    opacity: 0.7;
+  }
+
+
+  // Nav icon animation
+  .nav-icon.active:before {
+    transform: translateY(10px) rotate(135deg);
+  }
+
+  .nav-icon.active:after {
+    transform: translateY(-10px) rotate(-135deg);
+  }
+
+  .nav-icon.active div {
+    transform: scale(0);
+    transition: all .15s ease-in-out;
+  }
+
+
+
+////////
+
   #header.content {
     padding: 0;
   }
@@ -94,18 +159,18 @@ a.menu-link {
     //margin: 0 -20px; // To offset the 20px margin from .content
   }
 
-  a.menu-link {
-    position: absolute;
-    top: 0;
-    right: 5%;
-    padding: 0.5em;
-//    background: #3885e0;
-//    border-radius: 2px;
-    font: bold 36px sans-serif;
-    color: #3885e0;
-    text-transform: uppercase;
-    display: inline-block;
-  }
+//  a.menu-link {
+//    position: absolute;
+//    top: 0;
+//    right: 0;
+//    padding: 0.5em 34px 0.5em 0.5em; // 34px is to push it away from the right margin and keep aligned with right edge
+////    background: #3885e0;
+////    border-radius: 2px;
+//    font: bold 36px sans-serif;
+//    color: #3885e0;
+//    text-transform: uppercase;
+//    display: inline-block;
+//  }
   nav[role=navigation] {
     clear: both;
     transition: all 0.3s ease-out;
index 44d5ec918bcb64cf36e91c7fa69472bcc238bb8f..f44e714df64625ad7fe42f4dc87f661fef980deb 100644 (file)
@@ -4,6 +4,8 @@
     margin: 0 auto;
     padding: 0 0 50px 0;
 
+    display: none; // Hidden initially until Isotope activates
+
     a,a:hover {
         color:#000;
                display:inline-block;