]> _ Git - physioassist.git/commitdiff
done #738 @1.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 21 Sep 2016 09:26:04 +0000 (09:26 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 21 Sep 2016 09:26:04 +0000 (09:26 +0000)
framework/application/views/helpers/SimeoxDocuments.php
framework/application/views/helpers/SimeoxVideos.php
js/common.js
less/common.less
less/simeox.less

index 7f7d88440e180df9e965a7fa729efbf05c0342a7..050b9dc85f9be608839913945da7b0dba7edc795 100644 (file)
@@ -4,9 +4,18 @@ class Simeox_View_Helper_SimeoxDocuments extends CubeIT_View_Helper_Abstract {
        /**\r
         * @return string\r
         */\r
-       public function simeoxDocuments() {\r
-        $res='';\r
-        \r
-        return $res;\r
+       public function simeoxDocuments($documents) {\r
+               $res = array();\r
+               foreach ($documents as $doc) {\r
+                       $res[] = $this->_document($doc);\r
+               }\r
+               return $this->listUnordered($res, array('class' => 'documents'));\r
+       }\r
+\r
+       protected function _document($doc) {\r
+               $res = $this->imageProcess($doc['thumbnail'], '', 101, 100000, array(), 'R', 'C', 'M');\r
+               $res .= $this->htmlElement($doc['title'], 'h4');\r
+\r
+               return $this->linkTruePopupFullscreen($res, $doc['url']);\r
        }\r
 }
\ No newline at end of file
index 54a5f305efce874889896431456d66b3c0b5a8e2..c3190eeec04c475b914785ab8c96dd113316640e 100644 (file)
@@ -5,11 +5,10 @@ class Simeox_View_Helper_SimeoxVideos extends CubeIT_View_Helper_Abstract {
         * @return string\r
         */\r
        public function simeoxVideos($videos) {\r
+               $this->headScript()->addFeatherlight();\r
                $res = array();\r
                foreach ($videos as $video) {\r
-                       for ($i = 0; $i < 6; $i++) {\r
-                               $res[] = $this->_video($video);\r
-                       }\r
+                       $res[] = $this->_video($video);\r
                }\r
                return $this->listUnordered($res, array('class' => 'videos'));\r
        }\r
@@ -18,6 +17,6 @@ class Simeox_View_Helper_SimeoxVideos extends CubeIT_View_Helper_Abstract {
                $res = $this->imageProcess($v['thumbnail'], '', 165, 96, array(), 'C', 'C', 'M');\r
                $res .= $this->htmlElement($v['title'], 'h4');\r
 \r
-               return $this->link($res, CubeIT_Util_WebVideo::getIframeUrl($v['url']), array('data-video' => $v['url']));\r
+               return $this->link($res, CubeIT_Util_WebVideo::getIframeUrl($v['url'], null, array('autoplay' => 1, 'modestbranding' => 1, 'rel' => 0, 'cc_load_policy' => 0,'')));\r
        }\r
 }
\ No newline at end of file
index 64e12bda0a9382040be3f9a2cf86c75c37d218f7..21588b8f7229f7f6eb6dc8232275124eb66ed4a6 100644 (file)
@@ -9,25 +9,34 @@ function load_common_once() {
 
     //$('a').click(function() {
     //    if(!localScrollInitialised) { // Only initalise localscroll after first click
-            $('header.site').localScroll({
-                axis: 'y',
-                duration: 1000,
-                //hash: true,
-                offset: -65 // For fixed header height
-            });
+    $('header.site').localScroll({
+        axis: 'y',
+        duration: 1000,
+        //hash: true,
+        offset: -65 // For fixed header height
+    });
     //
     //        localScrollInitialised = true;
     //    }
     //});
 
     // Shrinking fixed header
-    $(window).scroll(function() {
+    $(window).scroll(function () {
         shrinkHeader();
     });
 
     shrinkHeader(); // Trigger even when no scroll (eg. page refresh)
 
     $('.partners .logos').imagefit(); // Make sure logos fit onto one line
+
+
+    $(document).on('click', '.videos a', function () {
+        var iw = $(window).width() * 0.8;
+        var ih = Math.round(iw / 16 * 9);
+        iw = Math.round(iw);
+        $.featherlight($('<iframe src="' + $(this).attr('href') + '" width="' + iw + '" height="' + ih + '" ></iframe>'));
+        return false;
+    });
 }
 
 function shrinkHeader() {
@@ -40,7 +49,7 @@ function shrinkHeader() {
 
 
 function cookieBanner() {
-    if($('#cookieBanner').length) {
+    if ($('#cookieBanner').length) {
 
         var cookieBannerHeight = $('#cookieBanner').outerHeight();
 
@@ -79,11 +88,11 @@ function cookieBanner() {
  * Original code inspired by: http://www.ollicle.com/eg/jquery/imagefit/
  *
  */
-(function($) {
-    $.fn.imagefit = function(options) {
+(function ($) {
+    $.fn.imagefit = function (options) {
         var fit = {
-            scale: function(scaleFactor, imgs) {
-                imgs.each(function(){
+            scale: function (scaleFactor, imgs) {
+                imgs.each(function () {
                     var newWidth = Math.round(scaleFactor * $(this).width());
                     var newHeight = Math.round(scaleFactor * $(this).height());
                     $(this).width(newWidth);
@@ -92,7 +101,7 @@ function cookieBanner() {
             }
         };
 
-        this.each(function(){
+        this.each(function () {
             var container = this;
 
             // Get list of contained images
@@ -104,7 +113,7 @@ function cookieBanner() {
             var totalWidth = 0;
 
             // Calculate total width of all contained images
-            imgs.each(function(){
+            imgs.each(function () {
                 totalWidth += $(this).width();
             });
 
@@ -112,7 +121,7 @@ function cookieBanner() {
             var gutterTotal = numGutters * minGutter;
 
             // Make gutters small enough to fit but bigger than natural gap between inline-blocks (normally 4px)
-            if(gutterTotal > availableWidth) {
+            if (gutterTotal > availableWidth) {
                 gutterTotal = numGutters * 5;
             }
             //fb('Gutter total = ' + gutterTotal);
@@ -120,7 +129,7 @@ function cookieBanner() {
             availableWidth -= gutterTotal; // Take fixed gutters away from available space
             //fb('Total img width = ' + totalWidth);
 
-            if(totalWidth > availableWidth) {
+            if (totalWidth > availableWidth) {
                 var scale = availableWidth / totalWidth;
                 //fb('Scale factor: ' + Math.round(scale * 100) + '%');
 
index 4ee1b319206a7a7984f78f0e8a803d43a5a3e9ce..e2764175068658ecf18469b1d129c33ccba87cd6 100644 (file)
@@ -11,12 +11,20 @@ html {
 }
 
 body {
+       opacity: 0;
+       transition: opacity 250ms;
        font-family: 'Open Sans', sans-serif;
        font-weight: 300;
        font-size: 16px;
        min-width: 960px; // stops centred background images from moving beyond where they should
 }
 
+.wf-active {
+       body {
+               opacity: 1;
+       }
+}
+
 a {
        text-decoration: none;
        color: #1d81c2;
@@ -178,7 +186,7 @@ footer {
        font-size: 12px !important;
 }
 
-.cubeit-content{
+.cubeit-content {
        max-width: 960px;
 }
 
index c69ee579210699b81c25e6bc1c42e2bf54712c20..040461d40cf347aedbafe86421b27f296bc8d0e7 100644 (file)
 }
 
 .content {
+
+       ul {
+               &.videos, &.documents {
+                       list-style: none;
+                       li {
+                               padding-left: 0;
+                               line-height: 1;
+                               background-image: none;
+                               display: inline-block;
+                               position: relative;
+                               margin-right: 19px;
+
+                               h4 {
+                                       color: #3c3c3b;
+                                       font-size: 16px;
+                                       font-weight: 300;
+                                       line-height: 24px;
+                                       margin-top: 15px;
+                                       height: 48px;
+                                       overflow: hidden;
+                               }
+                       }
+               }
+       }
+
+       ul.documents{
+               width: 960px;
+               li{
+                       width: 101px;
+               }
+       }
+
        ul.videos {
-               list-style: none;
                width: 552px;
                li {
-                       padding-left: 0;
                        margin-bottom: 26px;
-                       line-height: 1;
-                       background-image: none;
-                       display: inline-block;
                        width: 165px;
-                       margin-right: 19px;
-                       position: relative;
+
 
                        &:before {
                                content: "a";
                                pointer-events: none;
                        }
 
-                       &:hover{
-                               &:before{
+                       &:hover {
+                               &:before {
                                        color: #525251;
                                }
                        }
                                cursor: pointer;
                                pointer-events: none;
                        }
-
-                       h4 {
-                               color: #3c3c3b;
-                               font-size: 16px;
-                               font-weight: 300;
-                               line-height: 24px;
-                               margin-top: 15px;
-                       }
                }
        }
 }
\ No newline at end of file