slide countdown e highlist modulo aggiornato 5 v
This commit is contained in:
@ -1571,21 +1571,49 @@ a.cardblu:hover{
|
||||
.caption-slide{
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
min-height: 280px;
|
||||
}
|
||||
|
||||
.wrap-slide {
|
||||
width: 100%;
|
||||
top:unset;
|
||||
top:20em;
|
||||
left: unset;
|
||||
transform: unset;
|
||||
position: relative;
|
||||
}
|
||||
.caption-slide{
|
||||
background: #EBF5FD;
|
||||
height: 226px;
|
||||
|
||||
.larghezza50 .row50slide{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
.caption-slide a{
|
||||
color:#003882;
|
||||
}
|
||||
|
||||
.swiper-content.larghezza50 .caption-slide{
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
.swiper-content.larghezza100::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.swiper-content.larghezza100 .wrap-slide {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.swiper-content.larghezza100 .wrap-slide .caption-slide{
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
.img-caption{
|
||||
top: -118px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.mod-breadcrumbs.breadcrumb{
|
||||
@ -1908,7 +1936,7 @@ text-decoration: none;
|
||||
align-items: center;
|
||||
color: #000;
|
||||
font-family: "Titillium Web";
|
||||
font-size: 30px;
|
||||
font-size: 3rem;
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
line-height: normal;
|
||||
@ -1957,4 +1985,182 @@ text-decoration: none;
|
||||
.jem-list-row .fa {color:#C3334B}
|
||||
.jem-event-info-small .fa {color:#6f6f6f}
|
||||
.jem-event-title h4 {font-size: 1.1rem;}
|
||||
.jem-event-date {color:#7a7a7a}
|
||||
.jem-event-date {color:#7a7a7a}
|
||||
|
||||
|
||||
|
||||
.countdown {
|
||||
min-height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.flip-clock {
|
||||
text-align: center;
|
||||
perspective: 400px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.flip-clock *,
|
||||
.flip-clock *:before,
|
||||
.flip-clock *:after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.flip-clock__piece {
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.flip-clock__slot {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.cardcontatore {
|
||||
display: block;
|
||||
position: relative;
|
||||
padding-bottom: 0.72em;
|
||||
font-size: 3rem;
|
||||
line-height: 0.95;
|
||||
}
|
||||
|
||||
.cardcontatore__top,
|
||||
.cardcontatore__bottom,
|
||||
.cardcontatore__back::before,
|
||||
.cardcontatore__back::after {
|
||||
display: block;
|
||||
height: 0.72em;
|
||||
color: #ccc;
|
||||
background: #222;
|
||||
padding: 0.15em;
|
||||
border-radius: 0.15em 0.15em 0 0;
|
||||
backface-visibility: hidden;
|
||||
transform-style: preserve-3d;
|
||||
width: 1.8em;
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
.cardcontatore__bottom {
|
||||
color: #FFF;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
border-top: solid 1px #000;
|
||||
background: #393939;
|
||||
border-radius: 0 0 0.15em 0.15em;
|
||||
pointer-events: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cardcontatore__bottom::after {
|
||||
display: block;
|
||||
margin-top: -0.72em;
|
||||
}
|
||||
|
||||
.cardcontatore__back::before,
|
||||
.cardcontatore__bottom::after {
|
||||
content: attr(data-value);
|
||||
}
|
||||
|
||||
.cardcontatore__back {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
left: 0%;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.cardcontatore__back::before {
|
||||
position: relative;
|
||||
z-index: -1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.flip .cardcontatore__back::before {
|
||||
-webkit-animation: flipTop 0.3s cubic-bezier(0.37, 0.01, 0.94, 0.35);
|
||||
animation: flipTop 0.3s cubic-bezier(0.37, 0.01, 0.94, 0.35);
|
||||
-webkit-animation-fill-mode: both;
|
||||
animation-fill-mode: both;
|
||||
transform-origin: center bottom;
|
||||
}
|
||||
|
||||
.flip .cardcontatore__back .cardcontatore__bottom {
|
||||
transform-origin: center top;
|
||||
-webkit-animation-fill-mode: both;
|
||||
animation-fill-mode: both;
|
||||
-webkit-animation: flipBottom 0.6s cubic-bezier(0.15, 0.45, 0.28, 1);
|
||||
animation: flipBottom 0.6s cubic-bezier(0.15, 0.45, 0.28, 1);
|
||||
}
|
||||
|
||||
@-webkit-keyframes flipTop {
|
||||
0% {
|
||||
transform: rotateX(0deg);
|
||||
z-index: 2;
|
||||
}
|
||||
0%,
|
||||
99% {
|
||||
opacity: 0.99;
|
||||
}
|
||||
100% {
|
||||
transform: rotateX(-90deg);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes flipTop {
|
||||
0% {
|
||||
transform: rotateX(0deg);
|
||||
z-index: 2;
|
||||
}
|
||||
0%,
|
||||
99% {
|
||||
opacity: 0.99;
|
||||
}
|
||||
100% {
|
||||
transform: rotateX(-90deg);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes flipBottom {
|
||||
0%,
|
||||
50% {
|
||||
z-index: -1;
|
||||
transform: rotateX(90deg);
|
||||
opacity: 0;
|
||||
}
|
||||
51% {
|
||||
opacity: 0.99;
|
||||
}
|
||||
100% {
|
||||
opacity: 0.99;
|
||||
transform: rotateX(0deg);
|
||||
z-index: 5;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes flipBottom {
|
||||
0%,
|
||||
50% {
|
||||
z-index: -1;
|
||||
transform: rotateX(90deg);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
51% {
|
||||
opacity: 0.99;
|
||||
}
|
||||
100% {
|
||||
opacity: 0.99;
|
||||
transform: rotateX(0deg);
|
||||
z-index: 5;
|
||||
}
|
||||
}
|
||||
|
||||
.contatore .sottotitolo{
|
||||
font-size: 1.2rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
@ -354,6 +354,10 @@ ul.menucerca li{
|
||||
.section-hero-left .decoration-02 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.it-brand-wrapper a img{
|
||||
width: 160px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
155
media/templates/site/joomla-italia-theme/js/countdown.css
Executable file
155
media/templates/site/joomla-italia-theme/js/countdown.css
Executable file
@ -0,0 +1,155 @@
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
body {
|
||||
min-height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #EEE;
|
||||
}
|
||||
.flip-clock {
|
||||
text-align: center;
|
||||
perspective: 400px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
.flip-clock *,
|
||||
.flip-clock *:before,
|
||||
.flip-clock *:after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.flip-clock__piece {
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
}
|
||||
.flip-clock__slot {
|
||||
font-size: 2vw;
|
||||
}
|
||||
.card {
|
||||
display: block;
|
||||
position: relative;
|
||||
padding-bottom: 0.72em;
|
||||
font-size: 9vw;
|
||||
line-height: 0.95;
|
||||
}
|
||||
.card__top,
|
||||
.card__bottom,
|
||||
.card__back::before,
|
||||
.card__back::after {
|
||||
display: block;
|
||||
height: 0.72em;
|
||||
color: #ccc;
|
||||
background: #222;
|
||||
padding: 0.25em 0.25em;
|
||||
border-radius: 0.15em 0.15em 0 0;
|
||||
backface-visiblity: hidden;
|
||||
transform-style: preserve-3d;
|
||||
width: 1.8em;
|
||||
transform: translateZ(0);
|
||||
}
|
||||
.card__bottom {
|
||||
color: #FFF;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
border-top: solid 1px #000;
|
||||
background: #393939;
|
||||
border-radius: 0 0 0.15em 0.15em;
|
||||
pointer-events: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
.card__bottom::after {
|
||||
display: block;
|
||||
margin-top: -0.72em;
|
||||
}
|
||||
.card__back::before,
|
||||
.card__bottom::after {
|
||||
content: attr(data-value);
|
||||
}
|
||||
.card__back {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
left: 0%;
|
||||
pointer-events: none;
|
||||
}
|
||||
.card__back::before {
|
||||
position: relative;
|
||||
z-index: -1;
|
||||
overflow: hidden;
|
||||
}
|
||||
.flip .card__back::before {
|
||||
-webkit-animation: flipTop 0.3s cubic-bezier(0.37, 0.01, 0.94, 0.35);
|
||||
animation: flipTop 0.3s cubic-bezier(0.37, 0.01, 0.94, 0.35);
|
||||
-webkit-animation-fill-mode: both;
|
||||
animation-fill-mode: both;
|
||||
transform-origin: center bottom;
|
||||
}
|
||||
.flip .card__back .card__bottom {
|
||||
transform-origin: center top;
|
||||
-webkit-animation-fill-mode: both;
|
||||
animation-fill-mode: both;
|
||||
-webkit-animation: flipBottom 0.6s cubic-bezier(0.15, 0.45, 0.28, 1);
|
||||
animation: flipBottom 0.6s cubic-bezier(0.15, 0.45, 0.28, 1);
|
||||
}
|
||||
@-webkit-keyframes flipTop {
|
||||
0% {
|
||||
transform: rotateX(0deg);
|
||||
z-index: 2;
|
||||
}
|
||||
0%,
|
||||
99% {
|
||||
opacity: 0.99;
|
||||
}
|
||||
100% {
|
||||
transform: rotateX(-90deg);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
@keyframes flipTop {
|
||||
0% {
|
||||
transform: rotateX(0deg);
|
||||
z-index: 2;
|
||||
}
|
||||
0%,
|
||||
99% {
|
||||
opacity: 0.99;
|
||||
}
|
||||
100% {
|
||||
transform: rotateX(-90deg);
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes flipBottom {
|
||||
0%,
|
||||
50% {
|
||||
z-index: -1;
|
||||
transform: rotateX(90deg);
|
||||
opacity: 0;
|
||||
}
|
||||
51% {
|
||||
opacity: 0.99;
|
||||
}
|
||||
100% {
|
||||
opacity: 0.99;
|
||||
transform: rotateX(0deg);
|
||||
z-index: 5;
|
||||
}
|
||||
}
|
||||
@keyframes flipBottom {
|
||||
0%,
|
||||
50% {
|
||||
z-index: -1;
|
||||
transform: rotateX(90deg);
|
||||
opacity: 0;
|
||||
}
|
||||
51% {
|
||||
opacity: 0.99;
|
||||
}
|
||||
100% {
|
||||
opacity: 0.99;
|
||||
transform: rotateX(0deg);
|
||||
z-index: 5;
|
||||
}
|
||||
}
|
||||
113
media/templates/site/joomla-italia-theme/js/countdown.js
Executable file
113
media/templates/site/joomla-italia-theme/js/countdown.js
Executable file
@ -0,0 +1,113 @@
|
||||
console.clear();
|
||||
|
||||
|
||||
function CountdownTracker(label, value){
|
||||
|
||||
var el = document.createElement('span');
|
||||
|
||||
el.className = 'flip-clock__piece';
|
||||
el.innerHTML = '<b class="flip-clock__card card"><b class="card__top"></b><b class="card__bottom"></b><b class="card__back"><b class="card__bottom"></b></b></b>' +
|
||||
'<span class="flip-clock__slot">' + label + '</span>';
|
||||
|
||||
this.el = el;
|
||||
|
||||
var top = el.querySelector('.card__top'),
|
||||
bottom = el.querySelector('.card__bottom'),
|
||||
back = el.querySelector('.card__back'),
|
||||
backBottom = el.querySelector('.card__back .card__bottom');
|
||||
|
||||
this.update = function(val){
|
||||
val = ( '0' + val ).slice(-2);
|
||||
if ( val !== this.currentValue ) {
|
||||
|
||||
if ( this.currentValue >= 0 ) {
|
||||
back.setAttribute('data-value', this.currentValue);
|
||||
bottom.setAttribute('data-value', this.currentValue);
|
||||
}
|
||||
this.currentValue = val;
|
||||
top.innerText = this.currentValue;
|
||||
backBottom.setAttribute('data-value', this.currentValue);
|
||||
|
||||
this.el.classList.remove('flip');
|
||||
void this.el.offsetWidth;
|
||||
this.el.classList.add('flip');
|
||||
}
|
||||
}
|
||||
|
||||
this.update(value);
|
||||
}
|
||||
|
||||
// Calculation adapted from https://www.sitepoint.com/build-javascript-countdown-timer-no-dependencies/
|
||||
|
||||
function getTimeRemaining(endtime) {
|
||||
var t = Date.parse(endtime) - Date.parse(new Date());
|
||||
return {
|
||||
'Total': t,
|
||||
'Days': Math.floor(t / (1000 * 60 * 60 * 24)),
|
||||
'Hours': Math.floor((t / (1000 * 60 * 60)) % 24),
|
||||
'Minutes': Math.floor((t / 1000 / 60) % 60),
|
||||
'Seconds': Math.floor((t / 1000) % 60)
|
||||
};
|
||||
}
|
||||
|
||||
function getTime() {
|
||||
var t = new Date();
|
||||
return {
|
||||
'Total': t,
|
||||
'Hours': t.getHours() % 12,
|
||||
'Minutes': t.getMinutes(),
|
||||
'Seconds': t.getSeconds()
|
||||
};
|
||||
}
|
||||
|
||||
function Clock(countdown,callback) {
|
||||
|
||||
countdown = countdown ? new Date(Date.parse(countdown)) : false;
|
||||
callback = callback || function(){};
|
||||
|
||||
var updateFn = countdown ? getTimeRemaining : getTime;
|
||||
|
||||
this.el = document.createElement('div');
|
||||
this.el.className = 'flip-clock';
|
||||
|
||||
var trackers = {},
|
||||
t = updateFn(countdown),
|
||||
key, timeinterval;
|
||||
|
||||
for ( key in t ){
|
||||
if ( key === 'Total' ) { continue; }
|
||||
trackers[key] = new CountdownTracker(key, t[key]);
|
||||
this.el.appendChild(trackers[key].el);
|
||||
}
|
||||
|
||||
var i = 0;
|
||||
function updateClock() {
|
||||
timeinterval = requestAnimationFrame(updateClock);
|
||||
|
||||
// throttle so it's not constantly updating the time.
|
||||
if ( i++ % 10 ) { return; }
|
||||
|
||||
var t = updateFn(countdown);
|
||||
if ( t.Total < 0 ) {
|
||||
cancelAnimationFrame(timeinterval);
|
||||
for ( key in trackers ){
|
||||
trackers[key].update( 0 );
|
||||
}
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
|
||||
for ( key in trackers ){
|
||||
trackers[key].update( t[key] );
|
||||
}
|
||||
}
|
||||
|
||||
setTimeout(updateClock,500);
|
||||
}
|
||||
|
||||
var deadline = new Date(Date.parse(new Date()) + 12 * 24 * 60 * 60 * 1000);
|
||||
var c = new Clock(deadline, function(){ alert('countdown complete') });
|
||||
document.body.appendChild(c.el);
|
||||
|
||||
var clock = new Clock();
|
||||
document.body.appendChild(clock.el);
|
||||
Reference in New Issue
Block a user