Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Left and right swiping, added regret swipe #9

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "ionic-contrib-swipe-cards",
"version": "1.0.0",
"homepage": "https://github.com/DaleWebb/ionic-contrib-swipe-cards",
"description": "Tinder-style swiping",
"main": "ionic.swipecards.js",
"keywords": [
"cards",
"jelly",
"ionic",
"tinder",
"swipe"
],
"authors": [
"Max Lynch",
"Dale Alexander Webb"
],
"license": "MIT",
"ignore": [
"example",
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
6 changes: 6 additions & 0 deletions example/ionic.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "example",
"email": "",
"app_id": "",
"package_name": ""
}
11 changes: 11 additions & 0 deletions example/www/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@
border-radius: 0px 0px 4px 4px;
}

.swipe-card .front {
display: block;
height: inherit;
}

.swipe-card .back {
display: none;
background-color: #30BD8A;
height: inherit;
}

#start-card {
color: #fff;
background-color: #30BD8A;
Expand Down
20 changes: 13 additions & 7 deletions example/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
<link href="css/app.css" rel="stylesheet">

<!-- angularjs scripts -->
<script src="lib/js/ionic.js"></script>
<script src="lib/js/angular/angular.js"></script>
<script src="lib/js/ionic/js/ionic.bundle.js"></script>
<script src="lib/js/angular/angular-animate.js"></script>
<script src="lib/js/angular/angular-sanitize.js"></script>
<script src="lib/js/angular/angular-touch.js"></script>
<script src="lib/js/angular-ui/angular-ui-router.js"></script>
<script src="lib/js/ionic-angular.js"></script>

<!-- cordova script -->
<script src="cordova.js"></script>
Expand All @@ -38,11 +36,16 @@
<header-bar type="bar-transparent" title="'Help out'"></header-bar>

<swipe-cards>
<swipe-card on-swipe="cardSwiped()" id="start-card">
Swipe down for a new card
<swipe-card on-swipe-left="cardSwiped()" on-swipe-right="cardSwiped()" id="start-card">
<div class="front">
Swipe left or right for a new card. Tap to flip
</div>
<div class="back">
Tap to flip back. Swipe left or right for a new card
</div>
</swipe-card>
<swipe-card ng-repeat="card in cards" on-destroy="cardDestroyed($index)" on-swipe="cardSwiped($index)">
<div ng-controller="CardCtrl">
<swipe-card ng-repeat="card in cards" on-destroy="cardDestroyed($index)" on-swipe-left="cardSwiped($index)" on-swipe-right="cardSwiped($index)">
<div ng-controller="CardCtrl" class="front">
<div class="title">
{{card.title}}
</div>
Expand All @@ -54,6 +57,9 @@
<button class="button button-clear button-positive" ng-click="goAway()">Decline</button>
</div>
</div>
<div class="back">
Tap to flip back
</div>
</swipe-card>
</swipe-cards>
</pane>
Expand Down
Loading