1
1
<template >
2
- <v-container >
2
+ <v-container grid-list-lg >
3
3
<v-dialog v-model =" showFeatureThisDialog" >
4
4
<v-card >
5
5
<v-card-title class =" headline" >Please enter a little teaser text</v-card-title >
18
18
<Sketch :sketch =" sketch" :showDetailsLink =false :showAuthor =false ></Sketch >
19
19
</v-flex >
20
20
<v-flex xs12 md6 class =" details" >
21
- <v-btn v-if =" isModerator" @click =" showFeatureThisDialog = true" >Feature this</v-btn >
22
- <div class =" likes" >
23
- <v-icon v-if =" didLike" large color =" pink" :title =" didLikeTitle" >favorite</v-icon >
24
- <v-icon v-else large color =" grey" >favorite</v-icon >
25
- <v-progress-circular v-if =" isLoading" class =" wait-icon" indeterminate color =" primary" ></v-progress-circular >
26
- <div v-else class =" like-interaction" >
27
- <v-btn v-if =" didLike" icon @click =" invertLike" title =" I want my egg back!" >
28
- <v-icon >remove</v-icon >
29
- </v-btn >
30
- <v-btn v-else icon @click =" invertLike" title =" Add an egg to the basket" >
31
- <v-icon >add</v-icon >
32
- </v-btn >
33
- </div >
34
- <h5 >
35
- <span v-if =" 0 === totalLikes" >
36
- no
37
- </span >
38
- <span v-else >
39
- {{totalLikes}}  ;
40
- </span >egg<span v-if =" 1 < totalLikes" >s</span > in the basket
41
- <span v-if =" 0 === totalLikes" >
42
- yet
43
- </span >
44
- </h5 >
45
- </div >
46
- <div class =" author-link" >
47
- <router-link :to =" {name: 'user', params: {uid: this.sketch.createdByUid, username: this.sketch.createdBy.displayName.replace(/\s/g, '+')}}" >{{this.sketch.createdBy.displayName}}</router-link >
48
- </div >
49
- <div class =" created" >{{creationDate}}</div >
50
- <div class =" comments" >
51
- <div class =" create-comment" >
52
- <v-btn icon color =" primary" title =" Write comment" v-scroll-to =" '#comment-textfield'" @click =" focusCommentTextfield" >
53
- <v-icon >add</v-icon >
54
- </v-btn >
55
- </div >
56
- <h2 >{{comments.length}} Comments</h2 >
57
- <Comment v-for =" comment in comments" :comment =" comment" :key =" comment.id" ></Comment >
58
- <v-text-field
59
- id =" comment-textfield"
60
- v-model =" newCommentBody"
61
- label =" Add a comment"
62
- hint =" Please be polite ;)"
63
- ref =" commentTextfield"
64
- multi-line
65
- ></v-text-field >
66
- <v-btn class =" submitComment" :disabled =" this.newCommentBody.length === 0" small color =" primary" @click =" submitComment" >Submit comment</v-btn >
67
- </div >
21
+ <v-card >
22
+ <v-card-text >
23
+ <v-btn v-if =" isModerator" @click =" showFeatureThisDialog = true" >Feature this</v-btn >
24
+ <div class =" likes" >
25
+ <v-icon v-if =" didLike" large color =" pink" :title =" didLikeTitle" >favorite</v-icon >
26
+ <v-icon v-else large color =" grey" >favorite</v-icon >
27
+ <v-progress-circular v-if =" isLoading" class =" wait-icon" indeterminate color =" primary" ></v-progress-circular >
28
+ <div v-else class =" like-interaction" >
29
+ <v-btn v-if =" didLike" icon @click =" invertLike" title =" I want my egg back!" >
30
+ <v-icon >remove</v-icon >
31
+ </v-btn >
32
+ <v-btn v-else icon @click =" invertLike" title =" Add an egg to the basket" >
33
+ <v-icon >add</v-icon >
34
+ </v-btn >
35
+ </div >
36
+ <h5 >
37
+ <span v-if =" 0 === totalLikes" >
38
+ no
39
+ </span >
40
+ <span v-else >
41
+ {{totalLikes}}  ;
42
+ </span >egg<span v-if =" 1 < totalLikes" >s</span > in the basket
43
+ <span v-if =" 0 === totalLikes" >
44
+ yet
45
+ </span >
46
+ </h5 >
47
+ </div >
48
+ <div class =" author-link" >
49
+ Author: <router-link :to =" {name: 'user', params: {uid: this.sketch.createdByUid, username: this.sketch.createdBy.displayName.replace(/\s/g, '+')}}" >{{this.sketch.createdBy.displayName}}</router-link >
50
+ </div >
51
+ <div class =" created" >Date: {{creationDate}}</div >
52
+ <div class =" comments" >
53
+ <div class =" create-comment" >
54
+ <v-btn icon color =" primary" title =" Write comment" v-scroll-to =" '#comment-textfield'" @click =" focusCommentTextfield" >
55
+ <v-icon >add</v-icon >
56
+ </v-btn >
57
+ </div >
58
+ <h2 >{{comments.length}} Comments</h2 >
59
+ <Comment v-for =" comment in comments" :comment =" comment" :key =" comment.id" ></Comment >
60
+ <v-text-field
61
+ id =" comment-textfield"
62
+ v-model =" newCommentBody"
63
+ label =" Add a comment"
64
+ hint =" Please be polite ;)"
65
+ ref =" commentTextfield"
66
+ multi-line
67
+ ></v-text-field >
68
+ <v-btn class =" submitComment" :disabled =" this.newCommentBody.length === 0" small color =" primary" @click =" submitComment" >Submit comment</v-btn >
69
+ </div >
70
+ </v-card-text >
71
+ </v-card >
68
72
</v-flex >
69
73
</v-layout >
70
74
</v-container >
@@ -255,7 +259,9 @@ export default {
255
259
256
260
<style lang="scss" scoped>
257
261
.details {
258
- padding : 7px ;
262
+ .card {
263
+ padding-bottom : 15px ;
264
+ }
259
265
.likes {
260
266
min-height : 60px ;
261
267
button {
@@ -284,6 +290,7 @@ export default {
284
290
}
285
291
.created {
286
292
border-bottom : 1px solid #0a6aa6 ;
293
+ padding-bottom : 20px ;
287
294
}
288
295
.created ,
289
296
.comments {
@@ -297,16 +304,12 @@ export default {
297
304
top : -5px ;
298
305
button {
299
306
margin-right : 0 ;
307
+ top : 0px ;
300
308
}
301
309
}
302
310
& h2 {
303
311
margin-bottom : 10px ;
304
312
}
305
- .submitButton {
306
- float : right ;
307
- margin-right : 0 ;
308
- margin-top : 0 ;
309
- }
310
313
}
311
314
}
312
315
</style >
@@ -316,5 +319,7 @@ export default {
316
319
float : right ;
317
320
margin-right : 0 ;
318
321
margin-top : 0 ;
322
+ position : relative ;
323
+ top : -12px ;
319
324
}
320
325
</style >
0 commit comments