|
|
@@ -1,7 +1,7 @@
|
|
1
|
1
|
<template>
|
|
2
|
2
|
<div class="tinder__card">
|
|
3
|
3
|
<div class="tinder__card__container">
|
|
4
|
|
- <vue-swing
|
|
|
4
|
+ <div
|
|
5
|
5
|
v-for="user in users"
|
|
6
|
6
|
:key="user.id"
|
|
7
|
7
|
@throwout="swipped(user)"
|
|
|
@@ -16,7 +16,7 @@
|
|
16
|
16
|
<h3>{{ user.name }}</h3>
|
|
17
|
17
|
</div>
|
|
18
|
18
|
</div>
|
|
19
|
|
- </vue-swing>
|
|
|
19
|
+ </div>
|
|
20
|
20
|
|
|
21
|
21
|
<div class="swipe__icons">
|
|
22
|
22
|
// Icons
|
|
|
@@ -50,7 +50,7 @@ export default {
|
|
50
|
50
|
data() {
|
|
51
|
51
|
return {
|
|
52
|
52
|
config: {
|
|
53
|
|
- allowedDirections: [VueSwing.Direction.LEFT, VueSwing.Direction.RIGHT],
|
|
|
53
|
+ // allowedDirections: [VueSwing.Direction.LEFT, VueSwing.Direction.RIGHT],
|
|
54
|
54
|
minThrowOutDistance: 250,
|
|
55
|
55
|
maxThrowOutDistance: 300,
|
|
56
|
56
|
},
|
|
|
@@ -89,69 +89,67 @@ export default {
|
|
89
|
89
|
},
|
|
90
|
90
|
};
|
|
91
|
91
|
</script>
|
|
92
|
|
-<style scoped>
|
|
93
|
|
-.card {
|
|
94
|
|
- position: relative;
|
|
95
|
|
- background-color: #fff;
|
|
96
|
|
- width: 250px;
|
|
97
|
|
- padding: 20px;
|
|
98
|
|
- max-width: 85vw;
|
|
99
|
|
- height: 50vh;
|
|
100
|
|
- border-radius: 9px;
|
|
101
|
|
- background-size: cover;
|
|
102
|
|
- background-position: center;
|
|
103
|
|
-}
|
|
104
|
|
-.tinder__card__container {
|
|
105
|
|
- display: flex;
|
|
106
|
|
- justify-content: center;
|
|
107
|
|
- margin-top: 10vh;
|
|
108
|
|
-}
|
|
109
|
|
-.swipe {
|
|
110
|
|
- position: absolute;
|
|
111
|
|
-}
|
|
112
|
|
-.card__content {
|
|
113
|
|
- width: 100%;
|
|
114
|
|
- height: 100%;
|
|
115
|
|
-}
|
|
116
|
|
-.card h3 {
|
|
117
|
|
- position: absolute;
|
|
118
|
|
- bottom: 0;
|
|
119
|
|
- margin: 10px;
|
|
120
|
|
- color: #fff;
|
|
|
92
|
+<style lang="postcss">
|
|
|
93
|
+.card
|
|
|
94
|
+ position: relative
|
|
|
95
|
+ background-color: #fff
|
|
|
96
|
+ width: 250px
|
|
|
97
|
+ padding: 20px
|
|
|
98
|
+ max-width: 85vw
|
|
|
99
|
+ height: 50vh
|
|
|
100
|
+ border-radius: 9px
|
|
|
101
|
+ background-size: cover
|
|
|
102
|
+ background-position: center
|
|
|
103
|
+
|
|
|
104
|
+.tinder__card__container
|
|
|
105
|
+ display: flex
|
|
|
106
|
+ justify-content: center
|
|
|
107
|
+ margin-top: 10vh
|
|
|
108
|
+
|
|
|
109
|
+.swipe
|
|
|
110
|
+ position: absolute
|
|
|
111
|
+
|
|
|
112
|
+.card__content
|
|
|
113
|
+ width: 100%
|
|
|
114
|
+ height: 100%
|
|
|
115
|
+
|
|
|
116
|
+.card h3
|
|
|
117
|
+ position: absolute
|
|
|
118
|
+ bottom: 0
|
|
|
119
|
+ margin: 10px
|
|
|
120
|
+ color: #fff
|
|
121
|
121
|
background: linear-gradient(
|
|
122
|
122
|
109deg,
|
|
123
|
123
|
rgba(0, 0, 0, 0.5) 0%,
|
|
124
|
124
|
rgba(0, 0, 0, 0) 100%
|
|
125
|
|
- );
|
|
126
|
|
- border-radius: 9px;
|
|
127
|
|
- padding: 5px;
|
|
128
|
|
-}
|
|
129
|
|
-.swipe__icons__container {
|
|
130
|
|
- display: flex;
|
|
131
|
|
- justify-content: center;
|
|
132
|
|
-}
|
|
133
|
|
-.swipe__icons {
|
|
134
|
|
- position: fixed;
|
|
135
|
|
- bottom: 5vh;
|
|
136
|
|
- display: flex;
|
|
137
|
|
- width: 250px;
|
|
138
|
|
- justify-content: space-evenly;
|
|
139
|
|
-}
|
|
|
125
|
+ )
|
|
|
126
|
+ border-radius: 9px
|
|
|
127
|
+ padding: 5px
|
|
|
128
|
+
|
|
|
129
|
+.swipe__icons__container
|
|
|
130
|
+ display: flex
|
|
|
131
|
+ justify-content: center
|
|
|
132
|
+
|
|
|
133
|
+.swipe__icons
|
|
|
134
|
+ position: fixed
|
|
|
135
|
+ bottom: 5vh
|
|
|
136
|
+ display: flex
|
|
|
137
|
+ width: 250px
|
|
|
138
|
+ justify-content: space-evenly
|
|
|
139
|
+
|
|
140
|
140
|
.swipe__icon__close:hover,
|
|
141
|
141
|
.swipe__icon__star:hover,
|
|
142
|
|
-.swipe__icon__heart:hover {
|
|
143
|
|
- transform: scale(1.06);
|
|
144
|
|
- transition: all 0.2s ease-in-out;
|
|
145
|
|
-}
|
|
146
|
|
-.swipe__icons .material-design-icon__svg {
|
|
147
|
|
- background-color: white;
|
|
148
|
|
- box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.2) !important;
|
|
149
|
|
- border-radius: 30px;
|
|
150
|
|
- padding: 10px;
|
|
151
|
|
-}
|
|
152
|
|
-@media only screen and (min-width: 768px) {
|
|
153
|
|
- .swipe__icon__power {
|
|
154
|
|
- display: none;
|
|
155
|
|
- }
|
|
156
|
|
-}
|
|
|
142
|
+.swipe__icon__heart:hover
|
|
|
143
|
+ transform: scale(1.06)
|
|
|
144
|
+ transition: all 0.2s ease-in-out
|
|
|
145
|
+
|
|
|
146
|
+.swipe__icons .material-design-icon__svg
|
|
|
147
|
+ background-color: white
|
|
|
148
|
+ box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.2) !important
|
|
|
149
|
+ border-radius: 30px
|
|
|
150
|
+ padding: 10px
|
|
|
151
|
+
|
|
|
152
|
+@media only screen and (min-width: 768px)
|
|
|
153
|
+ .swipe__icon__power
|
|
|
154
|
+ display: none
|
|
157
|
155
|
</style>
|