$res.='<div class="content">';
$res.='<h1>' . $studie->titre . '</h1>';
$res.='<h2>' . $studie->description . '</h2>';
+ $res.= $this->view->link(__('Fermer'), $this->currentPage->getParent()->getHref(), array('class' => 'close', 'id' => 'closeButton'));
$res.='</div>';
$res .= '<div class="casestudies-detail-visuel">';
function load_casestudies() {
initTagsLink();
+
+ // Check referrer and if it is a cubedesigners page, switch to a history.back() link instead of a standard link to speed things up
+ if(document.referrer.indexOf("cubedesigners.") > -1) {
+ $("#closeButton").on('click',function(){
+ console.log('using back button...');
+ history.back();
+ return false;
+ });
+ }
+
}
function initTagsLink() {
position: relative;
}
}
+}
+
+#closeButton {
+ display: inline-block;
+ position: absolute;
+ right: 34px;
+ top: 50%;
+ margin-top: -13px; // Half of line-height to position vertically in the centre
+ background-image: url(../images/close-portfolio.png);
+ background-repeat: no-repeat;
+ background-position: right center;
+ padding-right: 33px;
+ color: #545454;
+ font-size: 14px;
+ line-height: 26px;
+
+ &:hover {
+ color: #000;
+ }
}
\ No newline at end of file