Преглед изворни кода

:recycle: reformatting css -> postcss

tags/0.0.1
J пре 4 година
родитељ
комит
f97ee8bbf3
2 измењених фајлова са 142 додато и 197 уклоњено
  1. 60
    80
      frontend/src/components/ProfileCard.vue
  2. 82
    117
      frontend/src/views/Chats.vue

+ 60
- 80
frontend/src/components/ProfileCard.vue Прегледај датотеку

@@ -1,31 +1,16 @@
1
-<template>
2
-    <div class="tinder__card">
3
-        <div class="tinder__card__container">
4
-            <div
5
-                v-for="user in users"
6
-                :key="user.id"
7
-                @throwout="swipped(user)"
8
-                :config="config"
9
-                class="swipe"
10
-            >
11
-                <div
12
-                    class="card"
13
-                    :style="{ 'background-image': `url(${user.avatar})` }"
14
-                >
15
-                    <div class="card__content">
16
-                        <h3>{{ user.name }}</h3>
17
-                    </div>
18
-                </div>
19
-            </div>
20
-
21
-            <div class="swipe__icons">// Icons</div>
22
-        </div>
23
-    </div>
1
+<template lang="pug">
2
+.profile__card
3
+  .profiler__card__container
4
+    .swipe(v-for="user in users" :key="user.id" @throwout="swipped(user)" :config="config")
5
+      .card(:style="{ 'background-image': `url(${user.avatar})` }")
6
+        .card__content
7
+          h3 {{ user.name }}
8
+    .swipe__icons // Icons
24 9
 </template>
25 10
 
26 11
 <script>
27 12
 export default {
28
-    name: 'tinder-cards',
13
+    name: 'profile-cards',
29 14
     props: {
30 15
         users: {
31 16
             type: [Object, Array],
@@ -86,66 +71,61 @@ export default {
86 71
 }
87 72
 </script>
88 73
 <style lang="postcss">
89
-.card
90
-  position: relative
91
-  background-color: #fff
92
-  width: 250px
93
-  padding: 20px
94
-  max-width: 85vw
95
-  height: 50vh
96
-  border-radius: 9px
97
-  background-size: cover
98
-  background-position: center
99
-
100
-.tinder__card__container
101
-  display: flex
102
-  justify-content: center
103
-  margin-top: 10vh
74
+.profile__card__container
75
+    display: flex
76
+    justify-content: center
77
+    margin-top: 10vh
104 78
 
105 79
 .swipe
106
-  position: absolute
107
-
108
-.card__content
109
-  width: 100%
110
-  height: 100%
111
-
112
-.card h3
113
-  position: absolute
114
-  bottom: 0
115
-  margin: 10px
116
-  color: #fff
117
-  background: linear-gradient(
118
-    109deg,
119
-    rgba(0, 0, 0, 0.5) 0%,
120
-    rgba(0, 0, 0, 0) 100%
121
-  )
122
-  border-radius: 9px
123
-  padding: 5px
124
-
125
-.swipe__icons__container
126
-  display: flex
127
-  justify-content: center
128
-
129
-.swipe__icons
130
-  position: fixed
131
-  bottom: 5vh
132
-  display: flex
133
-  width: 250px
134
-  justify-content: space-evenly
80
+    position: absolute
135 81
 
136
-.swipe__icon__close:hover,
137
-.swipe__icon__star:hover,
138
-.swipe__icon__heart:hover
139
-  transform: scale(1.06)
140
-  transition: all 0.2s ease-in-out
82
+.card 
83
+    position: relative
84
+    background-color: #fff
85
+    width: 250px
86
+    padding: 20px
87
+    max-width: 85vw
88
+    height: 50vh
89
+    border-radius: 9px
90
+    background-size: cover
91
+    background-position: center
92
+    &__content
93
+        width: 100%
94
+        height: 100%
95
+    h3
96
+        position: absolute
97
+        bottom: 0
98
+        margin: 10px
99
+        color: #fff
100
+        background: linear-gradient(
101
+            109deg,
102
+            rgba(0, 0, 0, 0.5) 0%,
103
+            rgba(0, 0, 0, 0) 100%
104
+        )
105
+        border-radius: 9px
106
+        padding: 5px
141 107
 
142
-.swipe__icons .material-design-icon__svg
143
-  background-color: white
144
-  box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.2) !important
145
-  border-radius: 30px
146
-  padding: 10px
108
+.swipe__icon
109
+    &s
110
+        position: fixed
111
+        bottom: 5vh
112
+        display: flex
113
+        width: 250px
114
+        justify-content: space-evenly
115
+        .material-design-icon__svg
116
+            background-color: white
117
+            box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.2) !important
118
+            border-radius: 30px
119
+            padding: 10px
120
+        &__container
121
+            display: flex
122
+            justify-content: center
123
+    &__close, &__star, &__heart
124
+        &:hover
125
+            transform: scale(1.06)
126
+            transition: all 0.2s ease-in-out
147 127
 
148 128
 @media only screen and (min-width: 768px)
149
-  .swipe__icon__power
150
-    display: none
129
+    .swipe__icon__power
130
+        display: none
151 131
 </style>

+ 82
- 117
frontend/src/views/Chats.vue Прегледај датотеку

@@ -136,149 +136,114 @@ export default {
136 136
 </script>
137 137
 
138 138
 <style lang="postcss">
139
-html
140
-  background-color: #f9f9f9
141
-
142
-.wrapper
143
-  position: relative
144
-
145 139
 .content-wrapper
146 140
   float: right
147 141
   width: 100%
148 142
 
149
-.content
150
-  margin-left: 320px
151
-  clear: both
152
-  background: #f9f9ff
153
-  overflow-y: hidden
154
-  height: 100vh
155
-
156
-html
157
-  box-sizing: border-box
158
-
159
-*, *:before, *:after
160
-  margin: 0
161
-  padding: 0
162
-  box-sizing: inherit
163
-
164 143
 .msger
165 144
   height: calc(100% - 50px)
166 145
   border: var(--border)
167 146
   border-radius: 5px
168 147
   background: var(--msger-bg)
169 148
   box-shadow: 0 15px 15px -5px rgba(0, 0, 0, 0.2)
170
-
171
-.msger-header
172
-  display: flex
173
-  justify-content: space-between
174
-  padding: 10px
175
-  border-bottom: var(--border)
176
-  background: #ececff
177
-  color: #666
178
-
179
-.msger-header-title
180
-  display: flex
181
-  align-items: center
182
-
183
-.msger-chat
149
+  &-header
150
+    display: flex
151
+    justify-content: space-between
152
+    padding: 10px
153
+    border-bottom: var(--border)
154
+    background: #ececff
155
+    color: #666
156
+    &-title
157
+      display: flex
158
+      align-items: center
159
+
160
+&-chat
184 161
   flex: 1
185 162
   overflow-y: auto
186 163
   padding: 10px
187 164
   height: 100vh
188
-
189
-.msger-chat::-webkit-scrollbar
190
-  width: 6px
191
-
192
-.msger-chat::-webkit-scrollbar-track
193
-  background: #ddd
194
-
195
-.msger-chat::-webkit-scrollbar-thumb
196
-  background: #bdbdbd
165
+  &::-webkit-scrollbar
166
+    width: 6px
167
+    &-track
168
+      background: #ddd
169
+    &-thumb
170
+      background: #bdbdbd
197 171
 
198 172
 .msg
199 173
   display: flex
200 174
   align-items: flex-end
201
-
202
-.msg-list
203
-  margin: 10px 0
204
-
205
-.msg-img
206
-  width: 50px
207
-  height: 50px
208
-  margin-right: 10px
209
-  background: #ddd
210
-  background-repeat: no-repeat
211
-  background-position: center
212
-  background-size: cover
213
-  border-radius: 50%
214
-
215
-.msg-bubble
216
-  max-width: 450px
217
-  padding: 15px
218
-  border-radius: 15px
219
-  background: var(--left-msg-bg)
220
-
221
-.msg-info
222
-  display: flex
223
-  justify-content: space-between
224
-  align-items: center
225
-  margin-bottom: 10px
226
-
227
-.msg-info-name
228
-  margin-right: 10px
229
-  font-weight: bold
230
-
231
-.msg-info-time
232
-  font-size: 0.85em
233
-  display: flex
234
-  margin-top: 10px
235
-
236
-.left-msg .msg-bubble
237
-  border-bottom-left-radius: 0
175
+  &-list
176
+    margin: 10px 0
177
+  &-img
178
+    width: 50px
179
+    height: 50px
180
+    margin-right: 10px
181
+    background: #ddd
182
+    background-repeat: no-repeat
183
+    background-position: center
184
+    background-size: cover
185
+    border-radius: 50%
186
+  &-bubble
187
+    max-width: 450px
188
+    padding: 15px
189
+    border-radius: 15px
190
+    background: var(--left-msg-bg)
191
+  &-info
192
+    display: flex
193
+    justify-content: space-between
194
+    align-items: center
195
+    margin-bottom: 10px
196
+    &-name
197
+      margin-right: 10px
198
+      font-weight: bold
199
+    &-time
200
+      font-size: 0.85em
201
+      display: flex
202
+      margin-top: 10px
203
+
204
+.left-msg
205
+  .msg
206
+    &-bubble
207
+      border-bottom-left-radius: 0
208
+      display: inline-block
209
+      border-radius: 12px
210
+      background-color: rgb(246, 246, 246)
211
+      padding: 8px 12px
212
+      align-self: flex-start
213
+      width: auto
238 214
 
239 215
 .right-msg
240 216
   flex-direction: row-reverse
241
-
242
-.right-msg .msg-bubble
243
-  background: rgb(233, 12, 119)
244
-  background: linear-gradient(
245
-    90deg,
246
-    rgba(233, 12, 119, 1) 0%,
247
-    rgba(241, 96, 89, 1) 100%
248
-  )
249
-  color: #fff
250
-  border-bottom-right-radius: 0
251
-
252
-.right-msg .msg-img
253
-  margin: 0 0 0 10px
254
-
255
-.left-msg .msg-bubble
256
-  display: inline-block
257
-  border-radius: 12px
258
-  background-color: rgb(246, 246, 246)
259
-  padding: 8px 12px
260
-  align-self: flex-start
261
-  width: auto
262
-
263
-.msger-inputarea
264
-  padding: 10px
265
-  border-top: var(--border)
266
-  background: #eee
267
-  position: fixed
268
-  bottom: 0
269
-  width: 100vw
270
-
271
-.msger-inputarea *
272
-  padding: 10px
273
-  border: none
274
-  border-radius: 3px
275
-  font-size: 1em
217
+  .msg
218
+    &-bubble
219
+      background: rgb(233, 12, 119)
220
+      background: linear-gradient(
221
+        90deg,
222
+        rgba(233, 12, 119, 1) 0%,
223
+        rgba(241, 96, 89, 1) 100%
224
+      )
225
+      color: #fff
226
+      border-bottom-right-radius: 0
227
+    &-img
228
+      margin: 0 0 0 10px
276 229
 
277 230
 .msger-input
278 231
   flex: 1
279 232
   width: calc(100% - 425px)
280 233
   background: #ddd
281
-
234
+  &area
235
+    padding: 10px
236
+    border-top: var(--border)
237
+    background: #eee
238
+    position: fixed
239
+    bottom: 0
240
+    width: 100vw
241
+    *
242
+      padding: 10px
243
+      border: none
244
+      border-radius: 3px
245
+      font-size: 1em
246
+      
282 247
 .msger-send-btn
283 248
   margin-left: 10px
284 249
   background: rgb(233, 12, 119)

Loading…
Откажи
Сачувај