1
1
< head >
2
2
< title > </ title >
3
3
< link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.3.2/css/bulma.css ">
4
+ < link rel ="stylesheet " href ="./font-awesome-4.7.0/css/font-awesome.min.css ">
4
5
< style type ="text/css "> body { padding-top : 40px ; }</ style >
5
6
</ head >
6
7
7
8
< body >
8
9
< style type ="text/css ">
9
10
.add { margin-top : 20px ; margin-bottom : 20px ; }
11
+ .footer { height : 10% }
10
12
input { padding-bottom : 12px ; }
11
13
</ style >
12
14
@@ -26,34 +28,51 @@ <h1 class="title">
26
28
</ div >
27
29
28
30
< tabs >
29
- < tab name ="Notes " :selected ="true ">
31
+ < tab name ="Notes " icon =" fa fa-sticky-note " :selected ="true ">
30
32
< ul >
31
33
< li v-for ="note in nonArchivedNotes ">
32
34
< article class ="message is-warning ">
33
35
< div class ="message-body ">
34
- < p > {{ note.text }} </ p > < br />
35
- < a @click ="note.archived = true "> Add to Archives</ a > | < a > Edit</ a > | < a @click ="note.isVisible = false "> Delete</ a >
36
+ < p v-show ="note != activeEdit "> {{ note.text }} </ p >
37
+ < input type ="text " v-model ="note.text " v-on:keyup.enter ="doneEdit(note) " v-show ="note == activeEdit "> < br />
38
+ < p class ="control "> < a class ="button is-small " title ="Add to Archives " @click ="note.archived = true "> < span class ="icon is-small "> < i class ="fa fa-archive "> </ i > </ span > </ a > < a class ="button is-small " title ="Edit " @click ="editNote(note) "> < span class ="icon is-small "> < i class ="fa fa-pencil "> </ i > </ span > </ a > < a class ="button is-small " title ="Delete " @click ="note.isVisible = false "> < span class ="icon is-small "> < i class ="fa fa-trash "> </ i > </ span > </ a > </ p >
36
39
</ div >
37
40
</ article >
38
- < br / >
41
+ < br >
39
42
</ li >
40
43
</ ul >
41
44
</ tab >
42
- < tab name ="Archived ">
45
+ < tab name ="Archived " icon =" fa fa-archive " >
43
46
< ul >
44
47
< li v-for ="note in archivedNotes ">
45
48
< article class ="message is-warning ">
46
49
< div class ="message-body ">
47
- < p > {{ note.text }} </ p > < br />
48
- < a @click ="note.archived = false "> Remove from Archives</ a > | < a > Edit</ a > | < a @click ="note.isVisible = false "> Delete</ a >
50
+ < p v-show ="note != activeEdit "> {{ note.text }} </ p >
51
+ < input type ="text " v-model ="note.text " v-on:keyup.enter ="doneEdit(note) " v-show ="note == activeEdit "> < br >
52
+ < p class ="control "> < a class ="button is-small " title ="Remove from Archives " @click ="note.archived = false "> < span class ="icon is-small "> < i class ="fa fa-sticky-note "> </ i > </ span > </ a > < a class ="button is-small " title ="Edit " @click ="editNote(note) "> < span class ="icon is-small "> < i class ="fa fa-pencil "> </ i > </ span > </ a > < a class ="button is-small " title ="Delete " @click ="note.isVisible = false "> < span class ="icon is-small "> < i class ="fa fa-trash "> </ i > </ span > </ a > </ p >
49
53
</ div >
50
54
</ article >
51
- < br / >
55
+ < br >
52
56
</ li >
53
57
</ ul >
54
58
</ tab >
55
59
</ tabs >
56
60
</ div >
61
+
62
+ < footer class ="footer ">
63
+ < div class ="container ">
64
+ < div class ="content has-text-centered ">
65
+ < p >
66
+ < strong > NotesApp</ strong > by < a href ="https://github.com/yashkarle "> Yash Karle</ a >
67
+ </ p >
68
+ < p >
69
+ < a class ="icon " href ="https://github.com/yashkarle/vuejs-notes ">
70
+ < i class ="fa fa-github "> </ i >
71
+ </ a >
72
+ </ p >
73
+ </ div >
74
+ </ div >
75
+ </ footer >
57
76
</ body >
58
77
59
78
< script src ="https://unpkg.com/vue@2.2.1 "> </ script >
0 commit comments