added card behaviour to news on homeV2
This commit is contained in:
parent
1657634e1a
commit
1ca1912fe2
@ -11503,20 +11503,27 @@ body.home-v2 #center {
|
|||||||
padding-right: 0.9375rem;
|
padding-right: 0.9375rem;
|
||||||
width: 33.33333%;
|
width: 33.33333%;
|
||||||
float: left;
|
float: left;
|
||||||
width: 30.5%;
|
padding: 0em;
|
||||||
padding-left: 1em;
|
margin-left: 1em;
|
||||||
}
|
}
|
||||||
/* line 3236, ../scss/styles.scss */
|
/* line 3236, ../scss/styles.scss */
|
||||||
|
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .center-wrapper .panel-panel.panel-col-first {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
/* line 3237, ../scss/styles.scss */
|
||||||
|
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .center-wrapper .panel-panel:not(.panel-col-first) {
|
||||||
|
width: 31%;
|
||||||
|
}
|
||||||
|
/* line 3238, ../scss/styles.scss */
|
||||||
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .center-wrapper .panel-panel .inside {
|
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .center-wrapper .panel-panel .inside {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
/* line 3237, ../scss/styles.scss */
|
/* line 3239, ../scss/styles.scss */
|
||||||
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .center-wrapper .panel-panel article.node, #home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .center-wrapper .panel-panel article.node-breve.vm-cardbig {
|
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .center-wrapper .panel-panel article.node, #home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .center-wrapper .panel-panel article.node-breve.vm-cardbig {
|
||||||
max-width: 95%;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
height: 610px;
|
height: 610px;
|
||||||
}
|
}
|
||||||
/* line 3240, ../scss/styles.scss */
|
/* line 3242, ../scss/styles.scss */
|
||||||
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom {
|
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
@ -11536,22 +11543,22 @@ body.home-v2 #center {
|
|||||||
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom:after {
|
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom:after {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
/* line 3242, ../scss/styles.scss */
|
/* line 3244, ../scss/styles.scss */
|
||||||
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom > .inside {
|
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom > .inside {
|
||||||
padding-left: 0.9375rem;
|
padding-left: 0.9375rem;
|
||||||
padding-right: 0.9375rem;
|
padding-right: 0.9375rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
/* line 3246, ../scss/styles.scss */
|
/* line 3248, ../scss/styles.scss */
|
||||||
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom p {
|
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom p {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
/* line 3247, ../scss/styles.scss */
|
/* line 3249, ../scss/styles.scss */
|
||||||
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom .form-checkboxes {
|
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom .form-checkboxes {
|
||||||
margin: 0 0 0.5em 0;
|
margin: 0 0 0.5em 0;
|
||||||
}
|
}
|
||||||
/* line 3249, ../scss/styles.scss */
|
/* line 3251, ../scss/styles.scss */
|
||||||
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom .form-checkboxes .form-item {
|
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom .form-checkboxes .form-item {
|
||||||
display: moz-inline-stack;
|
display: moz-inline-stack;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -11560,11 +11567,11 @@ body.home-v2 #center {
|
|||||||
*display: inline;
|
*display: inline;
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
}
|
}
|
||||||
/* line 3251, ../scss/styles.scss */
|
/* line 3253, ../scss/styles.scss */
|
||||||
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom .form-checkboxes .form-item label, #home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom .form-checkboxes .form-item input {
|
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom .form-checkboxes .form-item label, #home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom .form-checkboxes .form-item input {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
/* line 3255, ../scss/styles.scss */
|
/* line 3257, ../scss/styles.scss */
|
||||||
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom .form-item-mail {
|
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom .form-item-mail {
|
||||||
display: moz-inline-stack;
|
display: moz-inline-stack;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -11573,7 +11580,7 @@ body.home-v2 #center {
|
|||||||
*display: inline;
|
*display: inline;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
/* line 3257, ../scss/styles.scss */
|
/* line 3259, ../scss/styles.scss */
|
||||||
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom .form-item-mail label, #home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom .form-item-mail input {
|
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom .form-item-mail label, #home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom .form-item-mail input {
|
||||||
display: moz-inline-stack;
|
display: moz-inline-stack;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -11582,7 +11589,7 @@ body.home-v2 #center {
|
|||||||
*display: inline;
|
*display: inline;
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
}
|
}
|
||||||
/* line 3260, ../scss/styles.scss */
|
/* line 3262, ../scss/styles.scss */
|
||||||
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom #edit-subscribe, #home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom #edit-unsubscribe {
|
#home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom #edit-subscribe, #home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .panel-col-bottom #edit-unsubscribe {
|
||||||
display: moz-inline-stack;
|
display: moz-inline-stack;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -11590,7 +11597,7 @@ body.home-v2 #center {
|
|||||||
zoom: 1;
|
zoom: 1;
|
||||||
*display: inline;
|
*display: inline;
|
||||||
}
|
}
|
||||||
/* line 3268, ../scss/styles.scss */
|
/* line 3270, ../scss/styles.scss */
|
||||||
#home-v2 > .panel-panel > div > .pane-news-home-v2 .node-simplenews {
|
#home-v2 > .panel-panel > div > .pane-news-home-v2 .node-simplenews {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
background-clip: padding-box;
|
background-clip: padding-box;
|
||||||
@ -11602,7 +11609,7 @@ body.home-v2 #center {
|
|||||||
position: relative;
|
position: relative;
|
||||||
margin: 7px;
|
margin: 7px;
|
||||||
}
|
}
|
||||||
/* line 3275, ../scss/styles.scss */
|
/* line 3277, ../scss/styles.scss */
|
||||||
#home-v2 > .panel-panel > div > .pane-news-home-v2 .node-simplenews > a {
|
#home-v2 > .panel-panel > div > .pane-news-home-v2 .node-simplenews > a {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
@ -11610,13 +11617,13 @@ body.home-v2 #center {
|
|||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
/* line 3280, ../scss/styles.scss */
|
/* line 3282, ../scss/styles.scss */
|
||||||
#home-v2 > .panel-panel > div > .pane-news-home-v2 .node-simplenews > a h1 {
|
#home-v2 > .panel-panel > div > .pane-news-home-v2 .node-simplenews > a h1 {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
/* line 3289, ../scss/styles.scss */
|
/* line 3291, ../scss/styles.scss */
|
||||||
#home-v2 > .panel-panel > div > .pane-news-home-v2:after {
|
#home-v2 > .panel-panel > div > .pane-news-home-v2:after {
|
||||||
content: url("../img/point.png");
|
content: url("../img/point.png");
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -81,8 +81,8 @@
|
|||||||
checkIE();
|
checkIE();
|
||||||
initHistoryNav();
|
initHistoryNav();
|
||||||
|
|
||||||
if(_isFrontNotLogged && !_isFrontHomeV2)
|
// if(_isFrontNotLogged && !_isFrontHomeV2)
|
||||||
initHome();
|
// initHome();
|
||||||
|
|
||||||
if(_isFrontHomeV2)
|
if(_isFrontHomeV2)
|
||||||
initHomeV2();
|
initHomeV2();
|
||||||
@ -174,8 +174,13 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* home
|
__ ___
|
||||||
|
/ /_ ____ ____ ___ ___ _ _< /
|
||||||
|
/ __ \/ __ \/ __ `__ \/ _ \ | | / / /
|
||||||
|
/ / / / /_/ / / / / / / __/ | |/ / /
|
||||||
|
/_/ /_/\____/_/ /_/ /_/\___/ |___/_/
|
||||||
|
|
||||||
*/
|
*/
|
||||||
function initHome(){
|
function initHome(){
|
||||||
$('img.lazy', '#block-materio-didactique-materio-didactique-home').each(function(){
|
$('img.lazy', '#block-materio-didactique-materio-didactique-home').each(function(){
|
||||||
@ -291,7 +296,9 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
function initHomeV2(){
|
function initHomeV2(){
|
||||||
console.log('initHomeV2');
|
//console.log('initHomeV2');
|
||||||
|
|
||||||
|
initCards('#home-v2 .panel-pane.news-panel .panel-col-first .views-row');
|
||||||
|
|
||||||
if(!_max_480()){
|
if(!_max_480()){
|
||||||
|
|
||||||
@ -542,9 +549,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
function initCards(container){
|
function initCards(container){
|
||||||
//TODO : refactore this function, to much features in there
|
trace('theme :: initCards', container);
|
||||||
|
|
||||||
//trace('theme :: initCards', container);
|
|
||||||
var $container = $(container);
|
var $container = $(container);
|
||||||
$container.children('.node:not(.listened)')
|
$container.children('.node:not(.listened)')
|
||||||
.bind('mouseenter focused mousemove click mouseleave', onCardEventDispatcher)
|
.bind('mouseenter focused mousemove click mouseleave', onCardEventDispatcher)
|
||||||
@ -826,9 +831,7 @@
|
|||||||
function horiHoverImagesSwitcher(event){
|
function horiHoverImagesSwitcher(event){
|
||||||
// trace('horiHoverImagesSwitcher', event);
|
// trace('horiHoverImagesSwitcher', event);
|
||||||
var $curtar = $(event.currentTarget);
|
var $curtar = $(event.currentTarget);
|
||||||
// TODO : event.layerX doesn't exists in IE8 so we have to calculate the mouse position from offsetX, pageY, etc
|
var layerX = (event.offsetX || event.pageX - $(event.target).offset().left);
|
||||||
// var layerX = event.layerX ? event.layerX : event.clientX - event.currentTarget.offsetLeft;
|
|
||||||
var layerX = event.clientX - event.currentTarget.offsetLeft;
|
|
||||||
// trace("layerX", layerX);
|
// trace("layerX", layerX);
|
||||||
if(layerX && $curtar.is('.image-ready') ){ // && !$curtar.is('.image-buged')
|
if(layerX && $curtar.is('.image-ready') ){ // && !$curtar.is('.image-buged')
|
||||||
var $imgs = $('.group-images figure', event.currentTarget);
|
var $imgs = $('.group-images figure', event.currentTarget);
|
||||||
@ -837,8 +840,9 @@
|
|||||||
rapport = imgw/$imgs.length,
|
rapport = imgw/$imgs.length,
|
||||||
mx = layerX > imgw ? imgw-1 : layerX,
|
mx = layerX > imgw ? imgw-1 : layerX,
|
||||||
rapport_pos = Math.floor(mx / rapport);
|
rapport_pos = Math.floor(mx / rapport);
|
||||||
// trace('rapport_pos = '+rapport_pos+' | event.layerX = '+event.layerX);
|
// trace('imgw = '+imgw+' | rapport_pos = '+rapport_pos+' | layerX = '+layerX);
|
||||||
rapport_pos = rapport_pos < 0 ? 0 : ( rapport_pos > ($imgs.length - 1) ? $imgs.length - 1 : rapport_pos);
|
rapport_pos = rapport_pos < 0 ? 0 : ( rapport_pos > ($imgs.length - 1) ? $imgs.length - 1 : rapport_pos);
|
||||||
|
// trace('rapport_pos', rapport_pos);
|
||||||
|
|
||||||
if(!$imgs.eq(rapport_pos).is('.op-visible')){
|
if(!$imgs.eq(rapport_pos).is('.op-visible')){
|
||||||
// google analytics
|
// google analytics
|
||||||
|
@ -3231,10 +3231,12 @@ body.home-v2{
|
|||||||
.panel-panel{
|
.panel-panel{
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
@include grid-column(4);
|
@include grid-column(4);
|
||||||
width:30.5%;
|
// width:32.8%;
|
||||||
padding-left:1em;
|
padding:0em; margin-left:1em;
|
||||||
|
&.panel-col-first{width:auto;}
|
||||||
|
&:not(.panel-col-first){width:31%;}
|
||||||
.inside{margin:0;}
|
.inside{margin:0;}
|
||||||
article.node, article.node-breve.vm-cardbig{max-width: 95%; margin:0; height:610px;}
|
article.node, article.node-breve.vm-cardbig{margin:0; height:610px;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#mini-panel-news_home_v2 .panel-col-bottom{
|
#mini-panel-news_home_v2 .panel-col-bottom{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user