File tree Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
+ <app-header ></app-header >
3
4
<router-view ></router-view >
4
5
</div >
5
6
</template >
8
9
// Imports
9
10
import showBlogs from ' ./components/showBlogs.vue' ;
10
11
import listBlogs from ' ./components/listBlogs.vue' ;
12
+ import header from ' ./components/header.vue' ;
11
13
12
14
export default {
13
15
components: {
14
- ' show-blogs' : showBlogs,
15
- ' list-blogs' : listBlogs
16
+ ' app-header' : header
16
17
},
17
18
data () {
18
19
return {
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <nav >
3
+ <ul >
4
+ <li ><router-link to =" /" exact >Blog</router-link ></li >
5
+ <li ><router-link to =" /add" exact >Add a new blog</router-link ></li >
6
+ </ul >
7
+ </nav >
8
+ </template >
9
+
10
+ <script >
11
+ export default {}
12
+ </script >
13
+
14
+ <style scoped>
15
+ ul {
16
+ list-style-type : none ;
17
+ text-align : center ;
18
+ margin : 0 ;
19
+ }
20
+ li {
21
+ display : inline-block ;
22
+ margin : 0 10px ;
23
+ }
24
+ a {
25
+ color : #fff ;
26
+ text-decoration : none ;
27
+ padding : 6px 8px ;
28
+ border-radius : 10px ;
29
+ }
30
+ nav {
31
+ background : #444 ;
32
+ padding : 14px 0 ;
33
+ margin-bottom : 40px ;
34
+ }
35
+ .router-link-active {
36
+ background : #eee ;
37
+ color : #444 ;
38
+ }
39
+ </style >
You can’t perform that action at this time.
0 commit comments