File tree Expand file tree Collapse file tree 3 files changed +10
-19
lines changed Expand file tree Collapse file tree 3 files changed +10
-19
lines changed Original file line number Diff line number Diff line change 27
27
<div v-if =" submitted" >
28
28
<h3 >Thanks for adding your post</h3 >
29
29
</div >
30
- <div id =" preview" >
31
- <h3 >Preview blog</h3 >
32
- <p >Blog title: {{ blog.title }}</p >
33
- <p >Blog content:</p >
34
- <p style =" white-space : pre " >{{ blog.content }}</p >
35
- <p >Blog Categories:</p >
36
- <ul >
37
- <li v-for =" category in blog.categories" >{{ category }}</li >
38
- </ul >
39
- <p >Author: {{ blog.author }}</p >
40
- </div >
41
30
</div >
42
31
</template >
43
32
@@ -59,11 +48,7 @@ export default {
59
48
},
60
49
methods: {
61
50
post : function (){
62
- this .$http .post (' http://jsonplaceholder.typicode.com/posts' , {
63
- title: this .blog .title ,
64
- body: this .blog .content ,
65
- userId: 1
66
- }).then (function (data ){
51
+ this .$http .post (' https://nn-vue-playlist.firebaseio.com/posts.json' , this .blog ).then (function (data ){
67
52
console .log (data);
68
53
this .submitted = true ;
69
54
});
Original file line number Diff line number Diff line change 25
25
color : #fff ;
26
26
text-decoration : none ;
27
27
padding : 6px 8px ;
28
- border-radius : 10 px ;
28
+ border-radius : 5 px ;
29
29
}
30
30
nav {
31
31
background : #444 ;
32
- padding : 14 px 0 ;
32
+ padding : 20 px 0 ;
33
33
margin-bottom : 40px ;
34
34
}
35
35
.router-link-active {
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export default {
29
29
}
30
30
</script >
31
31
32
- <style >
32
+ <style scoped >
33
33
#show-blogs {
34
34
max-width : 800px ;
35
35
margin : 0px auto ;
@@ -45,4 +45,10 @@ export default {
45
45
color : #444 ;
46
46
text-decoration : none ;
47
47
}
48
+ input [type = " text" ]{
49
+ padding : 8px ;
50
+ width : 100% ;
51
+ box-sizing : border-box ;
52
+ }
53
+
48
54
</style >
You can’t perform that action at this time.
0 commit comments