forked from googlearchive/swipeable-card
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
53 lines (40 loc) · 1.16 KB
/
demo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!doctype html>
<html>
<head>
<title>swipeable-card</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="swipeable-card.html">
<style>
#cards {
margin: 0 auto;
background: #eee;
overflow: auto;
-webkit-user-select: none;
-moz-user-select: none;
}
swipeable-card {
height: 200px;
width: 240px;
margin: 20px auto;
padding: 30px;
}
</style>
</head>
<body unresolved>
<div id="cards">
<swipeable-card>Swipe Me!</swipeable-card>
<swipeable-card>Swipe Me!</swipeable-card>
<swipeable-card disableSwipe></swipeable-card>
<swipeable-card>Swipe Me!</swipeable-card>
<swipeable-card disableSwipe></swipeable-card>
</div>
<script>
document.querySelector('#cards').addEventListener('swipeable-card-swipe-away', function(e) {
e.target.parentNode.removeChild(e.target);
});
</script>
</body>
</html>