[base]
dev = false
+firephp = false ;Disabled because it can cause "502 bad gateway" errors
minify.js = true
minify.css = false
seo.robots = false
+[dev : base]
+
+dev = true
+webhost = dev.ccgm.fr
+
+;httpauth.username = ccgm
+;httpauth.password = 20ccgm20
+
+database.params.host = ccgmzwgfdev.mysql.db
+database.params.username = ccgmzwgfdev
+database.params.dbname = ccgmzwgfdev
+database.params.password = nqSYJEaJ84r7xGoPnTjc
+
[dev-local : base]
dev = true
class AdminajaxController extends CubeIT_Controller_Admin_AdminajaxController {
-}
+ public function saveselectlist($class, $element, $dataFilters, $reloadOnSave = false) {
+
+ $this->clearCacheTag('navigation');
+ $this->clearCacheTag('contents');
-?>
+ return parent::saveselectlist($class, $element, $dataFilters, $reloadOnSave);
+ }
+
+}
return explode(PHP_EOL, $this->content)[0];
}
+ // Get the best image for the post
+ public function getPosterImage($width, $height, $class) {
+
+ $this->view = Zend_Controller_Action_HelperBroker::getExistingHelper('ViewRenderer')->view;
+
+ $img = $this->view->imageProcess($this->getImage(), '', $width, $height, ['class' => $class]);
+
+ // No images found in 'image' field, so look for a video frame
+ if (!$img) {
+ $videos = $this->getVideoDetails();
+
+ if (count($videos) > 0) {
+ return '<div class="'. $class .'" style="background-image: url('. $videos[0]['image'] .'); background-position: center; background-size: cover; width: '. $width .'px; height: '. $height .'px"></div>';
+ } else {
+ return false;
+ }
+ }
+
+ return $img;
+ }
+
// Process YouTube URLs entered and get poster images
public function getVideoDetails() {
$video_list = trim($this->videos);
$videos[] = [
'url' => $video_URL,
'image' => $video_image,
- 'embed' => "https://www.youtube.com/embed/$video_ID",
+ 'embed' => "https://www.youtube.com/embed/$video_ID?enablejsapi=1&iv_load_policy=3&rel=0&showinfo=0",
];
}
protected function _actu($a) {\r
\r
$URL = CubeIT_Navigation_Page::generateAutoUri($a, Bootstrap::getNewsArticleURLTemplate());\r
- $img = $this->imageProcess($a->getImage(), '', 410, 266, ['class' => 'home-news-image']);\r
+ $img = $a->getPosterImage(410, 266, 'home-news-image');\r
\r
if (!$img) {\r
$img = '<div class="home-news-image home-news-image-empty"></div>';\r
$res .= '<div class="home-news-article-content">';\r
$res .= $this->link($this->htmlElement($a->getTitle(), 'h2'), $URL, ['class' => 'home-news-heading-link']);\r
$res .= $this->markupDotclear($a->getExcerpt());\r
- $res .= $this->link("Voir toute l'actualité >", 'internal:news', ['class' => 'home-news-read-more']);\r
+ $res .= $this->link("Voir l'actualité >", 'internal:news', ['class' => 'home-news-read-more']);\r
$res .= '</div>'; // .home-news-article-content\r
$res = $this->htmlElement($res, 'article', ['class' => 'home-news-article']);\r
return $this->htmlElement($res, 'div', ['class' => 'home-news-item']);\r
\r
$URL = CubeIT_Navigation_Page::generateAutoUri($n, Bootstrap::getNewsArticleURLTemplate());\r
\r
-\r
- $img = $this->imageProcess($n->getImage(), '', 247, 247, ['class' => 'news-image']);\r
+ $img = $n->getPosterImage(247, 247, 'news-image');\r
\r
if (!$img) {\r
$img = '<div class="news-image news-image-empty"></div>';\r
</div>\r
\r
<ul class="social">\r
+ <?php if (!isset($f['social']) || !is_array($f['social'])) $f['social'] = []; ?>\r
<?php foreach ($f['social'] as $social): ?>\r
<li>\r
<a href="<?= $social['url'] ?>" title="<?= $social['name'] ?>" target="_blank" rel="noopener">\r
<?php endforeach; ?>
<?php foreach ($news->getVideoDetails() as $video): ?>
- <a href="<?= $video['embed'] ?>" target="_blank">
+ <a class="news-slider-video" href="<?= $video['embed'] ?>" target="_blank">
<img class="news-slider-image" src="<?= $video['image'] ?>">
</a>
<?php endforeach; ?>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="112.2px" height="112.2px" viewBox="0 0 112.2 112.2" style="enable-background:new 0 0 112.2 112.2;" xml:space="preserve"
+ >
+<style type="text/css">
+ .st0{fill:#5e5e5e;}
+ .st1{fill:#FFFFFF;}
+</style>
+<g>
+ <path class="st0" d="M56.1,0c30.98,0,56.1,25.12,56.1,56.1s-25.12,56.1-56.1,56.1C25.12,112.2,0,87.08,0,56.1S25.12,0,56.1,0"/>
+ <path class="st1" d="M70.2,58.29H60.19v36.67H45.03V58.29h-7.21V45.41h7.21v-8.34c0-5.96,2.83-15.3,15.3-15.3l11.23,0.05v12.51
+ h-8.15c-1.34,0-3.22,0.67-3.22,3.51v7.58h11.33L70.2,58.29z"/>
+</g>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="21.43px" height="40.02px" viewBox="0 0 21.43 40.02" style="enable-background:new 0 0 21.43 40.02;" xml:space="preserve"
+ >
+<style type="text/css">
+ .st0{clip-path:url(#SVGID_2_);fill:none;stroke:#8E8E8D;stroke-width:2;stroke-miterlimit:10;}
+</style>
+<g>
+ <defs>
+ <rect id="SVGID_1_" y="0" width="21.43" height="40.02"/>
+ </defs>
+ <clipPath id="SVGID_2_">
+ <use xlink:href="#SVGID_1_" style="overflow:visible;"/>
+ </clipPath>
+ <polyline class="st0" points="0.71,0.71 20.01,20.01 0.71,39.32 "/>
+</g>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="21.43px" height="40.02px" viewBox="0 0 21.43 40.02" style="enable-background:new 0 0 21.43 40.02;" xml:space="preserve"
+ >
+<style type="text/css">
+ .st0{clip-path:url(#SVGID_2_);fill:none;stroke:#8E8E8D;stroke-width:2;stroke-miterlimit:10;}
+</style>
+<g>
+ <defs>
+ <rect id="SVGID_1_" y="0" width="21.43" height="40.02"/>
+ </defs>
+ <clipPath id="SVGID_2_">
+ <use xlink:href="#SVGID_1_" style="overflow:visible;"/>
+ </clipPath>
+ <polyline class="st0" points="20.72,39.32 1.41,20.01 20.72,0.71 "/>
+</g>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 78.7 90.6" style="enable-background:new 0 0 78.7 90.6;" xml:space="preserve">
+<style type="text/css">
+ .st0{fill:#FFFFFF;}
+</style>
+ <path class="st0" d="M5.9,0.5l70.9,41.4c2.6,1.5,2.6,5.3,0,6.8L5.9,90.1C3.3,91.6,0,89.7,0,86.7L0,3.9C0,0.9,3.3-1,5.9,0.5z"/>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="53.39px" height="53.39px" viewBox="0 0 53.39 53.39" style="enable-background:new 0 0 53.39 53.39;" xml:space="preserve"
+ >
+<style type="text/css">
+ .st0{clip-path:url(#SVGID_2_);fill:#0EA0D1;}
+ .st1{clip-path:url(#SVGID_2_);fill:none;stroke:#FFFFFF;stroke-width:2;stroke-miterlimit:10;}
+</style>
+<g>
+ <defs>
+ <rect id="SVGID_1_" y="0" width="53.39" height="53.39"/>
+ </defs>
+ <clipPath id="SVGID_2_">
+ <use xlink:href="#SVGID_1_" style="overflow:visible;"/>
+ </clipPath>
+ <path class="st0" d="M0,26.7C0,11.95,11.95,0,26.7,0s26.7,11.95,26.7,26.7s-11.95,26.7-26.7,26.7S0,41.44,0,26.7"/>
+ <polyline class="st1" points="23.15,15.52 34.32,26.7 23.15,37.87 "/>
+</g>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="53.39px" height="53.39px" viewBox="0 0 53.39 53.39" style="enable-background:new 0 0 53.39 53.39;" xml:space="preserve"
+ >
+<style type="text/css">
+ .st0{clip-path:url(#SVGID_2_);fill:#0EA0D1;}
+ .st1{clip-path:url(#SVGID_2_);fill:none;stroke:#FFFFFF;stroke-width:2;stroke-miterlimit:10;}
+</style>
+<g>
+ <defs>
+ <rect id="SVGID_1_" y="0" width="53.39" height="53.39"/>
+ </defs>
+ <clipPath id="SVGID_2_">
+ <use xlink:href="#SVGID_1_" style="overflow:visible;"/>
+ </clipPath>
+ <path class="st0" d="M53.39,26.7c0,14.74-11.95,26.7-26.7,26.7S0,41.44,0,26.7S11.95,0,26.7,0S53.39,11.95,53.39,26.7"/>
+ <polyline class="st1" points="30.25,37.87 19.07,26.7 30.25,15.52 "/>
+</g>
+</svg>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="112.19px" height="112.2px" viewBox="0 0 112.19 112.2" style="enable-background:new 0 0 112.19 112.2;"
+ xml:space="preserve">
+<style type="text/css">
+ .st0{fill:#FFFFFF;}
+ .st1{fill:#5e5e5e;}
+</style>
+<g>
+ <rect x="20.1" y="22" class="st0" width="72" height="65"/>
+ <path class="st1" d="M56.1,0C25.12,0,0,25.12,0,56.1s25.12,56.1,56.1,56.1c30.98,0,56.1-25.12,56.1-56.1S87.07,0,56.1,0
+ M81.71,43.74c0.02,0.55,0.04,1.11,0.04,1.66c0,17.01-12.95,36.63-36.63,36.63c-7.27,0-14.04-2.13-19.74-5.78
+ c1.01,0.12,2.03,0.18,3.07,0.18c6.03,0,11.59-2.06,15.99-5.51c-5.64-0.11-10.39-3.83-12.03-8.94c0.79,0.15,1.59,0.23,2.42,0.23
+ c1.18,0,2.31-0.16,3.4-0.45c-5.89-1.18-10.33-6.39-10.33-12.62c0-0.06,0-0.11,0-0.16c1.74,0.96,3.72,1.54,5.83,1.61
+ C30.27,48.27,28,44.33,28,39.86c0-2.36,0.64-4.57,1.74-6.47c6.35,7.79,15.84,12.92,26.54,13.45c-0.22-0.94-0.34-1.93-0.34-2.94
+ c0-7.11,5.77-12.87,12.88-12.87c3.7,0,7.05,1.56,9.4,4.07c2.93-0.58,5.69-1.65,8.18-3.12c-0.96,3-3,5.53-5.66,7.12
+ c2.61-0.31,5.09-1,7.39-2.03C86.41,39.65,84.23,41.92,81.71,43.74"/>
+</g>
+<polygon class="st0" points="462.1,-136 464.1,-136 464.1,-136 462.1,-136 "/>
+</svg>
if ($_SERVER['HTTP_HOST'] == 'www.ccgm.fr') {
define('APPLICATION_ENV', 'production');
} else if ($_SERVER['HTTP_HOST'] == 'medecins.ccgm.fr') {
- define('APPLICATION_ENV', 'medecins');
-} else if ($_SERVER['HTTP_HOST'] == 'ccgm.test') {
+ define('APPLICATION_ENV', 'medecins');
+} else if ($_SERVER['HTTP_HOST'] == 'dev.ccgm.fr') {
+ define('APPLICATION_ENV', 'dev');
+} else if (strtolower($_SERVER['HTTP_HOST']) == 'ccgm.test') {
define('APPLICATION_ENV', 'dev-local');
}
});
// Slider for lightbox
- $slider.slickLightbox();
+ // Based on https://codepen.io/dileepmadusanka/pen/oLdkyq
+ // Extra code adapted from https://codepen.io/digistate/pen/MvapbE
+ $slider.slickLightbox({
+ // Since base slider is in infinite mode, we have to avoid collecting the cloned slides
+ itemSelector: '.slick-slide:not(.slick-cloned) a',
+ });
+
+ var lightbox = '.slick-lightbox';
+
+ $(document).on('init', lightbox, function(event, slick) {
+ slick = $(slick.$slider);
+ setTimeout(function(){ toggleVideo(slick, 'play'); }, 500);
+ setTimeout(function(){ toggleVideo(slick, 'play'); }, 1500);
+ });
+ $(document).on('beforeChange', lightbox, function(event, slick) {
+ slick = $(slick.$slider);
+ toggleVideo(slick, 'pause');
+ });
+ $(document).on('afterChange', lightbox, function(event, slick) {
+ slick = $(slick.$slider);
+ toggleVideo(slick, 'play');
+ });
+
+ function toggleVideo(slick, action) {
+ var currentSlide, player;
+
+ currentSlide = slick.find('.slick-current');
+ player = currentSlide.find('iframe').get(0);
+
+ switch (action) {
+ case 'play':
+ postMessageToPlayer(player, {
+ "event": "command",
+ "func": "playVideo"
+ });
+ break;
+ case 'pause':
+ postMessageToPlayer(player, {
+ "event": "command",
+ "func": "pauseVideo"
+ });
+ break;
+ }
+
+ }
+
+ // Send commands to YouTube iframe player
+ function postMessageToPlayer(player, command){
+ if (player == null || command == null) return;
+ player.contentWindow.postMessage(JSON.stringify(command), "*");
+ }
+
}
})(this);
a = this.element.find(this.options.itemSelector);
- console.log("AAAA", a);
-
if (index === 0 || index === -1) {
links = $.map(a, createItem);
} else {
max-width: 100%;
}
+ &-video {
+ position: relative;
+
+ &:before {
+ content: '';
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ background: rgba(0, 0, 0, 0.3) url('/images/play.svg') center no-repeat;
+ background-size: 13%;
+ transition: background-size 0.2s ease-out;
+ }
+
+ &:hover:before {
+ background-size: 14.5%;
+ }
+ }
+
.slick-track {
display: flex;
align-items: center;
background-color: transparent;
}
-.slick-lightbox .slick-prev {
- left: 15px;
+// Slider arrows
+.slick-prev, .slick-next {
+ width: 55px;
+ height: 55px;
+ background-size: contain;
+ z-index: 99;
+
+ &:before {
+ display: none;
+ }
+
+ &.slick-disabled {
+ opacity: .25;
+ }
}
-.slick-lightbox .slick-next {
+.slick-prev {
+ left: 15px;
+ background: url('/images/slider-prev.svg') center no-repeat !important;
+}
+.slick-next {
right: 15px;
+ background: url('/images/slider-next.svg') center no-repeat !important;
}