mobiscroll.settings = {
lang: ' ',
theme: ' ',
themeVariant: ' '
};
angular
.module('demoApp', ['mobiscroll-listview', 'mobiscroll-cards'])
.controller('demoController', ['$scope', function ($scope) {
$scope.data = [{
id: 1,
title: 'Best places to seek silence',
desc: 'The Dhamma Giri, a vipassana meditation retreat.',
img: 'https://img.mobiscroll.com/demos/card_1.png'
}, {
id: 2,
title: 'Best animal adventure',
desc: 'A young panda tests his climbing skills at the Chengdu Research Base.',
img: 'https://img.mobiscroll.com/demos/card_2.png'
}, {
id: 3,
title: 'Best places to test your survival skills',
desc: 'A view across the Turnagain Arm on Alaska\'s Kenai Peninsula.',
img: 'https://img.mobiscroll.com/demos/card_3.png'
}, {
id: 4,
title: 'Most accessible destinations',
desc: 'The impressive Mayan site of Chichén Itzá.',
img: 'https://img.mobiscroll.com/demos/card_4.png'
}, {
id: 5,
title: 'The world’s most extraordinary sleepovers',
desc: 'Explore the azure depths with a stay at the Manta Resort\'s underwater room.',
img: 'https://img.mobiscroll.com/demos/card_5.png'
}];
$scope.settings = {
stages: [{
percent: -20,
action: function (event, inst) {
inst.remove(event.target);
return false;
}
}, {
percent: 20,
action: function (event, inst) {
inst.remove(event.target);
return false;
}
}],
actionable: false
};
$scope.cycleSettings = {
stages: [{
percent: -20,
action: function (event, inst) {
inst.move(event.target, 0);
return false;
}
}, {
percent: 20,
action: function (event, inst) {
inst.move(event.target, 0);
return false;
}
}],
actionable: false
};
}]);
<div ng-app="demoApp" ng-controller="demoController">
<div class="mbsc-note mbsc-note-primary">
Swipe cards left or right.
</div>
<div class="custom-card-deck">
<ul mobiscroll-listview="settings" mobiscroll-data="data" class="mbsc-card-list">
<li class="custom-card">
<mobiscroll-card class="custom-card" ng-class="{'custom-card-rotate-right': ($index % 2) == 0, 'custom-card-rotate-left': ($index % 3) == 0}">
<mobiscroll-card-header>
<mobiscroll-card-title>{{item.title}}</mobiscroll-card-title>
<mobiscroll-card-subtitle>{{item.desc}}</mobiscroll-card-subtitle>
</mobiscroll-card-header>
<mobiscroll-card-content>
<img draggable="false" ng-src="{{item.img}}">
</mobiscroll-card-content>
</mobiscroll-card>
</li>
</ul>
</div>
<div class="mbsc-note mbsc-note-primary">
Swipe cards away for cyclic movement.
</div>
<div class="custom-card-deck">
<ul mobiscroll-listview="cycleSettings" mobiscroll-data="data" class="mbsc-card-list">
<li class="custom-card" ng-class="{'custom-card-rotate-right': ($index % 2) == 0, 'custom-card-rotate-left': ($index % 3) == 0}">
<mobiscroll-card class="custom-card">
<mobiscroll-card-header>
<mobiscroll-card-title>{{item.title}}</mobiscroll-card-title>
<mobiscroll-card-subtitle>{{item.desc}}</mobiscroll-card-subtitle>
</mobiscroll-card-header>
<mobiscroll-card-content>
<img draggable="false" ng-src="{{item.img}}">
</mobiscroll-card-content>
</mobiscroll-card>
</li>
</ul>
</div>
</div>
.custom-card-deck {
margin: 1em 0;
}
.custom-card-deck .mbsc-lv-sl-c {
max-width: 500px;
margin: 0 auto;
}
.custom-card-deck .mbsc-lv-v {
padding-top: 88%;
min-height: 390px;
}
.custom-card-deck .mbsc-lv-item {
position: absolute;
top: 0;
left: 0;
right: 0;
}
.custom-card-deck .mbsc-lv-item.mbsc-lv-item-swiping {
z-index: 10;
}
.custom-card-deck .custom-card-rotate-right {
transform: rotate(1deg);
}
.custom-card-deck .custom-card-rotate-left {
transform: rotate(-2deg);
}
.custom-card-deck .mbsc-card.custom-card {
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
}